@Test public void testWithBZip2CodeWithHadoopConfig() throws IOException { Configuration conf = new Configuration(); conf.setBoolean("mapred.output.compress", true); conf.set("mapred.output.compression.codec","org.apache.hadoop.io.compress.BZip2Codec"); conf.setInt(SYNC_INTERVAL_KEY, TEST_SYNC_INTERVAL); testGetRecordWriter(conf, CodecFactory.bzip2Codec(), TEST_SYNC_INTERVAL); }
@Test public void testWithBZip2Code() throws IOException { Configuration conf = new Configuration(); conf.setBoolean("mapred.output.compress", true); conf.set(AvroJob.CONF_OUTPUT_CODEC, DataFileConstants.BZIP2_CODEC); testGetRecordWriter(conf, CodecFactory.bzip2Codec(), DataFileConstants.DEFAULT_SYNC_INTERVAL); }
public static CodecFactory getCodecFactory(String property) { CodecType type = CodecType.valueOf(property); switch (type) { case BZIP2: return CodecFactory.bzip2Codec(); case DEFLATE: return CodecFactory.deflateCodec(CodecFactory.DEFAULT_DEFLATE_LEVEL); case LZO: return CodecFactory.xzCodec(CodecFactory.DEFAULT_XZ_LEVEL); case SNAPPY: return CodecFactory.snappyCodec(); case NONE: default: return CodecFactory.nullCodec(); } }
private CodecFactory getCodecFactory(String property) { CodecType type = CodecType.valueOf(property); switch (type) { case BZIP2: return CodecFactory.bzip2Codec(); case DEFLATE: return CodecFactory.deflateCodec(CodecFactory.DEFAULT_DEFLATE_LEVEL); case LZO: return CodecFactory.xzCodec(CodecFactory.DEFAULT_XZ_LEVEL); case SNAPPY: return CodecFactory.snappyCodec(); case NONE: default: return CodecFactory.nullCodec(); } }
protected CodecFactory getCodecFactory(String property) { CodecType type = CodecType.valueOf(property); switch (type) { case BZIP2: return CodecFactory.bzip2Codec(); case DEFLATE: return CodecFactory.deflateCodec(CodecFactory.DEFAULT_DEFLATE_LEVEL); case NONE: return CodecFactory.nullCodec(); case LZO: return CodecFactory.xzCodec(CodecFactory.DEFAULT_XZ_LEVEL); case SNAPPY: default: return CodecFactory.snappyCodec(); } }
private CodecFactory getCodecFactory() { switch (compressionType) { case Snappy: return CodecFactory.snappyCodec(); case Deflate: return CodecFactory.deflateCodec(9); case Bzip2: return CodecFactory.bzip2Codec(); default: throw new IllegalArgumentException(String.format( "Unsupported compression format %s. Supported formats: %s", compressionType.getName(), Arrays.toString( Formats.AVRO.getSupportedCompressionTypes().toArray()))); } } }
TileSerializer<Double> serializer = new PrimitiveAvroSerializer<Double>(Double.class, CodecFactory.bzip2Codec()); TileExporter extractor = new TileExporter(zookeeperQuorum, zookeeperPort, hbaseMaster, rootPath, extension); extractor.copyPyramid(pyramidId, minLevel, maxLevel, serializer, blockSize);
public static CodecFactory getCodec(String name) { if (name == null || name.equalsIgnoreCase("null")) { return CodecFactory.nullCodec(); } CodecFactory codecFactory; switch (name.toLowerCase()) { case "snappy": codecFactory = CodecFactory.snappyCodec(); break; case "gzip": case "deflate": codecFactory = CodecFactory.deflateCodec(CodecFactory.DEFAULT_DEFLATE_LEVEL); break; case "bzip2": codecFactory = CodecFactory.bzip2Codec(); break; case "xz": codecFactory = CodecFactory.xzCodec(CodecFactory.DEFAULT_XZ_LEVEL); break; default: codecFactory = CodecFactory.deflateCodec(CodecFactory.DEFAULT_DEFLATE_LEVEL); break; } return codecFactory; }
public static CodecFactory getCodec(String name) { if (name == null || name.equalsIgnoreCase("null")) { return CodecFactory.nullCodec(); } CodecFactory codecFactory; switch (name) { case "snappy": codecFactory = CodecFactory.snappyCodec(); break; case "gzip": case "deflate": codecFactory = CodecFactory.deflateCodec(CodecFactory.DEFAULT_DEFLATE_LEVEL); break; case "bzip2": codecFactory = CodecFactory.bzip2Codec(); break; case "xz": codecFactory = CodecFactory.xzCodec(CodecFactory.DEFAULT_XZ_LEVEL); break; default: codecFactory = CodecFactory.deflateCodec(CodecFactory.DEFAULT_DEFLATE_LEVEL); break; } return codecFactory; }
public static CodecFactory getCodecFactory(String property) { CodecType type = CodecType.valueOf(property); switch (type) { case BZIP2: return CodecFactory.bzip2Codec(); case DEFLATE: return CodecFactory.deflateCodec(CodecFactory.DEFAULT_DEFLATE_LEVEL); case LZO: return CodecFactory.xzCodec(CodecFactory.DEFAULT_XZ_LEVEL); case SNAPPY: return CodecFactory.snappyCodec(); case NONE: default: return CodecFactory.nullCodec(); } }
protected CodecFactory getCodecFactory(String property) { CodecType type = CodecType.valueOf(property); switch (type) { case BZIP2: return CodecFactory.bzip2Codec(); case DEFLATE: return CodecFactory.deflateCodec(CodecFactory.DEFAULT_DEFLATE_LEVEL); case NONE: return CodecFactory.nullCodec(); case LZO: return CodecFactory.xzCodec(CodecFactory.DEFAULT_XZ_LEVEL); case SNAPPY: default: return CodecFactory.snappyCodec(); } }
public static <T> CodecFactory getCodecFactory (ConfigurableFactory<TileSerializer<T>> subFactory) throws ConfigurationException { CodecType codecType = subFactory.getPropertyValue(CODEC_TYPE); switch (codecType) { case Snappy: return CodecFactory.snappyCodec(); case Deflate: int deflateLevel = subFactory.getPropertyValue(DEFLATE_LEVEL); return CodecFactory.deflateCodec(deflateLevel); case None: return CodecFactory.nullCodec(); case BZip2: default: return CodecFactory.bzip2Codec(); } } }
@Test public void testAvroTileSerialization () throws Exception { serialize(AVRO, SCALAR_DATA, _scalarData, new PrimitiveAvroSerializer<>(Double.class, CodecFactory.bzip2Codec())); }
@Test public void testAvroVectorTileDeSerialization () throws Exception { deserialize(AVRO, VECTOR_DATA, _vectorData, new PrimitiveArrayAvroSerializer<>(Double.class, CodecFactory.bzip2Codec())); }
@Test public void testAvroVectorTileSerialization () throws Exception { serialize(AVRO, VECTOR_DATA, _vectorData, new PrimitiveArrayAvroSerializer<>(Double.class, CodecFactory.bzip2Codec())); }
@Test public void testAvroTileDeSerialization () throws Exception { deserialize(AVRO, SCALAR_DATA, _scalarData, new PrimitiveAvroSerializer<>(Double.class, CodecFactory.bzip2Codec())); }
case Avro: if (null == _serializer || !(_serializer instanceof PrimitiveAvroSerializer)) { _serializer = new PrimitiveAvroSerializer<Double>(Double.class, CodecFactory.bzip2Codec()); _bucketSerializer = null; changed = true; case AvroBucketted: if (null == _bucketSerializer|| !(_bucketSerializer instanceof PrimitiveArrayAvroSerializer)) { _bucketSerializer = new PrimitiveArrayAvroSerializer<>(Double.class, CodecFactory.bzip2Codec()); _serializer = null; changed = true;
TileSerializer<Double> dSerializer = new PrimitiveAvroSerializer<>(Double.class, CodecFactory.bzip2Codec()); String singleSliceTable = "twitter-ebola-p1-heatmap"; long startSingle = System.currentTimeMillis();