CompressionCodec.ZIP.toString()).toUpperCase(); try { codec = CompressionCodec.valueOf(codecString); } catch (IllegalArgumentException e) { String error = "Unsupported codec: " + codec.name(); LOG.error(error, new UnsupportedOperationException(error)); return; break; default: String error = "Unsupported codec: " + codec.name(); LOG.error(error, new UnsupportedOperationException(error));
String codecString = conf.get(ConfigConstants.CONF_INPUT_COMPRESSION_CODEC, CompressionCodec.ZIP.toString()); if (codecString.equalsIgnoreCase(CompressionCodec.ZIP.toString())) { zipIn = new ZipInputStream(fileIn); codec = CompressionCodec.ZIP; } else if (codecString.equalsIgnoreCase(CompressionCodec.GZIP.toString())) { long size = inSplit.getLength(); zipIn = new GZIPInputStream(fileIn); parse(file.getName(), zipIn); } else { throw new UnsupportedOperationException("Unsupported codec: " + codec.name());
if (codec.equals(CompressionCodec.ZIP)) { return nextKeyValueInZip(); } else if (codec.equals(CompressionCodec.GZIP)) { instream = new InputStreamReader(zipIn, encoding); parser = new CSVParser(instream, CSVParserFormatter. } else { throw new UnsupportedOperationException("Unsupported codec: " + codec.name()); if (codec.equals(CompressionCodec.ZIP)) { if (super.nextKeyValue()) { } else if (codec.equals(CompressionCodec.GZIP)) { if (super.nextKeyValue()) { return true; } else { throw new UnsupportedOperationException("Unsupported codec: " + codec.name());
@Override public RecordReader<DocumentURIWithSourceInfo, Text> createRecordReader(InputSplit split, TaskAttemptContext context) throws IOException, InterruptedException { String codec = context.getConfiguration().get( ConfigConstants.CONF_INPUT_COMPRESSION_CODEC, CompressionCodec.ZIP.toString()); if (codec.equalsIgnoreCase(CompressionCodec.ZIP.toString())) { return new ZipDelimitedJSONReader(); } else if (codec.equalsIgnoreCase(CompressionCodec.GZIP.toString())) { return new GzipDelimitedJSONReader(); } else { throw new UnsupportedOperationException("Unsupported codec: " + codec); } }
if (codec.equals(CompressionCodec.ZIP)) { ZipInputStream zis = (ZipInputStream) zipIn;
CompressionCodec.ZIP.toString()); if (codecString.equalsIgnoreCase(CompressionCodec.ZIP.toString())) { zipIn = new ZipInputStream(fileIn); codec = CompressionCodec.ZIP; } else if (codecString.equalsIgnoreCase(CompressionCodec.GZIP .toString())) { zipIn = new GZIPInputStream(fileIn); codec = CompressionCodec.GZIP;