name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hbase_Get_getFamilyMap_rdh | /**
* Method for retrieving the get's familyMap
*/
public Map<byte[], NavigableSet<byte[]>> getFamilyMap() {
return this.familyMap;
} | 3.26 |
hbase_Get_addFamily_rdh | /**
* Get all columns from the specified family.
* <p>
* Overrides previous calls to addColumn for this family.
*
* @param family
* family name
* @return the Get object
*/
public Get addFamily(byte[] family) {
familyMap.remove(family);
familyMap.put(family, null);
return
this;
} | 3.26 |
hbase_Get_getRowOffsetPerColumnFamily_rdh | /**
* Method for retrieving the get's offset per row per column family (#kvs to be skipped)
*
* @return the row offset
*/
public int getRowOffsetPerColumnFamily() {
return this.storeOffset;
} | 3.26 |
hbase_Get_getTimeRange_rdh | /**
* Method for retrieving the get's TimeRange
*/
public TimeRange getTimeRange() {
return this.tr;
} | 3.26 |
hbase_Get_setRowOffsetPerColumnFamily_rdh | /**
* Set offset for the row per Column Family. This offset is only within a particular row/CF
* combination. It gets reset back to zero when we move to the next row or CF.
*
* @param offset
* is the number of kvs that will be skipped.
* @return this for invocation chaining
*/public Get setRowOffsetPerColumnFa... | 3.26 |
hbase_Get_getFingerprint_rdh | /**
* Compile the table and column family (i.e. schema) information into a String. Useful for parsing
* and aggregation by debugging, logging, and administration tools.
*/
@Override
public Map<String, Object> getFingerprint() {
Map<String, Object> map = new HashMap<>();
List<String> families = new ArrayLis... | 3.26 |
hbase_Get_readAllVersions_rdh | /**
* Get all available versions.
*
* @return this for invocation chaining
*/
public Get readAllVersions() {
this.maxVersions = Integer.MAX_VALUE;
return this;
} | 3.26 |
hbase_Get_addColumn_rdh | /**
* Get the column from the specific family with the specified qualifier.
* <p>
* Overrides previous calls to addFamily for this family.
*
* @param family
* family name
* @param qualifier
* column qualifier
* @return the Get objec
*/
public Get addColumn(byte[] family, byte[] qualifier) {
NavigableS... | 3.26 |
hbase_Get_setTimeRange_rdh | /**
* Get versions of columns only within the specified timestamp range, [minStamp, maxStamp).
*
* @param minStamp
* minimum timestamp value, inclusive
* @param maxStamp
* maximum timestamp value, exclusive
* @return this for invocation chaining
*/
public Get setTimeRange(long
minStamp, long maxStamp) throw... | 3.26 |
hbase_Get_familySet_rdh | /**
* Method for retrieving the keys in the familyMap
*
* @return keys in the current familyMap
*/
public Set<byte[]> familySet() {
return this.familyMap.keySet();
} | 3.26 |
hbase_Get_m2_rdh | /**
* Get whether blocks should be cached for this Get.
*
* @return true if default caching should be used, false if blocks should not be cached
*/
public boolean m2() {
return cacheBlocks;
} | 3.26 |
hbase_Get_setTimestamp_rdh | /**
* Get versions of columns with the specified timestamp.
*
* @param timestamp
* version timestamp
* @return this for invocation chaining
*/
public Get setTimestamp(long timestamp) {
try {
tr = TimeRange.at(timestamp);} catch (Exception e) {
// This should n... | 3.26 |
hbase_Get_toMap_rdh | /**
* Compile the details beyond the scope of getFingerprint (row, columns, timestamps, etc.) into a
* Map along with the fingerprinted information. Useful for debugging, logging, and administration
* tools.
*
* @param maxCols
* a limit on the number of columns output prior to truncation
*/
@Override
public Ma... | 3.26 |
hbase_OrderedBytes_decodeInt16_rdh | /**
* Decode an {@code int16} value.
*
* @see #encodeInt16(PositionedByteRange, short, Order)
*/
public static short decodeInt16(PositionedByteRange src) {
final byte header = src.get();
assert (header == FIXED_INT16) || (header == DESCENDING.apply(FIXED_INT16));
Order ord = (header == FIXED_INT16) ? ASCENDING :... | 3.26 |
hbase_OrderedBytes_skipVaruint64_rdh | /**
* Skip {@code src} over the encoded varuint64.
*
* @param src
* source buffer
* @param cmp
* if true, parse the compliment of the value.
* @return the number of bytes skipped.
*/
static int skipVaruint64(PositionedByteRange src, boolean cmp) {
final int len = lengthVaruint64(src, cmp);
src.set... | 3.26 |
hbase_OrderedBytes_putUint32_rdh | /**
* Write a 32-bit unsigned integer to {@code dst} as 4 big-endian bytes.
*
* @return number of bytes written.
*/
private static int putUint32(PositionedByteRange dst, int val) {
dst.put(((byte) (val >>> 24))).put(((byte) (val >>> 16))).put(((byte) (val >>> 8))).put(((byte) (val)));
return 4;
} | 3.26 |
hbase_OrderedBytes_isNumericZero_rdh | /**
* Return true when the next encoded value in {@code src} uses Numeric encoding and is {@code 0},
* false otherwise.
*/ public static boolean isNumericZero(PositionedByteRange src) {
return ZERO == ((-1)
== Integer.signum(src.peek()) ? DESCENDING : ASCENDING).apply(src.peek());
} | 3.26 |
hbase_OrderedBytes_encodeNumeric_rdh | /**
* Encode a numerical value using the variable-length encoding. If the number of significant
* digits of the value exceeds the {@link OrderedBytes#MAX_PRECISION}, the exceeding part will be
* lost.
*
* @param dst
* The destination to which encoded digits are written.
* @param val
* The value to encode.
... | 3.26 |
hbase_OrderedBytes_isEncodedValue_rdh | /**
* Returns true when {@code src} appears to be positioned an encoded value, false otherwise.
*/
public static boolean isEncodedValue(PositionedByteRange src) {
return (((((((((isNull(src) || m3(src)) || isFixedInt8(src)) || isFixedInt16(src)) || isFixedInt32(src)) || m5(src)) || isFixedFloat32(src)) || isFixedF... | 3.26 |
hbase_OrderedBytes_encodeInt64_rdh | /**
* Encode an {@code int64} value using the fixed-length encoding.
* <p>
* This format ensures that all longs sort in their natural order, as they would sort when using
* signed long comparison.
* </p>
* <p>
* All Longs are serialized to an 8-byte, fixed-width sortable byte format. Serialization is
* performe... | 3.26 |
hbase_OrderedBytes_encodeBlobCopy_rdh | /**
* Encode a Blob value as a byte-for-byte copy. BlobCopy encoding in DESCENDING order is NULL
* terminated so as to preserve proper sorting of {@code []} and so it does not support
* {@code 0x00} in the value.
*
* @return the number of bytes written.
* @throws IllegalArgumentException
* when {@code ord} is ... | 3.26 |
hbase_OrderedBytes_isBlobCopy_rdh | /**
* Return true when the next encoded value in {@code src} uses BlobCopy encoding, false otherwise.
*/
public static boolean isBlobCopy(PositionedByteRange src) {
return BLOB_COPY == ((-1) == Integer.signum(src.peek()) ? DESCENDING : ASCENDING).apply(src.peek());
} | 3.26 |
hbase_OrderedBytes_encodeToCentimal_rdh | /**
* Encode a value val in [0.01, 1.0) into Centimals. Util function for
* {@link OrderedBytes#encodeNumericLarge(PositionedByteRange, BigDecimal)} and
* {@link OrderedBytes#encodeNumericSmall(PositionedByteRange, BigDecimal)}
*
* @param dst
* The destination to which encoded digits are written.
* @param val
... | 3.26 |
hbase_OrderedBytes_m3_rdh | /**
* Return true when the next encoded value in {@code src} uses Numeric encoding, false otherwise.
* {@code NaN}, {@code +/-Inf} are valid Numeric values.
*/
public static boolean m3(PositionedByteRange src) {
byte x = ((-1) == Integer.signum(src.peek()) ? DESCENDING : ASCENDING).apply(src.peek());
return (x >= ... | 3.26 |
hbase_OrderedBytes_decodeFloat64_rdh | /**
* Decode a 64-bit floating point value using the fixed-length encoding.
*
* @see #encodeFloat64(PositionedByteRange, double, Order)
*/
public static double decodeFloat64(PositionedByteRange src) {
final byte header = src.get();
assert (header == FIXED_FLOAT64) || (header == DESCENDING.apply(FIXED_FLOAT64));
Ord... | 3.26 |
hbase_OrderedBytes_putVaruint64_rdh | /**
* Encode an unsigned 64-bit unsigned integer {@code val} into {@code dst}.
*
* @param dst
* The destination to which encoded bytes are written.
* @param val
* The value to write.
* @param comp
* Compliment the encoded value when {@code comp} is true.
* @return number of bytes written.
*/
static int ... | 3.26 |
hbase_OrderedBytes_decodeInt64_rdh | /**
* Decode an {@code int64} value.
*
* @see #encodeInt64(PositionedByteRange, long, Order)
*/
public static long decodeInt64(PositionedByteRange src) {
final byte header = src.get();
assert (header == f1) || (header == DESCENDING.apply(f1));
Order ord = (header == f1) ? ASCENDING : DESCENDING;
long val = (ord.... | 3.26 |
hbase_OrderedBytes_isFixedFloat64_rdh | /**
* Return true when the next encoded value in {@code src} uses fixed-width Float64 encoding, false
* otherwise.
*/
public static boolean isFixedFloat64(PositionedByteRange src) {
return FIXED_FLOAT64 == ((-1) == Integer.signum(src.peek()) ? DESCENDING : ASCENDING).apply(src.peek());
} | 3.26 |
hbase_OrderedBytes_encodeInt16_rdh | /**
* Encode an {@code int16} value using the fixed-length encoding.
*
* @return the number of bytes written.
* @see #encodeInt64(PositionedByteRange, long, Order)
* @see #decodeInt16(PositionedByteRange)
*/
public static int encodeInt16(PositionedByteRange dst, short val, Order ord) {
final int offset = dst.get... | 3.26 |
hbase_OrderedBytes_isFixedInt8_rdh | /**
* Return true when the next encoded value in {@code src} uses fixed-width Int8 encoding, false
* otherwise.
*/
public static boolean isFixedInt8(PositionedByteRange src) {
return FIXED_INT8 == ((-1) == Integer.signum(src.peek()) ? DESCENDING : ASCENDING).apply(src.peek());
} | 3.26 |
hbase_OrderedBytes_encodeNumericSmall_rdh | /**
* <p>
* Encode the small magnitude floating point number {@code val} using the key encoding. The caller
* guarantees that 1.0 > abs(val) > 0.0.
* </p>
* <p>
* A floating point value is encoded as an integer exponent {@code E} and a mantissa {@code M}.
* The original value is equal to {@code (M * 100^E)}. {@c... | 3.26 |
hbase_OrderedBytes_unexpectedHeader_rdh | /**
* Creates the standard exception when the encoded header byte is unexpected for the decoding
* context.
*
* @param header
* value used in error message.
*/
private static IllegalArgumentException unexpectedHeader(byte header) {
throw new IllegalArgumentException("unexpected value in first byte: 0x" + Lo... | 3.26 |
hbase_OrderedBytes_isFixedFloat32_rdh | /**
* Return true when the next encoded value in {@code src} uses fixed-width Float32 encoding, false
* otherwise.
*/
public static boolean isFixedFloat32(PositionedByteRange src) {
return FIXED_FLOAT32 == ((-1) == Integer.signum(src.peek()) ? DESCENDING : ASCENDING).apply(src.peek());
} | 3.26 |
hbase_OrderedBytes_decodeInt32_rdh | /**
* Decode an {@code int32} value.
*
* @see #encodeInt32(PositionedByteRange, int, Order)
*/
public static int decodeInt32(PositionedByteRange src) {
final byte header = src.get();
assert (header == FIXED_INT32) || (header == DESCENDING.apply(FIXED_INT32));
Order ord = (header == FIXED_INT32) ? ASCENDING : DESCE... | 3.26 |
hbase_OrderedBytes_blobVarEncodedLength_rdh | /**
* Calculate the expected BlobVar encoded length based on unencoded length.
*/
public static int blobVarEncodedLength(int len) {
if (0 == len)
return
2;
// + 1-byte header
else// 1-byte header + 1-byte terminator
... | 3.26 |
hbase_OrderedBytes_skipSignificand_rdh | /**
* Skip {@code src} over the significand bytes.
*
* @param src
* The source from which to read encoded digits.
* @param comp
* Treat encoded bytes as compliments when {@code comp} is true.
* @return the number of bytes skipped.
*/
private static int skipSignificand(PositionedByteRange src, boolean comp) ... | 3.26 |
hbase_OrderedBytes_decodeFloat32_rdh | /**
* Decode a 32-bit floating point value using the fixed-length encoding.
*
* @see #encodeFloat32(PositionedByteRange, float, Order)
*/
public static float decodeFloat32(PositionedByteRange src)
{
final byte
header = src.get();
assert (header == FIXED_FLOAT32) || (header == DESCENDING.apply(FIXED_FLOAT32));
Order... | 3.26 |
hbase_OrderedBytes_lengthVaruint64_rdh | /**
* Inspect {@code src} for an encoded varuint64 for its length in bytes. Preserves the state of
* {@code src}.
*
* @param src
* source buffer
* @param comp
* if true, parse the compliment of the value.
* @return the number of bytes consumed by this value.
*/
static int lengthVaruint64(PositionedByteRa... | 3.26 |
hbase_OrderedBytes_isText_rdh | /**
* Return true when the next encoded value in {@code src} uses Text encoding, false otherwise.
*/
public static boolean isText(PositionedByteRange src) {
return TEXT == ((-1) == Integer.signum(src.peek()) ? DESCENDING : ASCENDING).apply(src.peek());
} | 3.26 |
hbase_OrderedBytes_isNull_rdh | /**
* Return true when the next encoded value in {@code src} is null, false otherwise.
*/
public static boolean isNull(PositionedByteRange src) {
return NULL == ((-1) == Integer.signum(src.peek()) ? DESCENDING : ASCENDING).apply(src.peek());
} | 3.26 |
hbase_OrderedBytes_encodeInt32_rdh | /**
* Encode an {@code int32} value using the fixed-length encoding.
*
* @return the number of bytes written.
* @see #encodeInt64(PositionedByteRange, long, Order)
* @see #decodeInt32(PositionedByteRange)
*/
public static int encodeInt32(PositionedByteRange dst, int val, Order ord) {
final int offset = dst.getOff... | 3.26 |
hbase_OrderedBytes_decodeSignificand_rdh | /**
* Read significand digits from {@code src} according to the magnitude of {@code e}.
*
* @param src
* The source from which to read encoded digits.
* @param e
* The magnitude of the first digit read.
* @param comp
* Treat encoded bytes as compliments when {@code comp} is true.
* @return The decoded va... | 3.26 |
hbase_OrderedBytes_normalize_rdh | /**
* Strip all trailing zeros to ensure that no digit will be zero and round using our default
* context to ensure precision doesn't exceed max allowed. From Phoenix's {@code NumberUtil}.
*
* @return new {@link BigDecimal} instance
*/
static BigDecimal normalize(BigDecimal val) {
return null == val ? null :... | 3.26 |
hbase_OrderedBytes_m2_rdh | /**
* Decode a blob value that was encoded using BlobVar encoding.
*/
public static byte[] m2(PositionedByteRange src) {
final byte header = src.get();
if
((header == NULL) || (header == DESCENDING.apply(NULL))) {
return null;}
assert (header == BLOB_VAR) || (header == DESCENDING.apply(BLOB_... | 3.26 |
hbase_OrderedBytes_isFixedInt16_rdh | /**
* Return true when the next encoded value in {@code src} uses fixed-width Int16 encoding, false
* otherwise.
*/
public static boolean isFixedInt16(PositionedByteRange src) {
return FIXED_INT16 == ((-1)
== Integer.signum(src.peek()) ? DESCENDING : ASCENDING).apply(src.peek());
} | 3.26 |
hbase_OrderedBytes_isBlobVar_rdh | /**
* Return true when the next encoded value in {@code src} uses BlobVar encoding, false otherwise.
*/
public static boolean isBlobVar(PositionedByteRange src) {
return BLOB_VAR == ((-1) == Integer.signum(src.peek()) ? DESCENDING : ASCENDING).apply(src.peek());} | 3.26 |
hbase_OrderedBytes_encodeString_rdh | /**
* Encode a String value. String encoding is 0x00-terminated and so it does not support
* {@code \u0000} codepoints in the value.
*
* @param dst
* The destination to which the encoded value is written.
* @param val
* The value to encode.
* @param ord
* The {@link Order} to respect while encoding {@cod... | 3.26 |
hbase_OrderedBytes_decodeInt8_rdh | /**
* Decode an {@code int8} value.
*
* @see #encodeInt8(PositionedByteRange, byte, Order)
*/public static byte decodeInt8(PositionedByteRange src) {
final byte header = src.get();
assert (header == FIXED_INT8) ||
(header ==
DESCENDING.apply(FIXED_INT8));
Order ord = (header == FIXED_INT8) ? ASCENDING : DESCENDING;... | 3.26 |
hbase_OrderedBytes_m4_rdh | /**
* Return true when the next encoded value in {@code src} uses Numeric encoding and is
* {@code Infinite}, false otherwise.
*/
public static boolean m4(PositionedByteRange src) {
byte v136 = ((-1) == Integer.signum(src.peek())
? DESCENDING : ASCENDING).apply(src.peek());
return (f0 == v136) || (POS_INF == v136);
... | 3.26 |
hbase_OrderedBytes_m0_rdh | /**
* Perform unsigned comparison between two long values. Conforms to the same interface as
* {@link org.apache.hadoop.hbase.CellComparator}.
*/
private static int m0(long x1, long x2) {
int cmp;
if ((cmp = (x1 < x2) ? -1 : x1 == x2 ? 0 : 1) == 0)
return 0;
// invert the re... | 3.26 |
hbase_OrderedBytes_encodeFloat64_rdh | /**
* Encode a 64-bit floating point value using the fixed-length encoding.
* <p>
* This format ensures the following total ordering of floating point values:
* Double.NEGATIVE_INFINITY < -Double.MAX_VALUE < ... < -Double.MIN_VALUE < -0.0 <
* +0.0; < Double.MIN_VALUE < ... < Double.MAX_VALU... | 3.26 |
hbase_OrderedBytes_encodeBlobVar_rdh | /**
* Encode a blob value using a modified varint encoding scheme.
*
* @return the number of bytes written.
* @see #encodeBlobVar(PositionedByteRange, byte[], int, int, Order)
*/
public static int encodeBlobVar(PositionedByteRange dst, byte[] val, Order ord) {
return encodeBlobVar(dst, val, 0, null != val ? v... | 3.26 |
hbase_OrderedBytes_encodeFloat32_rdh | /**
* Encode a 32-bit floating point value using the fixed-length encoding. Encoding format is
* described at length in {@link #encodeFloat64(PositionedByteRange, double, Order)}.
*
* @return the number of bytes written.
* @see #decodeFloat32(PositionedByteRange)
* @see #encodeFloat64(PositionedByteRange, double,... | 3.26 |
hbase_OrderedBytes_encodeNull_rdh | /**
* Encode a null value.
*
* @param dst
* The destination to which encoded digits are written.
* @param ord
* The {@link Order} to respect while encoding {@code val}.
* @return the number of bytes written.
*/
public static int encodeNull(PositionedByteRange dst, Order ord) {
dst.put(ord.apply(NULL));
retu... | 3.26 |
hbase_OrderedBytes_decodeBlobCopy_rdh | /**
* Decode a Blob value, byte-for-byte copy.
*
* @see #encodeBlobCopy(PositionedByteRange, byte[], int, int, Order)
*/
public static byte[] decodeBlobCopy(PositionedByteRange src) {
byte header
= src.get();
if ((header == NULL) || (header == DESCENDING.apply(NULL))) {
return null;
}
assert (header == BLOB_COPY) ... | 3.26 |
hbase_OrderedBytes_blobVarDecodedLength_rdh | /**
* Calculate the expected BlobVar decoded length based on encoded length.
*/ static int blobVarDecodedLength(int len) {
return ((len - 1)// 1-byte header
* 7)// 7-bits of payload per encoded byte
/ 8;// 8-bits per byte
} | 3.26 |
hbase_OrderedBytes_decodeNumericAsLong_rdh | /**
* Decode a primitive {@code long} value from the Numeric encoding. Numeric encoding is based on
* {@link BigDecimal}; in the event the encoded value is larger than can be represented in a
* {@code long}, this method performs an implicit narrowing co... | 3.26 |
hbase_OrderedBytes_isFixedInt32_rdh | /**
* Return true when the next encoded value in {@code src} uses fixed-width Int32 encoding, false
* otherwise.
*/
public static boolean isFixedInt32(PositionedByteRange src) {
return FIXED_INT32 == ((-1) == Integer.signum(src.peek()) ? DESCENDING : ASCENDING).apply(src.peek());}
/**
* Return true when the next ... | 3.26 |
hbase_OrderedBytes_skip_rdh | /**
* Skip {@code buff}'s position forward over one encoded value.
*
* @return number of bytes skipped.
*/
public static int skip(PositionedByteRange src) {final int start = src.getPosition();byte header = src.get();
Order ord = ((-1) == Integer.signum(header)) ? DESCENDING : ASCENDING;
header = ord.apply(header)... | 3.26 |
hbase_OrderedBytes_decodeString_rdh | /**
* Decode a String value.
*/
public static String decodeString(PositionedByteRange
src) {
final byte header = src.get();
if ((header == NULL) || (header == DESCENDING.apply(NULL)))
return null;
assert (header == TEXT) || (header == DESCENDING.apply(TEXT));
Order ord = (header == TEXT) ?... | 3.26 |
hbase_OrderedBytes_length_rdh | /**
* Return the number of encoded entries remaining in {@code buff}. The state of {@code buff} is
* not modified through use of this method.
*/
public static int length(PositionedByteRange buff) {
PositionedByteRange b = new SimplePositionedMutableByteRange(buff.getBytes(), buff.getOffset(), buff.getLength());
b.s... | 3.26 |
hbase_OrderedBytes_decodeNumericValue_rdh | /**
* Decode a {@link BigDecimal} from {@code src}. Assumes {@code src} encodes a value in Numeric
* encoding and is within the valid range of {@link BigDecimal} values. {@link BigDecimal} does
* not support {@code NaN} or {@code Infinte} values.
*
* @see #decodeNumericAsDouble(PositionedByteRange)
*/
private sta... | 3.26 |
hbase_OrderedBytes_isNumericNaN_rdh | /**
* Return true when the next encoded value in {@code src} uses Numeric encoding and is
* {@code NaN}, false otherwise.
*/
public static boolean isNumericNaN(PositionedByteRange src) {
return NAN == ((-1) == Integer.signum(src.peek()) ? DESCENDING : ASCENDING).apply(src.peek());
} | 3.26 |
hbase_AbstractMultiFileWriter_commitWriters_rdh | /**
* Commit all writers.
* <p>
* Notice that here we use the same <code>maxSeqId</code> for all output files since we haven't
* find an easy to find enough sequence ids for different output files in some corner cases. See
* comments in HBASE-15400 for more details.
*/
public List<Path> commitWriters(long
maxSeqI... | 3.26 |
hbase_AbstractMultiFileWriter_preCommitWriters_rdh | /**
* Subclasses override this method to be called at the end of a successful sequence of append; all
* appends are processed before this method is called.
*/
protected void preCommitWriters()
throws IOException {
} | 3.26 |
hbase_AbstractMultiFileWriter_abortWriters_rdh | /**
* Close all writers without throwing any exceptions. This is used when compaction failed usually.
*/
public List<Path> abortWriters() {
List<Path> paths = new ArrayList<>();
for (StoreFileWriter writer : writers()) {
try {
if (writer != null) {
paths.add(writer.getPath... | 3.26 |
hbase_AbstractMultiFileWriter_init_rdh | /**
* Initializes multi-writer before usage.
*
* @param sourceScanner
* Optional store scanner to obtain the information about read progress.
* @param factory
* Factory used to produce individual file writers.
*/
public void init(StoreScanner sourceScanner, WriterFactory factory) {
this.writerFactory = f... | 3.26 |
hbase_ZNodeClearer_writeMyEphemeralNodeOnDisk_rdh | /**
* Logs the errors without failing on exception.
*/
public static void writeMyEphemeralNodeOnDisk(String fileContent) {
String fileName = ZNodeClearer.getMyEphemeralNodeFileName();
if (fileName == null) {
LOG.warn("Environment variable HBASE_ZNODE_FILE not set; znodes will not be cleared " + "on cr... | 3.26 |
hbase_ZNodeClearer_clear_rdh | /**
* Delete the master znode if its content (ServerName string) is the same as the one in the znode
* file. (env: HBASE_ZNODE_FILE). I case of master-rs colloaction we extract ServerName string
* from rsZnode path.(HBASE-14861)
*
* @return true on successful deletion, false otherwise.
*/
public static boolean cl... | 3.26 |
hbase_ZNodeClearer_getMyEphemeralNodeFileName_rdh | /**
* Get the name of the file used to store the znode contents
*/
public static String getMyEphemeralNodeFileName() {
return System.getenv().get("HBASE_ZNODE_FILE");
} | 3.26 |
hbase_ZNodeClearer_deleteMyEphemeralNodeOnDisk_rdh | /**
* delete the znode file
*/
public static void deleteMyEphemeralNodeOnDisk() {
String
fileName = getMyEphemeralNodeFileName();
if (fileName != null) {
new File(fileName).delete();
}} | 3.26 |
hbase_ZNodeClearer_parseMasterServerName_rdh | /**
* See HBASE-14861. We are extracting master ServerName from rsZnodePath example:
* "/hbase/rs/server.example.com,16020,1448266496481"
*
* @param rsZnodePath
* from HBASE_ZNODE_FILE
* @return String representation of ServerName or null if fails
*/
public static String parseMasterServerName(String rsZnodePat... | 3.26 |
hbase_BloomFilterChunk_createAnother_rdh | /**
* Creates another similar Bloom filter. Does not copy the actual bits, and sets the new filter's
* key count to zero.
*
* @return a Bloom filter with the same configuration as this
*/
public BloomFilterChunk createAnother() {
BloomFilterChunk bbf = new BloomFilterChunk(hashType, this.bloomType);
bbf.by... | 3.26 |
hbase_BloomFilterChunk_add_rdh | // Used only by tests
void add(byte[] buf, int offset, int len) {
/* For faster hashing, use combinatorial generation
http://www.eecs.harvard.edu/~kirsch/pubs/bbbf/esa06.pdf
*/
HashKey<byte[]> hashKey = new ByteArrayHashKey(buf, offset, len);
int hash1 = this.hash.hash(hashKey, 0);
int hash2 = ... | 3.26 |
hbase_BloomFilterChunk_get_rdh | /**
* Check if bit at specified index is 1.
*
* @param pos
* index of bit
* @return true if bit at specified index is 1, false if 0.
*/static boolean get(int pos, ByteBuffer bloomBuf, int bloomOffset) {
int bytePos = pos >> 3;// pos / 8
int bitPos = pos & 0x7;// pos % 8
// TODO access this via Util... | 3.26 |
hbase_BloomFilterChunk_writeBloom_rdh | /**
* Writes just the bloom filter to the output array
*
* @param out
* OutputStream to place bloom
* @throws IOException
* Error writing bloom array
*/
public void writeBloom(final DataOutput out) throws IOException {
if (!this.bloom.hasArray()) {
throw new IOException("Only writes ByteBuffer with underlyin... | 3.26 |
hbase_BloomFilterChunk_set_rdh | // ---------------------------------------------------------------------------
/**
* Private helpers
*/
/**
* Set the bit at the specified index to 1.
*
* @param pos
* index of bit
*/
void set(long pos) {
int v10 = ((int) (pos / 8));
int bitPos = ((int) (pos % 8));
byte curByte = bloom.get(v10);
... | 3.26 |
hbase_BloomFilterChunk_actualErrorRate_rdh | /**
* Computes the error rate for this Bloom filter, taking into account the actual number of hash
* functions and keys inserted. The return value of this function changes as a Bloom filter is
* being populated. Used for reporting the actual error rate of compound Bloom filters when
* writing th... | 3.26 |
hbase_BatchScanResultCache_m0_rdh | // Add new result to the partial list and return a batched Result if caching size exceed batching
// limit. As the RS will also respect the scan.getBatch, we can make sure that we will get only
// one Result back at most(or null, which means we do not have enough cells).
private Result m0(Result result) {
partialRe... | 3.26 |
hbase_DefaultMobStoreCompactor_calculateMobLengthMap_rdh | /**
*
* @param mobRefs
* multimap of original table name -> mob hfile
*/
private void calculateMobLengthMap(SetMultimap<TableName, String> mobRefs) throws IOException {
FileSystem fs = store.getFileSystem();
HashMap<String, Long> map = mobLengthMap.get();
map.clear();
for (Entry<TableName, Strin... | 3.26 |
hbase_DefaultMobStoreCompactor_performCompaction_rdh | /**
* Performs compaction on a column family with the mob flag enabled. This works only when MOB
* compaction is explicitly requested (by User), or by Master There are two modes of a MOB
* compaction:<br>
* <p>
* <ul>
* <li>1. Full mode - when all MOB data for a region is compacted into a single MOB file.
* <li>... | 3.26 |
hbase_ResultStatsUtil_updateStats_rdh | /**
* Update the statistics for the specified region.
*
* @param tracker
* tracker to update
* @param server
* server from which the result was obtained
* @param regionName
* full region name for the statistics
* @param stats
* statistics to update for the specified region
*/
public static void updat... | 3.26 |
hbase_CellChunkImmutableSegment_createCellReference_rdh | /* ------------------------------------------------------------------------ */
// for a given cell, write the cell representation on the index chunk
private int createCellReference(ByteBufferKeyValue cell, ByteBuffer idxBuffer, int idxOffset) {
int offset = idxOffs... | 3.26 |
hbase_CellChunkImmutableSegment_reinitializeCellSet_rdh | /* ------------------------------------------------------------------------ */
// Create CellSet based on CellChunkMap from current ConcurrentSkipListMap based CellSet
// (without compacting iterator)
// This is a service for not-flat immutable segments
private void reinitializeCellSet(int numOfCells, KeyValueScanner s... | 3.26 |
hbase_CellChunkImmutableSegment_initializeCellSet_rdh | // /////////////////// PRIVATE METHODS /////////////////////
/* ------------------------------------------------------------------------ */
// Create CellSet based on CellChunkMap from compacting iterator
private void initializeCellSet(int numOfCells, MemStoreSegmentsIterator iterator, MemStoreCompactionStrategy.Action... | 3.26 |
hbase_SpaceQuotaSnapshot_toSpaceQuotaSnapshot_rdh | // ProtobufUtil is in hbase-client, and this doesn't need to be public.
public static SpaceQuotaSnapshot toSpaceQuotaSnapshot(QuotaProtos.SpaceQuotaSnapshot proto) {
return new SpaceQuotaSnapshot(SpaceQuotaStatus.toStatus(proto.getQuotaStatus()), proto.getQuotaUsage(), proto.getQuotaLimit());} | 3.26 |
hbase_SpaceQuotaSnapshot_getUsage_rdh | /**
* Returns the current usage, in bytes, of the target (e.g. table, namespace).
*/
@Override
public long getUsage() {
return usage; } | 3.26 |
hbase_SpaceQuotaSnapshot_getNoSuchSnapshot_rdh | /**
* Returns a singleton that corresponds to no snapshot information.
*/
public static SpaceQuotaSnapshot getNoSuchSnapshot() {
return NO_SUCH_SNAPSHOT;
} | 3.26 |
hbase_SpaceQuotaSnapshot_notInViolation_rdh | /**
* Returns a singleton referring to a quota which is not in violation.
*/
public static SpaceQuotaStatus notInViolation() {
return f0;} | 3.26 |
hbase_SpaceQuotaSnapshot_getLimit_rdh | /**
* Returns the limit, in bytes, of the target (e.g. table, namespace).
*/
@Override
public long getLimit() {
return limit;
} | 3.26 |
hbase_SpaceQuotaSnapshot_getPolicy_rdh | /**
* Returns the violation policy, which may be null. It is guaranteed to be non-null if
* {@link #isInViolation()} is {@code true}, but may be null otherwise.
*/
@Override
public Optional<SpaceViolationPolicy> getPolicy() {return policy;
} | 3.26 |
hbase_SpaceQuotaSnapshot_isInViolation_rdh | /**
* Returns {@code true} if the quota is being violated, {@code false} otherwise.
*/
@Override
public boolean isInViolation() {
return inViolation;
} | 3.26 |
hbase_SpaceQuotaSnapshot_getQuotaStatus_rdh | /**
* Returns the status of the quota.
*/
@Override
public SpaceQuotaStatus getQuotaStatus() {
return quotaStatus;
} | 3.26 |
hbase_StripeStoreFileManager_processResults_rdh | /**
* Process new files, and add them either to the structure of existing stripes, or to the list
* of new candidate stripes.
*
* @return New candidate stripes.
*/
private TreeMap<byte[], HStoreFile> processResults() {
TreeMap<byte[], HStoreFile> v82 = null;
for (HStoreFile sf :
this.results) {
byte[]
startRow = ... | 3.26 |
hbase_StripeStoreFileManager_findStripeForRow_rdh | /**
* Finds the stripe index for the stripe containing a row provided externally for get/scan.
*/
private final int findStripeForRow(byte[] row, boolean isStart) {
if (isStart && Arrays.equals(row, HConstants.EMPTY_START_ROW))
return 0;
if ((!isStart) && Arrays.equals(row, HConstants.EMPTY_END_ROW)) {
return... | 3.26 |
hbase_StripeStoreFileManager_getLevel0Copy_rdh | /**
* Returns A lazy L0 copy from current state.
*/
private final ArrayList<HStoreFile> getLevel0Copy() {
if (this.level0Files == null) {
this.level0Files = new ArrayList<>(StripeStoreFileManager.this.state.level0Files);
}
return this.level0Files;
} | 3.26 |
hbase_StripeStoreFileManager_insertFileIntoStripe_rdh | /**
* Inserts a file in the correct place (by seqnum) in a stripe copy.
*
* @param stripe
* Stripe copy to insert into.
* @param sf
* File to insert.
*/
private static void insertFileIntoStripe(ArrayList<HStoreFile> stripe, HStoreFile sf) {
// The only operation for which sorting of the files matters is Ke... | 3.26 |
hbase_StripeStoreFileManager_m1_rdh | // Mark the files as compactedAway once the storefiles and compactedfiles list is finalised
// Let a background thread close the actual reader on these compacted files and also
// ensure to evict the blocks from block cache so that they are no longer in
// cache
private void m1(Collection<HStoreFile> compactedFiles) {
... | 3.26 |
hbase_StripeStoreFileManager_removeCompactedFiles_rdh | /**
* Remove compacted files.
*/
private void removeCompactedFiles() {
for (HStoreFile oldFile : this.compactedFiles) { byte[] oldEndRow = endOf(oldFile);
List<HStoreFile> source = null;
if (isInvalid(oldEndRow)) {
source = getLevel0Copy();
} else {
int stripeIndex = findStripeIndexByEndRow(oldEndRow);
if (stripeInde... | 3.26 |
hbase_StripeStoreFileManager_getSplitPoint_rdh | /**
* Override of getSplitPoint that determines the split point as the boundary between two stripes,
* unless it causes significant imbalance between split sides' sizes. In that case, the split
* boundary will be chosen from the middle of one of the stripes to minimize imbalance.
*
* @retur... | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.