public DataIndex(String defaultCompressionAlgorithmName) { this.defaultCompressionAlgorithm = Compression .getCompressionAlgorithmByName(defaultCompressionAlgorithmName); listRegions = new ArrayList<BlockRegion>(); }
/** * Get names of supported compression algorithms. The names are acceptable by * TFile.Writer. * * @return Array of strings, each represents a supported compression * algorithm. Currently, the following compression algorithms are * supported. * <ul> * <li>"none" - No compression. * <li>"lzo" - LZO compression. * <li>"gz" - GZIP compression. * </ul> */ public static String[] getSupportedCompressionAlgorithms() { return Compression.getSupportedAlgorithms(); }
/** * Create a Meta Block and obtain an output stream for adding data into the * block. There can only be one BlockAppender stream active at any time. * Regular Blocks may not be created after the first Meta Blocks. The caller * must call BlockAppender.close() to conclude the block creation. * * @param name * The name of the Meta Block. The name must not conflict with * existing Meta Blocks. * @param compressionName * The name of the compression algorithm to be used. * @return The BlockAppender stream * @throws IOException * @throws MetaBlockAlreadyExists * If the meta block with the name already exists. */ public BlockAppender prepareMetaBlock(String name, String compressionName) throws IOException, MetaBlockAlreadyExists { return prepareMetaBlock(name, Compression .getCompressionAlgorithmByName(compressionName)); }
/** * Get names of supported compression algorithms. The names are acceptable by * TFile.Writer. * * @return Array of strings, each represents a supported compression * algorithm. Currently, the following compression algorithms are * supported. * <ul> * <li>"none" - No compression. * <li>"lzo" - LZO compression. * <li>"gz" - GZIP compression. * </ul> */ public static String[] getSupportedCompressionAlgorithms() { return Compression.getSupportedAlgorithms(); }
public MetaIndexEntry(DataInput in) throws IOException { String fullMetaName = Utils.readString(in); if (fullMetaName.startsWith(defaultPrefix)) { metaName = fullMetaName.substring(defaultPrefix.length(), fullMetaName .length()); } else { throw new IOException("Corrupted Meta region Index"); } compressionAlgorithm = Compression.getCompressionAlgorithmByName(Utils.readString(in)); region = new BlockRegion(in); }
/** * Get names of supported compression algorithms. The names are acceptable by * TFile.Writer. * * @return Array of strings, each represents a supported compression * algorithm. Currently, the following compression algorithms are * supported. * <ul> * <li>"none" - No compression. * <li>"lzo" - LZO compression. * <li>"gz" - GZIP compression. * </ul> */ public static String[] getSupportedCompressionAlgorithms() { return Compression.getSupportedAlgorithms(); }
public DataIndex(DataInput in) throws IOException { defaultCompressionAlgorithm = Compression.getCompressionAlgorithmByName(Utils.readString(in)); int n = Utils.readVInt(in); listRegions = new ArrayList<BlockRegion>(n); for (int i = 0; i < n; i++) { BlockRegion region = new BlockRegion(in); listRegions.add(region); } }
/** * Get names of supported compression algorithms. The names are acceptable by * TFile.Writer. * * @return Array of strings, each represents a supported compression * algorithm. Currently, the following compression algorithms are * supported. * <ul> * <li>"none" - No compression. * <li>"lzo" - LZO compression. * <li>"gz" - GZIP compression. * </ul> */ public static String[] getSupportedCompressionAlgorithms() { return Compression.getSupportedAlgorithms(); }
public DataIndex(String defaultCompressionAlgorithmName) { this.defaultCompressionAlgorithm = Compression .getCompressionAlgorithmByName(defaultCompressionAlgorithmName); listRegions = new ArrayList<BlockRegion>(); }
/** * Get names of supported compression algorithms. The names are acceptable by * TFile.Writer. * * @return Array of strings, each represents a supported compression * algorithm. Currently, the following compression algorithms are * supported. * <ul> * <li>"none" - No compression. * <li>"lzo" - LZO compression. * <li>"gz" - GZIP compression. * </ul> */ public static String[] getSupportedCompressionAlgorithms() { return Compression.getSupportedAlgorithms(); }
public DataIndex(String defaultCompressionAlgorithmName) { this.defaultCompressionAlgorithm = Compression .getCompressionAlgorithmByName(defaultCompressionAlgorithmName); listRegions = new ArrayList<BlockRegion>(); }
/** * Get names of supported compression algorithms. The names are acceptable by * TFile.Writer. * * @return Array of strings, each represents a supported compression * algorithm. Currently, the following compression algorithms are * supported. * <ul> * <li>"none" - No compression. * <li>"lzo" - LZO compression. * <li>"gz" - GZIP compression. * </ul> */ public static String[] getSupportedCompressionAlgorithms() { return Compression.getSupportedAlgorithms(); }
public DataIndex(String defaultCompressionAlgorithmName) { this.defaultCompressionAlgorithm = Compression .getCompressionAlgorithmByName(defaultCompressionAlgorithmName); listRegions = new ArrayList<BlockRegion>(); }
/** * Get names of supported compression algorithms. The names are acceptable by * TFile.Writer. * * @return Array of strings, each represents a supported compression * algorithm. Currently, the following compression algorithms are * supported. * <ul> * <li>"none" - No compression. * <li>"lzo" - LZO compression. * <li>"gz" - GZIP compression. * </ul> */ public static String[] getSupportedCompressionAlgorithms() { return Compression.getSupportedAlgorithms(); }
public DataIndex(String defaultCompressionAlgorithmName) { this.defaultCompressionAlgorithm = Compression .getCompressionAlgorithmByName(defaultCompressionAlgorithmName); listRegions = new ArrayList<BlockRegion>(); }
public DataIndex(String defaultCompressionAlgorithmName) { this.defaultCompressionAlgorithm = Compression .getCompressionAlgorithmByName(defaultCompressionAlgorithmName); listRegions = new ArrayList<BlockRegion>(); }
public DataIndex(String defaultCompressionAlgorithmName) { this.defaultCompressionAlgorithm = Compression .getCompressionAlgorithmByName(defaultCompressionAlgorithmName); listRegions = new ArrayList<BlockRegion>(); }
/** * Create a Meta Block and obtain an output stream for adding data into the * block. There can only be one BlockAppender stream active at any time. * Regular Blocks may not be created after the first Meta Blocks. The caller * must call BlockAppender.close() to conclude the block creation. * * @param name * The name of the Meta Block. The name must not conflict with * existing Meta Blocks. * @param compressionName * The name of the compression algorithm to be used. * @return The BlockAppender stream * @throws IOException * @throws MetaBlockAlreadyExists * If the meta block with the name already exists. */ public BlockAppender prepareMetaBlock(String name, String compressionName) throws IOException, MetaBlockAlreadyExists { return prepareMetaBlock(name, Compression .getCompressionAlgorithmByName(compressionName)); }
/** * Create a Meta Block and obtain an output stream for adding data into the * block. There can only be one BlockAppender stream active at any time. * Regular Blocks may not be created after the first Meta Blocks. The caller * must call BlockAppender.close() to conclude the block creation. * * @param name * The name of the Meta Block. The name must not conflict with * existing Meta Blocks. * @param compressionName * The name of the compression algorithm to be used. * @return The BlockAppender stream * @throws IOException * @throws MetaBlockAlreadyExists * If the meta block with the name already exists. */ public BlockAppender prepareMetaBlock(String name, String compressionName) throws IOException, MetaBlockAlreadyExists { return prepareMetaBlock(name, Compression .getCompressionAlgorithmByName(compressionName)); }
/** * Create a Meta Block and obtain an output stream for adding data into the * block. There can only be one BlockAppender stream active at any time. * Regular Blocks may not be created after the first Meta Blocks. The caller * must call BlockAppender.close() to conclude the block creation. * * @param name * The name of the Meta Block. The name must not conflict with * existing Meta Blocks. * @param compressionName * The name of the compression algorithm to be used. * @return The BlockAppender stream * @throws IOException * @throws MetaBlockAlreadyExists * If the meta block with the name already exists. */ public BlockAppender prepareMetaBlock(String name, String compressionName) throws IOException, MetaBlockAlreadyExists { return prepareMetaBlock(name, Compression .getCompressionAlgorithmByName(compressionName)); }