Merge pull request #1311 from metamx/staticS3FirehoseFactoryGZFix

Fix concatenated gzip files in StaticS3FirehoseFactory
This commit is contained in:
Fangjin Yang 2015-04-26 08:31:35 -07:00
commit 0f04798dda
1 changed files with 2 additions and 1 deletions

View File

@ -25,6 +25,7 @@ import com.google.common.base.Preconditions;
import com.google.common.base.Throwables;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import com.metamx.common.CompressionUtils;
import com.metamx.common.logger.Logger;
import io.druid.data.input.Firehose;
import io.druid.data.input.FirehoseFactory;
@ -113,7 +114,7 @@ public class StaticS3FirehoseFactory implements FirehoseFactory<StringInputRowPa
.getDataInputStream();
final InputStream outerInputStream = s3Object.getKey().endsWith(".gz")
? new GZIPInputStream(innerInputStream)
? CompressionUtils.gzipInputStream(innerInputStream)
: innerInputStream;
return IOUtils.lineIterator(