/** * @return name converted to bytes. */ public byte[] getNameInBytes() { return Bytes.toBytes(toString()); }
/** * Find and return the name of data block encoder for the given id. * @param encoderId id of data block encoder * @return name, same as used in options in column family */ public static String getNameFromId(short encoderId) { return getEncodingById(encoderId).toString(); }
encoding = DataBlockEncoding.NONE; dataBlockEncodingConfigValue.append(URLEncoder.encode(encoding.toString(), "UTF-8"));
algo.toString(), pread, encoding); Path path = new Path(TEST_UTIL.getDataTestDir(), "blocks_v2_" + algo + "_" + encoding.toString()); FSDataOutputStream os = fs.create(path); HFileDataBlockEncoder dataBlockEncoder = (encoding != DataBlockEncoding.NONE) ?
encoding = DataBlockEncoding.NONE; dataBlockEncodingConfigValue.append(URLEncoder.encode(encoding.toString(), "UTF-8"));
/** * @return name converted to bytes. */ public byte[] getNameInBytes() { return Bytes.toBytes(toString()); }
/** * @return name converted to bytes. */ public byte[] getNameInBytes() { return Bytes.toBytes(toString()); }
/** * @return name converted to bytes. */ public byte[] getNameInBytes() { return Bytes.toBytes(toString()); }
/** * @return name converted to bytes. */ public byte[] getNameInBytes() { return Bytes.toBytes(toString()); }
/** * Find and return the name of data block encoder for the given id. * @param encoderId id of data block encoder * @return name, same as used in options in column family */ public static String getNameFromId(short encoderId) { return idToEncoding.get(encoderId).toString(); }
/** * Find and return the name of data block encoder for the given id. * @param encoderId id of data block encoder * @return name, same as used in options in column family */ public static String getNameFromId(short encoderId) { return idToEncoding.get(encoderId).toString(); }
/** * Set data block encoding algorithm used in block cache. * @param type What kind of data block encoding will be used. * @return this (for chained invocation) */ public HColumnDescriptor setDataBlockEncoding(DataBlockEncoding type) { String name; if (type != null) { name = type.toString(); } else { name = DataBlockEncoding.NONE.toString(); } return setValue(DATA_BLOCK_ENCODING, name); }
/** * Set data block encoding algorithm used in block cache. * @param type What kind of data block encoding will be used. * @return this (for chained invocation) */ public HColumnDescriptor setDataBlockEncoding(DataBlockEncoding type) { String name; if (type != null) { name = type.toString(); } else { name = DataBlockEncoding.NONE.toString(); } return setValue(DATA_BLOCK_ENCODING, name); }
/** * Find and return the name of data block encoder for the given id. * @param encoderId id of data block encoder * @return name, same as used in options in column family */ public static String getNameFromId(short encoderId) { return getEncodingById(encoderId).toString(); }
/** * Find and return the name of data block encoder for the given id. * @param encoderId id of data block encoder * @return name, same as used in options in column family */ public static String getNameFromId(short encoderId) { return getEncodingById(encoderId).toString(); }
private ByteBuffer encodeBufferToHFileBlockBuffer(ByteBuffer in, DataBlockEncoding algo, boolean includesMemstoreTS, byte[] dummyHeader) { ByteArrayOutputStream encodedStream = new ByteArrayOutputStream(); DataOutputStream dataOut = new DataOutputStream(encodedStream); DataBlockEncoder encoder = algo.getEncoder(); try { encodedStream.write(dummyHeader); algo.writeIdInBytes(dataOut); encoder.compressKeyValues(dataOut, in, includesMemstoreTS); } catch (IOException e) { throw new RuntimeException(String.format("Bug in data block encoder " + "'%s', it probably requested too much data", algo.toString()), e); } return ByteBuffer.wrap(encodedStream.toByteArray()); }
encoding = DataBlockEncoding.NONE; dataBlockEncodingConfigValue.append(URLEncoder.encode(encoding.toString(), "UTF-8"));
encoding = DataBlockEncoding.NONE; dataBlockEncodingConfigValue.append(URLEncoder.encode(encoding.toString(), "UTF-8"));
encoding = DataBlockEncoding.NONE; dataBlockEncodingConfigValue.append(URLEncoder.encode(encoding.toString(), "UTF-8"));
encoding = DataBlockEncoding.NONE; dataBlockEncodingConfigValue.append(URLEncoder.encode(encoding.toString(), "UTF-8"));