update BatchDeltaIngestion.testDeltaIngestion(..) to check for proper glob path handling

This commit is contained in:
Himanshu Gupta 2015-08-20 17:03:15 -05:00
parent 85e3ce9096
commit b3c570e78d
1 changed files with 18 additions and 4 deletions

View File

@ -145,16 +145,30 @@ public class BatchDeltaIngestionTest
@Test @Test
public void testDeltaIngestion() throws Exception public void testDeltaIngestion() throws Exception
{ {
File dataFile = temporaryFolder.newFile(); File tmpDir = temporaryFolder.newFolder();
File dataFile1 = new File(tmpDir, "data1");
FileUtils.writeLines( FileUtils.writeLines(
dataFile, dataFile1,
ImmutableList.of( ImmutableList.of(
"2014102200,a.example.com,a.example.com,90", "2014102200,a.example.com,a.example.com,90",
"2014102201,b.example.com,b.example.com,25", "2014102201,b.example.com,b.example.com,25"
)
);
File dataFile2 = new File(tmpDir, "data2");
FileUtils.writeLines(
dataFile2,
ImmutableList.of(
"2014102202,c.example.com,c.example.com,70" "2014102202,c.example.com,c.example.com,70"
) )
); );
//using a hadoop glob path to test that it continues to work with hadoop MultipleInputs usage and not
//affected by
//https://issues.apache.org/jira/browse/MAPREDUCE-5061
String inputPath = tmpDir.getPath() + "/{data1,data2}";
HadoopDruidIndexerConfig config = makeHadoopDruidIndexerConfig( HadoopDruidIndexerConfig config = makeHadoopDruidIndexerConfig(
ImmutableMap.<String, Object>of( ImmutableMap.<String, Object>of(
"type", "type",
@ -178,7 +192,7 @@ public class BatchDeltaIngestionTest
"type", "type",
"static", "static",
"paths", "paths",
dataFile.getCanonicalPath() inputPath
) )
) )
), ),