for (int i = 0; i<1000; i++) {
buf.append(DATA10);
buf.append("\n");
}
ByteArrayInputStream stream = new ByteArrayInputStream(buf.toString().getBytes());
OutputStreamWriter writer = new OutputStreamWriter(getConfiguration(), testDefaultPath, Codecs.GZIP.getCodecInfo());
ChainedFileNamingStrategy fileNamingStrategy = new ChainedFileNamingStrategy();
fileNamingStrategy.register(new StaticFileNamingStrategy("data"));
fileNamingStrategy.register(new CodecFileNamingStrategy());
writer.setFileNamingStrategy(fileNamingStrategy);
doWithInputStream(stream, writer);
TextFileReader reader = new TextFileReader(getConfiguration(), new Path(testDefaultPath, "data.gzip"), Codecs.GZIP.getCodecInfo());
List<String> data = TestUtils.readData(reader);