|
@@ -18,11 +18,12 @@
|
|
|
|
|
|
package org.apache.hadoop.mapreduce.lib.input;
|
|
package org.apache.hadoop.mapreduce.lib.input;
|
|
|
|
|
|
-import static org.junit.Assert.assertEquals;
|
|
|
|
-import static org.junit.Assert.assertFalse;
|
|
|
|
-import static org.junit.Assert.assertNotNull;
|
|
|
|
-import static org.junit.Assert.assertNull;
|
|
|
|
-import static org.junit.Assert.assertTrue;
|
|
|
|
|
|
+import static org.junit.jupiter.api.Assertions.assertEquals;
|
|
|
|
+import static org.junit.jupiter.api.Assertions.assertFalse;
|
|
|
|
+import static org.junit.jupiter.api.Assertions.assertNotNull;
|
|
|
|
+import static org.junit.jupiter.api.Assertions.assertNull;
|
|
|
|
+import static org.junit.jupiter.api.Assertions.assertThrows;
|
|
|
|
+import static org.junit.jupiter.api.Assertions.assertTrue;
|
|
|
|
|
|
import java.io.File;
|
|
import java.io.File;
|
|
import java.io.FileInputStream;
|
|
import java.io.FileInputStream;
|
|
@@ -47,7 +48,7 @@ import org.apache.hadoop.io.compress.Decompressor;
|
|
import org.apache.hadoop.mapreduce.TaskAttemptContext;
|
|
import org.apache.hadoop.mapreduce.TaskAttemptContext;
|
|
import org.apache.hadoop.mapreduce.TaskAttemptID;
|
|
import org.apache.hadoop.mapreduce.TaskAttemptID;
|
|
import org.apache.hadoop.mapreduce.task.TaskAttemptContextImpl;
|
|
import org.apache.hadoop.mapreduce.task.TaskAttemptContextImpl;
|
|
-import org.junit.Test;
|
|
|
|
|
|
+import org.junit.jupiter.api.Test;
|
|
|
|
|
|
public class TestLineRecordReader {
|
|
public class TestLineRecordReader {
|
|
private static Path workDir = new Path(new Path(System.getProperty(
|
|
private static Path workDir = new Path(new Path(System.getProperty(
|
|
@@ -57,7 +58,7 @@ public class TestLineRecordReader {
|
|
private void testSplitRecords(String testFileName, long firstSplitLength)
|
|
private void testSplitRecords(String testFileName, long firstSplitLength)
|
|
throws IOException {
|
|
throws IOException {
|
|
URL testFileUrl = getClass().getClassLoader().getResource(testFileName);
|
|
URL testFileUrl = getClass().getClassLoader().getResource(testFileName);
|
|
- assertNotNull("Cannot find " + testFileName, testFileUrl);
|
|
|
|
|
|
+ assertNotNull(testFileUrl, "Cannot find " + testFileName);
|
|
File testFile = new File(testFileUrl.getFile());
|
|
File testFile = new File(testFileUrl.getFile());
|
|
long testFileSize = testFile.length();
|
|
long testFileSize = testFile.length();
|
|
Path testFilePath = new Path(testFile.getAbsolutePath());
|
|
Path testFilePath = new Path(testFile.getAbsolutePath());
|
|
@@ -70,8 +71,8 @@ public class TestLineRecordReader {
|
|
throws IOException {
|
|
throws IOException {
|
|
conf.setInt(org.apache.hadoop.mapreduce.lib.input.
|
|
conf.setInt(org.apache.hadoop.mapreduce.lib.input.
|
|
LineRecordReader.MAX_LINE_LENGTH, Integer.MAX_VALUE);
|
|
LineRecordReader.MAX_LINE_LENGTH, Integer.MAX_VALUE);
|
|
- assertTrue("unexpected test data at " + testFilePath,
|
|
|
|
- testFileSize > firstSplitLength);
|
|
|
|
|
|
+ assertTrue(testFileSize > firstSplitLength,
|
|
|
|
+ "unexpected test data at " + testFilePath);
|
|
|
|
|
|
String delimiter = conf.get("textinputformat.record.delimiter");
|
|
String delimiter = conf.get("textinputformat.record.delimiter");
|
|
byte[] recordDelimiterBytes = null;
|
|
byte[] recordDelimiterBytes = null;
|
|
@@ -111,8 +112,8 @@ public class TestLineRecordReader {
|
|
++numRecordsRemainingSplits;
|
|
++numRecordsRemainingSplits;
|
|
}
|
|
}
|
|
reader.close();
|
|
reader.close();
|
|
- assertEquals("Unexpected number of records in split ", numRecordsNoSplits,
|
|
|
|
- numRecordsFirstSplit + numRecordsRemainingSplits);
|
|
|
|
|
|
+ assertEquals(numRecordsNoSplits, numRecordsFirstSplit + numRecordsRemainingSplits,
|
|
|
|
+ "Unexpected number of records in split ");
|
|
}
|
|
}
|
|
|
|
|
|
@Test
|
|
@Test
|
|
@@ -131,11 +132,12 @@ public class TestLineRecordReader {
|
|
testSplitRecords("blockEndingInCRThenLF.txt.bz2", 136498);
|
|
testSplitRecords("blockEndingInCRThenLF.txt.bz2", 136498);
|
|
}
|
|
}
|
|
|
|
|
|
- @Test(expected=IOException.class)
|
|
|
|
|
|
+ @Test()
|
|
public void testSafeguardSplittingUnsplittableFiles() throws IOException {
|
|
public void testSafeguardSplittingUnsplittableFiles() throws IOException {
|
|
// The LineRecordReader must fail when trying to read a file that
|
|
// The LineRecordReader must fail when trying to read a file that
|
|
// was compressed using an unsplittable file format
|
|
// was compressed using an unsplittable file format
|
|
- testSplitRecords("TestSafeguardSplittingUnsplittableFiles.txt.gz", 2);
|
|
|
|
|
|
+ assertThrows(IOException.class, () ->
|
|
|
|
+ testSplitRecords("TestSafeguardSplittingUnsplittableFiles.txt.gz", 2));
|
|
}
|
|
}
|
|
|
|
|
|
// Use the LineRecordReader to read records from the file
|
|
// Use the LineRecordReader to read records from the file
|
|
@@ -182,7 +184,7 @@ public class TestLineRecordReader {
|
|
count = fis.read(data);
|
|
count = fis.read(data);
|
|
}
|
|
}
|
|
fis.close();
|
|
fis.close();
|
|
- assertTrue("Test file data too big for buffer", count < data.length);
|
|
|
|
|
|
+ assertTrue(count < data.length, "Test file data too big for buffer");
|
|
return new String(data, 0, count, StandardCharsets.UTF_8).split("\n");
|
|
return new String(data, 0, count, StandardCharsets.UTF_8).split("\n");
|
|
}
|
|
}
|
|
|
|
|
|
@@ -194,7 +196,7 @@ public class TestLineRecordReader {
|
|
ArrayList<String> records = readRecords(testFileUrl, splitSize);
|
|
ArrayList<String> records = readRecords(testFileUrl, splitSize);
|
|
String[] actuals = readRecordsDirectly(testFileUrl, bzip);
|
|
String[] actuals = readRecordsDirectly(testFileUrl, bzip);
|
|
|
|
|
|
- assertEquals("Wrong number of records", actuals.length, records.size());
|
|
|
|
|
|
+ assertEquals(actuals.length, records.size(), "Wrong number of records");
|
|
|
|
|
|
boolean hasLargeRecord = false;
|
|
boolean hasLargeRecord = false;
|
|
for (int i = 0; i < actuals.length; ++i) {
|
|
for (int i = 0; i < actuals.length; ++i) {
|
|
@@ -204,8 +206,8 @@ public class TestLineRecordReader {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- assertTrue("Invalid test data. Doesn't have a large enough record",
|
|
|
|
- hasLargeRecord);
|
|
|
|
|
|
+ assertTrue(hasLargeRecord,
|
|
|
|
+ "Invalid test data. Doesn't have a large enough record");
|
|
}
|
|
}
|
|
|
|
|
|
@Test
|
|
@Test
|
|
@@ -233,7 +235,7 @@ public class TestLineRecordReader {
|
|
// confirm the BOM is skipped by LineRecordReader
|
|
// confirm the BOM is skipped by LineRecordReader
|
|
String UTF8_BOM = "\uFEFF";
|
|
String UTF8_BOM = "\uFEFF";
|
|
URL testFileUrl = getClass().getClassLoader().getResource("testBOM.txt");
|
|
URL testFileUrl = getClass().getClassLoader().getResource("testBOM.txt");
|
|
- assertNotNull("Cannot find testBOM.txt", testFileUrl);
|
|
|
|
|
|
+ assertNotNull(testFileUrl, "Cannot find testBOM.txt");
|
|
File testFile = new File(testFileUrl.getFile());
|
|
File testFile = new File(testFileUrl.getFile());
|
|
Path testFilePath = new Path(testFile.getAbsolutePath());
|
|
Path testFilePath = new Path(testFile.getAbsolutePath());
|
|
long testFileSize = testFile.length();
|
|
long testFileSize = testFile.length();
|
|
@@ -262,15 +264,14 @@ public class TestLineRecordReader {
|
|
}
|
|
}
|
|
reader.close();
|
|
reader.close();
|
|
|
|
|
|
- assertTrue("BOM is not skipped", skipBOM);
|
|
|
|
|
|
+ assertTrue(skipBOM, "BOM is not skipped");
|
|
}
|
|
}
|
|
|
|
|
|
@Test
|
|
@Test
|
|
public void testMultipleClose() throws IOException {
|
|
public void testMultipleClose() throws IOException {
|
|
URL testFileUrl = getClass().getClassLoader().
|
|
URL testFileUrl = getClass().getClassLoader().
|
|
getResource("recordSpanningMultipleSplits.txt.bz2");
|
|
getResource("recordSpanningMultipleSplits.txt.bz2");
|
|
- assertNotNull("Cannot find recordSpanningMultipleSplits.txt.bz2",
|
|
|
|
- testFileUrl);
|
|
|
|
|
|
+ assertNotNull(testFileUrl, "Cannot find recordSpanningMultipleSplits.txt.bz2");
|
|
File testFile = new File(testFileUrl.getFile());
|
|
File testFile = new File(testFileUrl.getFile());
|
|
Path testFilePath = new Path(testFile.getAbsolutePath());
|
|
Path testFilePath = new Path(testFile.getAbsolutePath());
|
|
long testFileSize = testFile.length();
|
|
long testFileSize = testFile.length();
|
|
@@ -424,27 +425,27 @@ public class TestLineRecordReader {
|
|
LineRecordReader reader = new LineRecordReader(recordDelimiterBytes);
|
|
LineRecordReader reader = new LineRecordReader(recordDelimiterBytes);
|
|
reader.initialize(split, context);
|
|
reader.initialize(split, context);
|
|
// Get first record: "abcdefghij"
|
|
// Get first record: "abcdefghij"
|
|
- assertTrue("Expected record got nothing", reader.nextKeyValue());
|
|
|
|
|
|
+ assertTrue(reader.nextKeyValue(), "Expected record got nothing");
|
|
LongWritable key = reader.getCurrentKey();
|
|
LongWritable key = reader.getCurrentKey();
|
|
Text value = reader.getCurrentValue();
|
|
Text value = reader.getCurrentValue();
|
|
- assertEquals("Wrong length for record value", 10, value.getLength());
|
|
|
|
- assertEquals("Wrong position after record read", 0, key.get());
|
|
|
|
|
|
+ assertEquals(10, value.getLength(), "Wrong length for record value");
|
|
|
|
+ assertEquals(0, key.get(), "Wrong position after record read");
|
|
// Get second record: "kl"
|
|
// Get second record: "kl"
|
|
- assertTrue("Expected record got nothing", reader.nextKeyValue());
|
|
|
|
- assertEquals("Wrong length for record value", 2, value.getLength());
|
|
|
|
|
|
+ assertTrue(reader.nextKeyValue(), "Expected record got nothing");
|
|
|
|
+ assertEquals(2, value.getLength(), "Wrong length for record value");
|
|
// Key should be 12 right after "abcdefghij++"
|
|
// Key should be 12 right after "abcdefghij++"
|
|
- assertEquals("Wrong position after record read", 12, key.get());
|
|
|
|
|
|
+ assertEquals(12, key.get(), "Wrong position after record read");
|
|
// Get third record: "mno"
|
|
// Get third record: "mno"
|
|
- assertTrue("Expected record got nothing", reader.nextKeyValue());
|
|
|
|
- assertEquals("Wrong length for record value", 3, value.getLength());
|
|
|
|
|
|
+ assertTrue(reader.nextKeyValue(), "Expected record got nothing");
|
|
|
|
+ assertEquals(3, value.getLength(), "Wrong length for record value");
|
|
// Key should be 16 right after "abcdefghij++kl++"
|
|
// Key should be 16 right after "abcdefghij++kl++"
|
|
- assertEquals("Wrong position after record read", 16, key.get());
|
|
|
|
|
|
+ assertEquals(16, key.get(), "Wrong position after record read");
|
|
assertFalse(reader.nextKeyValue());
|
|
assertFalse(reader.nextKeyValue());
|
|
// Key should be 19 right after "abcdefghij++kl++mno"
|
|
// Key should be 19 right after "abcdefghij++kl++mno"
|
|
- assertEquals("Wrong position after record read", 19, key.get());
|
|
|
|
|
|
+ assertEquals(19, key.get(), "Wrong position after record read");
|
|
// after refresh should be empty
|
|
// after refresh should be empty
|
|
key = reader.getCurrentKey();
|
|
key = reader.getCurrentKey();
|
|
- assertNull("Unexpected key returned", key);
|
|
|
|
|
|
+ assertNull(key, "Unexpected key returned");
|
|
reader.close();
|
|
reader.close();
|
|
split = new FileSplit(inputFile, splitLength,
|
|
split = new FileSplit(inputFile, splitLength,
|
|
inputData.length() - splitLength, (String[])null);
|
|
inputData.length() - splitLength, (String[])null);
|
|
@@ -452,9 +453,9 @@ public class TestLineRecordReader {
|
|
reader.initialize(split, context);
|
|
reader.initialize(split, context);
|
|
// No record is in the second split because the second split dropped
|
|
// No record is in the second split because the second split dropped
|
|
// the first record, which was already reported by the first split.
|
|
// the first record, which was already reported by the first split.
|
|
- assertFalse("Unexpected record returned", reader.nextKeyValue());
|
|
|
|
|
|
+ assertFalse(reader.nextKeyValue(), "Unexpected record returned");
|
|
key = reader.getCurrentKey();
|
|
key = reader.getCurrentKey();
|
|
- assertNull("Unexpected key returned", key);
|
|
|
|
|
|
+ assertNull(key, "Unexpected key returned");
|
|
reader.close();
|
|
reader.close();
|
|
|
|
|
|
// multi char delimiter with starting part of the delimiter in the data
|
|
// multi char delimiter with starting part of the delimiter in the data
|
|
@@ -465,36 +466,35 @@ public class TestLineRecordReader {
|
|
reader = new LineRecordReader(recordDelimiterBytes);
|
|
reader = new LineRecordReader(recordDelimiterBytes);
|
|
reader.initialize(split, context);
|
|
reader.initialize(split, context);
|
|
// Get first record: "abcd+efgh"
|
|
// Get first record: "abcd+efgh"
|
|
- assertTrue("Expected record got nothing", reader.nextKeyValue());
|
|
|
|
|
|
+ assertTrue(reader.nextKeyValue(), "Expected record got nothing");
|
|
key = reader.getCurrentKey();
|
|
key = reader.getCurrentKey();
|
|
value = reader.getCurrentValue();
|
|
value = reader.getCurrentValue();
|
|
- assertEquals("Wrong position after record read", 0, key.get());
|
|
|
|
- assertEquals("Wrong length for record value", 9, value.getLength());
|
|
|
|
|
|
+ assertEquals(0, key.get(), "Wrong position after record read");
|
|
|
|
+ assertEquals(9, value.getLength(), "Wrong length for record value");
|
|
// should have jumped over the delimiter, no record
|
|
// should have jumped over the delimiter, no record
|
|
assertFalse(reader.nextKeyValue());
|
|
assertFalse(reader.nextKeyValue());
|
|
- assertEquals("Wrong position after record read", 11, key.get());
|
|
|
|
|
|
+ assertEquals(11, key.get(), "Wrong position after record read");
|
|
// after refresh should be empty
|
|
// after refresh should be empty
|
|
key = reader.getCurrentKey();
|
|
key = reader.getCurrentKey();
|
|
- assertNull("Unexpected key returned", key);
|
|
|
|
|
|
+ assertNull(key, "Unexpected key returned");
|
|
reader.close();
|
|
reader.close();
|
|
// next split: check for duplicate or dropped records
|
|
// next split: check for duplicate or dropped records
|
|
- split = new FileSplit(inputFile, splitLength,
|
|
|
|
- inputData.length () - splitLength, (String[])null);
|
|
|
|
|
|
+ split = new FileSplit(inputFile, splitLength, inputData.length() - splitLength, null);
|
|
reader = new LineRecordReader(recordDelimiterBytes);
|
|
reader = new LineRecordReader(recordDelimiterBytes);
|
|
reader.initialize(split, context);
|
|
reader.initialize(split, context);
|
|
- assertTrue("Expected record got nothing", reader.nextKeyValue());
|
|
|
|
|
|
+ assertTrue(reader.nextKeyValue(), "Expected record got nothing");
|
|
key = reader.getCurrentKey();
|
|
key = reader.getCurrentKey();
|
|
value = reader.getCurrentValue();
|
|
value = reader.getCurrentValue();
|
|
// Get second record: "ijk" first in this split
|
|
// Get second record: "ijk" first in this split
|
|
- assertEquals("Wrong position after record read", 11, key.get());
|
|
|
|
- assertEquals("Wrong length for record value", 3, value.getLength());
|
|
|
|
|
|
+ assertEquals(11, key.get(), "Wrong position after record read");
|
|
|
|
+ assertEquals(3, value.getLength(), "Wrong length for record value");
|
|
// Get third record: "mno" second in this split
|
|
// Get third record: "mno" second in this split
|
|
- assertTrue("Expected record got nothing", reader.nextKeyValue());
|
|
|
|
- assertEquals("Wrong position after record read", 16, key.get());
|
|
|
|
- assertEquals("Wrong length for record value", 3, value.getLength());
|
|
|
|
|
|
+ assertTrue(reader.nextKeyValue(), "Expected record got nothing");
|
|
|
|
+ assertEquals(16, key.get(), "Wrong position after record read");
|
|
|
|
+ assertEquals(3, value.getLength(), "Wrong length for record value");
|
|
// should be at the end of the input
|
|
// should be at the end of the input
|
|
assertFalse(reader.nextKeyValue());
|
|
assertFalse(reader.nextKeyValue());
|
|
- assertEquals("Wrong position after record read", 19, key.get());
|
|
|
|
|
|
+ assertEquals(19, key.get(), "Wrong position after record read");
|
|
reader.close();
|
|
reader.close();
|
|
|
|
|
|
inputData = "abcd|efgh|+|ij|kl|+|mno|pqr";
|
|
inputData = "abcd|efgh|+|ij|kl|+|mno|pqr";
|
|
@@ -508,44 +508,41 @@ public class TestLineRecordReader {
|
|
// track where we are in the inputdata
|
|
// track where we are in the inputdata
|
|
int keyPosition = 0;
|
|
int keyPosition = 0;
|
|
conf.setInt("io.file.buffer.size", bufferSize);
|
|
conf.setInt("io.file.buffer.size", bufferSize);
|
|
- split = new FileSplit(inputFile, 0, bufferSize, (String[]) null);
|
|
|
|
|
|
+ split = new FileSplit(inputFile, 0, bufferSize, null);
|
|
reader = new LineRecordReader(recordDelimiterBytes);
|
|
reader = new LineRecordReader(recordDelimiterBytes);
|
|
reader.initialize(split, context);
|
|
reader.initialize(split, context);
|
|
// Get the first record: "abcd|efgh" always possible
|
|
// Get the first record: "abcd|efgh" always possible
|
|
- assertTrue("Expected record got nothing", reader.nextKeyValue());
|
|
|
|
|
|
+ assertTrue(reader.nextKeyValue(), "Expected record got nothing");
|
|
key = reader.getCurrentKey();
|
|
key = reader.getCurrentKey();
|
|
value = reader.getCurrentValue();
|
|
value = reader.getCurrentValue();
|
|
- assertTrue("abcd|efgh".equals(value.toString()));
|
|
|
|
|
|
+ assertEquals("abcd|efgh", value.toString());
|
|
// Position should be 0 right at the start
|
|
// Position should be 0 right at the start
|
|
- assertEquals("Wrong position after record read", keyPosition,
|
|
|
|
- key.get());
|
|
|
|
|
|
+ assertEquals(keyPosition, key.get(), "Wrong position after record read");
|
|
// Position should be 12 right after the first "|+|"
|
|
// Position should be 12 right after the first "|+|"
|
|
keyPosition = 12;
|
|
keyPosition = 12;
|
|
// get the next record: "ij|kl" if the split/buffer allows it
|
|
// get the next record: "ij|kl" if the split/buffer allows it
|
|
if (reader.nextKeyValue()) {
|
|
if (reader.nextKeyValue()) {
|
|
// check the record info: "ij|kl"
|
|
// check the record info: "ij|kl"
|
|
- assertTrue("ij|kl".equals(value.toString()));
|
|
|
|
- assertEquals("Wrong position after record read", keyPosition,
|
|
|
|
- key.get());
|
|
|
|
|
|
+ assertEquals("ij|kl", value.toString());
|
|
|
|
+ assertEquals(keyPosition, key.get(),
|
|
|
|
+ "Wrong position after record read");
|
|
// Position should be 20 after the second "|+|"
|
|
// Position should be 20 after the second "|+|"
|
|
keyPosition = 20;
|
|
keyPosition = 20;
|
|
}
|
|
}
|
|
// get the third record: "mno|pqr" if the split/buffer allows it
|
|
// get the third record: "mno|pqr" if the split/buffer allows it
|
|
if (reader.nextKeyValue()) {
|
|
if (reader.nextKeyValue()) {
|
|
// check the record info: "mno|pqr"
|
|
// check the record info: "mno|pqr"
|
|
- assertTrue("mno|pqr".equals(value.toString()));
|
|
|
|
- assertEquals("Wrong position after record read", keyPosition,
|
|
|
|
- key.get());
|
|
|
|
|
|
+ assertEquals("mno|pqr", value.toString());
|
|
|
|
+ assertEquals(keyPosition, key.get(), "Wrong position after record read");
|
|
// Position should be the end of the input
|
|
// Position should be the end of the input
|
|
keyPosition = inputData.length();
|
|
keyPosition = inputData.length();
|
|
}
|
|
}
|
|
- assertFalse("Unexpected record returned", reader.nextKeyValue());
|
|
|
|
|
|
+ assertFalse(reader.nextKeyValue(), "Unexpected record returned");
|
|
// no more records can be read we should be at the last position
|
|
// no more records can be read we should be at the last position
|
|
- assertEquals("Wrong position after record read", keyPosition,
|
|
|
|
- key.get());
|
|
|
|
|
|
+ assertEquals(keyPosition, key.get(), "Wrong position after record read");
|
|
// after refresh should be empty
|
|
// after refresh should be empty
|
|
key = reader.getCurrentKey();
|
|
key = reader.getCurrentKey();
|
|
- assertNull("Unexpected key returned", key);
|
|
|
|
|
|
+ assertNull(key, "Unexpected key returned");
|
|
reader.close();
|
|
reader.close();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -628,14 +625,14 @@ public class TestLineRecordReader {
|
|
// (833 bytes is the last block start in the used data file)
|
|
// (833 bytes is the last block start in the used data file)
|
|
int firstSplitLength = 100;
|
|
int firstSplitLength = 100;
|
|
URL testFileUrl = getClass().getClassLoader().getResource(testFileName);
|
|
URL testFileUrl = getClass().getClassLoader().getResource(testFileName);
|
|
- assertNotNull("Cannot find " + testFileName, testFileUrl);
|
|
|
|
|
|
+ assertNotNull(testFileUrl, "Cannot find " + testFileName);
|
|
File testFile = new File(testFileUrl.getFile());
|
|
File testFile = new File(testFileUrl.getFile());
|
|
long testFileSize = testFile.length();
|
|
long testFileSize = testFile.length();
|
|
Path testFilePath = new Path(testFile.getAbsolutePath());
|
|
Path testFilePath = new Path(testFile.getAbsolutePath());
|
|
- assertTrue("Split size is smaller than header length",
|
|
|
|
- firstSplitLength > 9);
|
|
|
|
- assertTrue("Split size is larger than compressed file size " +
|
|
|
|
- testFilePath, testFileSize > firstSplitLength);
|
|
|
|
|
|
+ assertTrue(firstSplitLength > 9, "Split size is smaller than header length");
|
|
|
|
+ assertTrue(testFileSize > firstSplitLength,
|
|
|
|
+ "Split size is larger than compressed file size " +
|
|
|
|
+ testFilePath);
|
|
|
|
|
|
Configuration conf = new Configuration();
|
|
Configuration conf = new Configuration();
|
|
conf.setInt(org.apache.hadoop.mapreduce.lib.input.
|
|
conf.setInt(org.apache.hadoop.mapreduce.lib.input.
|