Search in sources :

Example 1 with InputSplitComparator

use of org.apache.hadoop.hive.ql.exec.tez.HiveSplitGenerator.InputSplitComparator in project hive by apache.

the class InputSplitComparatorTest method testCompare1.

@Test
public void testCompare1() throws Exception {
    FileSplit split1 = new FileSplit(new Path("/abc/def"), 2000L, 500L, EMPTY);
    FileSplit split2 = new FileSplit(new Path("/abc/def"), 1000L, 500L, EMPTY);
    InputSplitComparator comparator = new InputSplitComparator();
    assertEquals(1, comparator.compare(split1, split2));
}
Also used : Path(org.apache.hadoop.fs.Path) InputSplitComparator(org.apache.hadoop.hive.ql.exec.tez.HiveSplitGenerator.InputSplitComparator) FileSplit(org.apache.hadoop.mapred.FileSplit) Test(org.junit.Test)

Example 2 with InputSplitComparator

use of org.apache.hadoop.hive.ql.exec.tez.HiveSplitGenerator.InputSplitComparator in project hive by apache.

the class TestInputSplitComparator method testCompare1.

@Test
public void testCompare1() throws Exception {
    FileSplit split1 = new FileSplit(new Path("/abc/def"), 2000L, 500L, EMPTY);
    FileSplit split2 = new FileSplit(new Path("/abc/def"), 1000L, 500L, EMPTY);
    InputSplitComparator comparator = new InputSplitComparator();
    assertEquals(1, comparator.compare(split1, split2));
}
Also used : Path(org.apache.hadoop.fs.Path) InputSplitComparator(org.apache.hadoop.hive.ql.exec.tez.HiveSplitGenerator.InputSplitComparator) FileSplit(org.apache.hadoop.mapred.FileSplit) Test(org.junit.Test)

Aggregations

Path (org.apache.hadoop.fs.Path)2 InputSplitComparator (org.apache.hadoop.hive.ql.exec.tez.HiveSplitGenerator.InputSplitComparator)2 FileSplit (org.apache.hadoop.mapred.FileSplit)2 Test (org.junit.Test)2