public static Algorithm getCompressionAlgorithmByName(String compressName) { Algorithm[] algos = Algorithm.class.getEnumConstants(); for (Algorithm a : algos) { if (a.getName().equals(compressName)) { return a; } } throw new IllegalArgumentException( "Unsupported compression algorithm name: " + compressName); }
static String[] getSupportedAlgorithms() { Algorithm[] algos = Algorithm.class.getEnumConstants(); ArrayList<String> ret = new ArrayList<String>(); for (Algorithm a : algos) { if (a.isSupported()) { ret.add(a.getName()); } } return ret.toArray(new String[ret.size()]); } }
BlockRegion region = e.getValue().getRegion(); String blkCompression = e.getValue().getCompressionAlgorithm().getName(); out.printf("%s %s %s %s %s%n", Align.format(blkName, nameWidth, Align.LEFT), Align.format(region.getOffset(), offsetWidth,
/** * Get the name of the default compression algorithm. * * @return the name of the default compression algorithm. */ public String getDefaultCompressionName() { return dataIndex.getDefaultCompressionAlgorithm().getName(); }
static Algorithm getCompressionAlgorithmByName(String compressName) { Algorithm[] algos = Algorithm.class.getEnumConstants(); for (Algorithm a : algos) { if (a.getName().equals(compressName)) { return a; } } throw new IllegalArgumentException( "Unsupported compression algorithm name: " + compressName); }
public void write(DataOutput out) throws IOException { Utils.writeString(out, defaultCompressionAlgorithm.getName()); Utils.writeVInt(out, listRegions.size()); for (BlockRegion region : listRegions) { region.write(out); } } }
public void write(DataOutput out) throws IOException { Utils.writeString(out, defaultPrefix + metaName); Utils.writeString(out, compressionAlgorithm.getName()); region.write(out); } }
static String[] getSupportedAlgorithms() { Algorithm[] algos = Algorithm.class.getEnumConstants(); ArrayList<String> ret = new ArrayList<String>(); for (Algorithm a : algos) { if (a.isSupported()) { ret.add(a.getName()); } } return ret.toArray(new String[ret.size()]); } }
public void write(DataOutput out) throws IOException { Utils.writeString(out, defaultCompressionAlgorithm.getName()); Utils.writeVInt(out, listRegions.size()); for (BlockRegion region : listRegions) { region.write(out); } } }
static String[] getSupportedAlgorithms() { Algorithm[] algos = Algorithm.class.getEnumConstants(); ArrayList<String> ret = new ArrayList<String>(); for (Algorithm a : algos) { if (a.isSupported()) { ret.add(a.getName()); } } return ret.toArray(new String[ret.size()]); } }
static Algorithm getCompressionAlgorithmByName(String compressName) { Algorithm[] algos = Algorithm.class.getEnumConstants(); for (Algorithm a : algos) { if (a.getName().equals(compressName)) { return a; } } throw new IllegalArgumentException( "Unsupported compression algorithm name: " + compressName); }
public void write(DataOutput out) throws IOException { Utils.writeString(out, defaultCompressionAlgorithm.getName()); Utils.writeVInt(out, listRegions.size()); for (BlockRegion region : listRegions) { region.write(out); } } }
public void write(DataOutput out) throws IOException { Utils.writeString(out, defaultPrefix + metaName); Utils.writeString(out, compressionAlgorithm.getName()); region.write(out); } }
/** * Test non-compression codec, using the same test cases as in the ByteArrays. */ @Override public void setUp() throws IOException { init(Compression.Algorithm.NONE.getName(), "memcmp", 24, 24); super.setUp(); } }
@Test public void testFailureCompressionNotWorking() throws IOException { if (skip) return; long rawDataSize = writeRecords(10 * records1stBlock, false); if (!compression.equalsIgnoreCase(Compression.Algorithm.NONE.getName())) { Assert.assertTrue(out.getPos() < rawDataSize); } closeOutput(); }
/** * Test non-compression codec, using the same test cases as in the ByteArrays. */ @Override public void setUp() throws IOException { init(Compression.Algorithm.GZ.getName(), "jclass: org.apache.hadoop.io.file.tfile.MyComparator"); super.setUp(); } }
public String getCompressionName() { return compressAlgo.getName(); }
public void write(DataOutput out) throws IOException { Utils.writeString(out, defaultCompressionAlgorithm.getName()); Utils.writeVInt(out, listRegions.size()); for (BlockRegion region : listRegions) { region.write(out); } } }
public void write(DataOutput out) throws IOException { Utils.writeString(out, defaultPrefix + metaName); Utils.writeString(out, compressionAlgorithm.getName()); region.write(out); } }
/** * Get the name of the default compression algorithm. * * @return the name of the default compression algorithm. */ public String getDefaultCompressionName() { return dataIndex.getDefaultCompressionAlgorithm().getName(); }