name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hbase_ReopenTableRegionsProcedure_setTimeoutFailure_rdh
/** * At end of timeout, wake ourselves up so we run again. */ @Override protected synchronized boolean setTimeoutFailure(MasterProcedureEnv env) { setState(ProcedureState.RUNNABLE); env.getProcedureScheduler().addFront(this); return false;// 'false' means that this procedure handled the timeout }
3.26
hbase_ResponseConverter_buildEnableCatalogJanitorResponse_rdh
/** * Creates a response for the catalog scan request * * @return A EnableCatalogJanitorResponse */ public static EnableCatalogJanitorResponse buildEnableCatalogJanitorResponse(boolean prevValue) { return EnableCatalogJanitorResponse.newBuilder().setPrevValue(prevValue).build(); }
3.26
hbase_ResponseConverter_buildClearRegionBlockCacheResponse_rdh
/** * Creates a protocol buffer ClearRegionBlockCacheResponse * * @return a ClearRegionBlockCacheResponse */ public static ClearRegionBlockCacheResponse buildClearRegionBlockCacheResponse(final HBaseProtos.CacheEvictionStats cacheEvictionStats) { return AdminProtos.ClearRegionBlockCacheResponse.newBuilder().setStat...
3.26
hbase_ResponseConverter_getResults_rdh
/** * Create Results from the cells using the cells meta data. */ public static Result[] getResults(CellScanner cellScanner, ScanResponse response) throws IOException { if (response == null) return null; // If cellscanner, then the number of Results to return is the count of elements in the // cellsPerResult list....
3.26
hbase_ResponseConverter_getCheckAndMutateResult_rdh
/** * Create a CheckAndMutateResult object from a protocol buffer MutateResponse * * @return a CheckAndMutateResult object */ public static CheckAndMutateResult getCheckAndMutateResult(ClientProtos.MutateResponse mutateResponse, CellScanner cells) throws IOException { boolean success = mutateResponse.getProcessed()...
3.26
hbase_ResponseConverter_buildException_rdh
/** * Returns NameValuePair of the exception name to stringified version os exception. */ public static NameBytesPair buildException(final Throwable t) { NameBytesPair.Builder parameterBuilder = NameBytesPair.newBuilder(); parameterBuilder.setName(t.getClass().getName());parameterBuilder.setValue(ByteString.copyFromU...
3.26
hbase_ResponseConverter_getResult_rdh
// Start utilities for Client public static SingleResponse getResult(final ClientProtos.MutateRequest request, final ClientProtos.MutateResponse response, final CellScanner cells) throws IOException { SingleResponse singleResponse = new SingleResponse(); SingleResponse.Entry entry = new SingleResponse.Entry()...
3.26
hbase_ResponseConverter_buildRunCatalogScanResponse_rdh
/** * Creates a response for the catalog scan request * * @return A RunCatalogScanResponse */ public static RunCatalogScanResponse buildRunCatalogScanResponse(int numCleaned) { return RunCatalogScanResponse.newBuilder().setScanResult(numCleaned).build(); }
3.26
hbase_ResponseConverter_buildGetLastFlushedSequenceIdResponse_rdh
// End utilities for Admin /** * Creates a response for the last flushed sequence Id request * * @return A GetLastFlushedSequenceIdResponse */ public static GetLastFlushedSequenceIdResponse buildGetLastFlushedSequenceIdResponse(RegionStoreSequenceIds ids) { return GetLastFlushedSequenceIdResponse.newBuilder().setL...
3.26
hbase_ResponseConverter_getRegionInfos_rdh
// End utilities for Client // Start utilities for Admin /** * Get the list of region info from a GetOnlineRegionResponse * * @param proto * the GetOnlineRegionResponse * @return the list of region info */ public static List<RegionInfo> getRegionInfos(final GetOnlineRegionResponse proto) { if ((proto == null)...
3.26
hbase_ResponseConverter_buildGetServerInfoResponse_rdh
/** * A utility to build a GetServerInfoResponse. * * @return the response */ public static GetServerInfoResponse buildGetServerInfoResponse(final ServerName serverName, final int webuiPort) { GetServerInfoResponse.Builder builder = GetServerInfoResponse.newBuilder(); ServerInfo.Builder serverInfoBuilder = ServerI...
3.26
hbase_ResponseConverter_buildHasPermissionResponse_rdh
/** * Builds a protocol buffer HasPermissionResponse */ public static HasPermissionResponse buildHasPermissionResponse(boolean hasPermission) { HasPermissionResponse.Builder builder = HasPermissionResponse.newBuilder(); builder.setHasPermission(hasPermission); return builder.build(); }
3.26
hbase_ResponseConverter_buildActionResult_rdh
/** * Wrap a throwable to an action result. * * @return an action result builder */ public static Builder buildActionResult(final ClientProtos.Result r) { ResultOrException.Builder builder = ResultOrException.newBuilder(); if (r != null) builder.setResult(r); return builder; }
3.26
hbase_ResponseConverter_buildRunCleanerChoreResponse_rdh
/** * Creates a response for the cleaner chore request * * @return A RunCleanerChoreResponse */ public static RunCleanerChoreResponse buildRunCleanerChoreResponse(boolean ran) { return RunCleanerChoreResponse.newBuilder().setCleanerChoreRan(ran).build(); }
3.26
hbase_ResponseConverter_buildGetOnlineRegionResponse_rdh
/** * A utility to build a GetOnlineRegionResponse. * * @return the response */ public static GetOnlineRegionResponse buildGetOnlineRegionResponse(final List<RegionInfo> regions) { GetOnlineRegionResponse.Builder builder = GetOnlineRegionResponse.newBuilder(); for (RegionInfo region : regions) {builder.addRegionI...
3.26
hbase_ResponseConverter_setControllerException_rdh
/** * Stores an exception encountered during RPC invocation so it can be passed back through to the * client. * * @param controller * the controller instance provided by the client when calling the service * @param ioe * the exception encountered */ public static void setControllerException(RpcController co...
3.26
hbase_CacheableDeserializerIdManager_save_rdh
/** * Snapshot a map of the current identifiers to class names for reconstruction on reading out of a * file. */public static Map<Integer, String> save() { // No synchronization here because weakly consistent view should be good enough // The assumed risk is that we might not see a new serializer that co...
3.26
hbase_CacheableDeserializerIdManager_registerDeserializer_rdh
/** * Register the given {@link Cacheable} -- usually an hfileblock instance, these implement the * Cacheable Interface -- deserializer and generate a unique identifier id for it and return this * as our result. * * @return the identifier of given cacheable deserializer * @see #getDeserializer(int) */ public sta...
3.26
hbase_CacheableDeserializerIdManager_getDeserializer_rdh
/** * Get the cacheable deserializer registered at the given identifier Id. * * @see #registerDeserializer(CacheableDeserializer) */ public static CacheableDeserializer<Cacheable> getDeserializer(int id) { return registeredDeserializers.get(id); }
3.26
hbase_SpaceQuotaRefresherChore_extractQuotaSnapshot_rdh
/** * Wrapper around {@link QuotaTableUtil#extractQuotaSnapshot(Result, Map)} for testing. */ void extractQuotaSnapshot(Result result, Map<TableName, SpaceQuotaSnapshot> snapshots) { QuotaTableUtil.extractQuotaSnapshot(result, snapshots); }
3.26
hbase_SpaceQuotaRefresherChore_getRegionReportPercent_rdh
/** * Extracts the percent of Regions for a table to have been reported to enable quota violation * state change. * * @param conf * The configuration object. * @return The percent of regions reported to use. */static Double getRegionReportPercent(Configuration conf) { return conf.getDouble(POLICY_REFRESHER...
3.26
hbase_SpaceQuotaRefresherChore_getTimeUnit_rdh
/** * Extracts the time unit for the chore period and initial delay from the configuration. The * configuration value for {@link #POLICY_REFRESHER_CHORE_TIMEUNIT_KEY} must correspond to a * {@link TimeUnit} value. * * @param conf * The configuration object. * @return The configured time unit for the chore peri...
3.26
hbase_SpaceQuotaRefresherChore_checkQuotaTableExists_rdh
/** * Checks if hbase:quota exists in hbase:meta * * @return true if hbase:quota table is in meta, else returns false. * @throws IOException * throws IOException */ boolean checkQuotaTableExists() throws IOException { try (Admin admin = getConnection().getAdmin()) { return admin.tableExists(QuotaUti...
3.26
hbase_SpaceQuotaRefresherChore_m0_rdh
/** * Extracts the initial delay for the chore from the configuration. * * @param conf * The configuration object. * @return The configured chore initial delay or the default value. */ static long m0(Configuration conf) { return conf.getLong(POLICY_REFRESHER_CHORE_DELAY_KEY, POLICY_REFRESHER_CHORE_DELAY_DEF...
3.26
hbase_SpaceQuotaRefresherChore_getPeriod_rdh
/** * Extracts the period for the chore from the configuration. * * @param conf * The configuration object. * @return The configured chore period or the default value. */ static int getPeriod(Configuration conf) { return conf.getInt(POLICY_REFRESHER_CHORE_PERIOD_KEY, POLICY_REFRESHER_CHORE_PERIOD_DEFAULT); ...
3.26
hbase_SpaceQuotaRefresherChore_isInViolation_rdh
/** * Checks if the given <code>snapshot</code> is in violation, allowing the snapshot to be null. If * the snapshot is null, this is interpreted as no snapshot which implies not in violation. * * @param snapshot * The snapshot to operate on. * @return true if the snapshot is in violation, false otherwise. */ ...
3.26
hbase_SpaceQuotaRefresherChore_fetchSnapshotsFromQuotaTable_rdh
/** * Reads all quota snapshots from the quota table. * * @return The current "view" of space use by each table. */ public Map<TableName, SpaceQuotaSnapshot> fetchSnapshotsFromQuotaTable() throws IOException { try (Table quotaTable = getConnection().getTable(QuotaUtil.QUOTA_TABLE_NAME);ResultScanner scanner = ...
3.26
hbase_BucketEntry_markAsEvicted_rdh
/** * The {@link BucketCache} will try to release its reference to this BucketEntry many times. we * must make sure the idempotent, otherwise it'll decrease the RPC's reference count in advance, * then for RPC memory leak happen. * * @return true if we deallocate this entry successfully. */ boolean markAsEvicted(...
3.26
hbase_BucketEntry_release_rdh
/** * We've three cases to release refCnt now: <br> * 1. BucketCache#evictBlock, it will release the backingMap's reference by force because we're * closing file or clear the bucket cache or some corruption happen. when all rpc references gone, * then free the area in bucketAllocator. <br> * 2. BucketCache#returnB...
3.26
hbase_SimplePositionedMutableByteRange_setOffset_rdh
/** * Update the beginning of this range. {@code offset + length} may not be greater than * {@code bytes.length}. Resets {@code position} to 0. the new start of this range. * * @return this. */ @Override public PositionedByteRange setOffset(int offset) { this.position = 0; super.setOffset(offset); retu...
3.26
hbase_MD5Hash_getMD5AsHex_rdh
/** * Given a byte array, returns its MD5 hash as a hex string. Only "length" number of bytes * starting at "offset" within the byte array are used. * * @param key * the key to hash (variable length byte array) * @return MD5 hash as a 32 character hex string. */ public static String getMD5AsHex(byte[] key, int...
3.26
hbase_DefaultMetricsSystemHelper_removeSourceName_rdh
/** * Unfortunately Hadoop tries to be too-clever and permanently keeps track of all names registered * so far as a Source, thus preventing further re-registration of the source with the same name. * In case of dynamic metrics tied to region-lifecycles, this becomes a problem because we would * like to be able to r...
3.26
hbase_KeyValueHeap_seek_rdh
/** * Seeks all scanners at or below the specified seek key. If we earlied-out of a row, we may end * up skipping values that were never reached yet. Rather than iterating down, we want to give the * opportunity to re-seek. * <p> * As individual scanners may run past their ends, those scanners are automatically cl...
3.26
hbase_KeyValueHeap_next_rdh
/** * Gets the next row of keys from the top-most scanner. * <p> * This method takes care of updating the heap. * <p> * This can ONLY be called when you are using Scanners that implement InternalScanner as well as * KeyValueScanner (a {@link StoreScanner}). * * @return true if more rows exist after this one, fa...
3.26
hbase_KeyValueHeap_getComparator_rdh
/** */ public CellComparator getComparator() { return this.kvComparator; }
3.26
hbase_KeyValueHeap_reseek_rdh
/** * This function is identical to the {@link #seek(Cell)} function except that * scanner.seek(seekKey) is changed to scanner.reseek(seekKey). */ @Override public boolean reseek(Cell seekKey) throws IOException { return // This is not a lazy seek // forward (true because this is reseek) generalizedSee...
3.26
hbase_KeyValueHeap_getHeap_rdh
/** * Returns the current Heap */ public PriorityQueue<KeyValueScanner> getHeap() { return this.heap; }
3.26
hbase_KeyValueHeap_generalizedSeek_rdh
/** * * @param isLazy * whether we are trying to seek to exactly the given row/col. Enables Bloom * filter and most-recent-file-first optimizations for multi-column get/scan * queries. * @param seekKey * key to seek to * @param forward * whether to seek forward (also known as reseek) * @param useBlo...
3.26
hbase_KeyValueHeap_pollRealKV_rdh
/** * Fetches the top sub-scanner from the priority queue, ensuring that a real seek has been done on * it. Works by fetching the top sub-scanner, and if it has not done a real seek, making it do so * (which will modify its top KV), putting it back, and...
3.26
hbase_KeyValueHeap_compare_rdh
/** * Compares two KeyValue * * @return less than 0 if left is smaller, 0 if equal etc.. */ public int compare(Cell left, Cell right) { return this.kvComparator.compare(left, right); }
3.26
hbase_BrotliCompressor_maxCompressedLength_rdh
// Package private int maxCompressedLength(int len) { return len + CompressionUtil.compressionOverhead(len); }
3.26
hbase_AsyncBufferedMutatorBuilder_disableWriteBufferPeriodicFlush_rdh
/** * Disable the periodical flush, i.e, set the timeout to 0. */ default AsyncBufferedMutatorBuilder disableWriteBufferPeriodicFlush() { return setWriteBufferPeriodicFlush(0, TimeUnit.NANOSECONDS); }
3.26
hbase_AsyncBufferedMutatorBuilder_setMaxRetries_rdh
/** * Set the max retry times for an operation. Usually it is the max attempt times minus 1. * <p> * Operation timeout and max attempt times(or max retry times) are both limitations for retrying, * we will stop retrying when we reach any of the limitations. * * @see #setMaxAttempts(int) * @see #setOperationTimeo...
3.26
hbase_AsyncBufferedMutatorBuilder_setWriteBufferPeriodicFlush_rdh
/** * Set the periodical flush interval. If the data in the buffer has not been flush for a long * time, i.e, reach this timeout limit, we will flush it automatically. * <p/> * Notice that, set the timeout to 0 or a negative value means disable periodical flush, not * 'flush immediately'. If you want to flush imme...
3.26
hbase_CachedEntryQueue_pollLast_rdh
/** * Returns The last element in this queue, or {@code null} if the queue is empty. */ public Map.Entry<BlockCacheKey, BucketEntry> pollLast() { return queue.pollLast(); }
3.26
hbase_CachedEntryQueue_poll_rdh
/** * Returns The next element in this queue, or {@code null} if the queue is empty. */ public Map.Entry<BlockCacheKey, BucketEntry> poll() { return queue.poll(); }
3.26
hbase_CachedEntryQueue_add_rdh
/** * Attempt to add the specified entry to this queue. * <p> * If the queue is smaller than the max size, or if the specified element is ordered after the * smallest element in the queue, the element will be added to the queue. Otherwise, there is no * side effect of this call. * * @param entry * a bucket en...
3.26
hbase_ReplicationPeerImpl_getId_rdh
/** * Get the identifier of this peer * * @return string representation of the id (short) */ @Override public String getId() { return id; }
3.26
hbase_ShadedAccessControlUtil_toPermissionAction_rdh
/** * Convert a Permission.Action shaded proto to a client Permission.Action object. */ public static Action toPermissionAction(AccessControlProtos.Permission.Action action) { switch (action) { case READ : return Action.READ; case WRITE : return Action.WRITE...
3.26
hbase_ShadedAccessControlUtil_toUserPermission_rdh
/** * Convert a client user permission to a user permission proto * * @param perm * the client UserPermission * @return the protobuf UserPermission */ public static UserPermission toUserPermission(UserPermission perm) { return AccessControlProtos.UserPermission.newBuilder().setUser(ByteString.copyFromUtf8(p...
3.26
hbase_ShadedAccessControlUtil_toPermission_rdh
/** * Convert a client Permission to a Permission shaded proto * * @param perm * the client Permission * @return the protobuf Permission */ public static Permission toPermission(Permission perm) { AccessControlProtos.Permission.Builder ret = AccessControlProtos.Permission.newBuilder(); if (perm instanc...
3.26
hbase_ShadedAccessControlUtil_m0_rdh
/** * Convert a client user permission to a user permission shaded proto. */ public static Action m0(Permission.Action action) { switch (action) { case READ : return Action.READ; case WRITE : return Action.WRITE; case EXEC : return Action.EXEC; case...
3.26
hbase_ShadedAccessControlUtil_toUserTablePermissions_rdh
/** * Convert a ListMultimap&lt;String, TablePermission&gt; where key is username to a shaded * protobuf UserPermission * * @param perm * the list of user and table permissions * @return the protobuf UserTablePermissions */ public static UsersAndPermissions toUserTablePermissions(ListMultimap<String, UserPermi...
3.26
hbase_ShadedAccessControlUtil_toPermissionActions_rdh
/** * Converts a list of Permission.Action shaded proto to an array of client Permission.Action * objects. * * @param protoActions * the list of shaded protobuf Actions * @return the converted array of Actions */ public static Action[] toPermissionActions(List<AccessControlProtos.Permission.Action> protoAction...
3.26
hbase_HFilePrettyPrinter_mobFileExists_rdh
/** * Checks whether the referenced mob file exists. */ private boolean mobFileExists(FileSystem fs, TableName tn, String mobFileName, String family, Set<String> foundMobFiles, Set<String> missingMobFiles) throws IOException { if (foundMobFiles.contains(mobFileName)) { return true; } if (missingMobFiles.contains(mob...
3.26
hbase_HFilePrettyPrinter_build_rdh
/** * Builds a {@link ConsoleReporter} with the given properties. * * @return a {@link ConsoleReporter} */ public SimpleReporter build() { return new SimpleReporter(output, stats, locale, timeZone); }
3.26
hbase_HFilePrettyPrinter_evictMobFilesIfNecessary_rdh
/** * Evicts the cached mob files if the set is larger than the limit. */ private void evictMobFilesIfNecessary(Set<String> mobFileNames, int limit) { if (mobFileNames.size() < limit) { return; } int index = 0; int v52 = limit / 2; Iterator<String> fileNamesItr = mobFileNames.iterator(); while ((index < v52) && fileN...
3.26
hbase_HFilePrettyPrinter_run_rdh
/** * Runs the command-line pretty-printer, and returns the desired command exit code (zero for * success, non-zero for failure). */ @Override public int run(String[] args) { if (getConf() == null) { throw new RuntimeException("A Configuration instance must be provided."); } try { CommonF...
3.26
hbase_HFilePrettyPrinter_newBuilder_rdh
/** * Returns a new {@link Builder} for {@link SimpleReporter}. * * @return a {@link Builder} instance for a {@link SimpleReporter} */ public static Builder newBuilder() { return new Builder(); }
3.26
hbase_HFilePrettyPrinter_outputTo_rdh
/** * Write to the given {@link PrintStream}. * * @param output * a {@link PrintStream} instance. * @return {@code this} */ public Builder outputTo(PrintStream output) { this.output = output; return this; }
3.26
hbase_HFilePrettyPrinter_processFile_rdh
// HBASE-22561 introduces boolean checkRootDir for WebUI specificly public int processFile(Path file, boolean checkRootDir) throws IOException { if (verbose) { out.println("Scanning -> " + file); } if (checkRootDir) { Path rootPath = CommonFSUtils.getRootDir(getConf()); String ro...
3.26
hbase_HFilePrettyPrinter_asSeparateLines_rdh
/** * Format a string of the form "k1=v1, k2=v2, ..." into separate lines with a four-space * indentation. */ private static String asSeparateLines(String keyValueStr) { return keyValueStr.replaceAll(", ([a-zA-Z]+=)", (",\n" + FOUR_SPACES) + "$1"); }
3.26
hbase_HFilePrettyPrinter_addStats_rdh
/** * Add the given {@link KeyValueStats} to be reported * * @param stat * the stat to be reported * @return {@code this} */ public Builder addStats(KeyValueStats stat) { this.stats.add(stat); return this; }
3.26
hbase_FlushSnapshotSubprocedure_releaseBarrier_rdh
/** * Hooray! */ public void releaseBarrier() { // NO OP }
3.26
hbase_FlushSnapshotSubprocedure_acquireBarrier_rdh
/** * do nothing, core of snapshot is executed in {@link #insideBarrier} step. */ @Override public void acquireBarrier() throws ForeignException {// NO OP }
3.26
hbase_FlushSnapshotSubprocedure_cleanup_rdh
/** * Cancel threads if they haven't finished. */ @Override public void cleanup(Exception e) { LOG.info(("Aborting all online FLUSH snapshot subprocedure task threads for '" + snapshot.getName()) + "' due to error", e);try { taskManager.cancelTasks(); } catch (InterruptedException e1) { Thread.currentThrea...
3.26
hbase_FlushSnapshotSubprocedure_insideBarrier_rdh
/** * do a flush snapshot of every region on this rs from the target table. */ @Override public byte[] insideBarrier() throws ForeignException { flushSnapshot(); return new byte[0]; }
3.26
hbase_ImmutableBytesWritable_hashCode_rdh
// Below methods copied from BytesWritable @Override public int hashCode() { int hash = 1; for (int i = offset; i < (offset + length); i++) hash = (31 * hash) + ((int) (bytes[i])); return hash; }
3.26
hbase_ImmutableBytesWritable_set_rdh
/** * Use passed bytes as backing array for this instance. */ public void set(final byte[] b) { m0(b, 0, b.length);}
3.26
hbase_ImmutableBytesWritable_m0_rdh
/** * Use passed bytes as backing array for this instance. */ public void m0(final byte[] b, final int offset, final int length) { this.bytes = b; this.offset = offset; this.length = length; }
3.26
hbase_ImmutableBytesWritable_getLength_rdh
/** * Returns the number of valid bytes in the buffer */ public int getLength() { if (this.bytes == null) { throw new IllegalStateException("Uninitialiized. Null constructor " + "called w/o accompaying readFields invocation"); ...
3.26
hbase_ImmutableBytesWritable_toArray_rdh
/** * Convert a list of byte arrays into an array of byte arrays * * @param array * List of byte []. * @return Array of byte []. */ public static byte[][] toArray(final List<byte[]> array) { // List#toArray doesn't work on lists of byte []. byte[][] v6 = new byte[array.size()][]; for (int i = 0; i ...
3.26
hbase_ImmutableBytesWritable_copyBytes_rdh
/** * Returns a copy of the bytes referred to by this writable */ public byte[] copyBytes() { return Arrays.copyOfRange(bytes, offset, offset + length); }
3.26
hbase_ReplicationUtils_getAdaptiveTimeout_rdh
/** * Get the adaptive timeout value when performing a retry */ public static int getAdaptiveTimeout(final int initialValue, final int retries) { int ntries = retries; if (ntries >= RETRY_BACKOFF.length) { ntries = RETRY_BACKOFF.length - 1; } if (ntries < 0) { ntries = 0; } return initialValue * HConstants.R...
3.26
hbase_ReplicationUtils_sleepForRetries_rdh
/** * Do the sleeping logic * * @param msg * Why we sleep * @param sleepForRetries * the base sleep time. * @param sleepMultiplier * by how many times the default sleeping time is augmented * @param maxRetriesMultiplier * the max retry multiplier * @ret...
3.26
hbase_ReplicationUtils_isReplicationForBulkLoadDataEnabled_rdh
/** * * @param c * Configuration to look at * @return True if replication for bulk load data is enabled. */ public static boolean isReplicationForBulkLoadDataEnabled(final Configuration c) { return c.getBoolean(HConstants.REPLICATION_BULKLOAD_ENABLE_KEY, HConstants.REPLICATION_BULKLOAD_ENABLE_DEFAULT); }
3.26
hbase_TagUtil_carryForwardTags_rdh
/** * Add to <code>tagsOrNull</code> any Tags <code>cell</code> is carrying or null if none. */ public static List<Tag> carryForwardTags(final List<Tag> tagsOrNull, final Cell cell) { Iterator<Tag> itr = PrivateCellUtil.tagsIterator(cell); if (itr == EMPTY_TAGS_ITR) { // If no Tags, return early....
3.26
hbase_TagUtil_carryForwardTTLTag_rdh
/** * Returns Carry forward the TTL tag. */ public static List<Tag> carryForwardTTLTag(final List<Tag> tagsOrNull, final long ttl) { if (ttl == Long.MAX_VALUE) { return tagsOrNull; }List<Tag> tags = tagsOrNull; // If we are making the array in here, given we are the last thing checked, we'll be on...
3.26
hbase_TagUtil_asList_rdh
/** * Creates list of tags from given byte array, expected that it is in the expected tag format. * * @param b * The byte array * @param offset * The offset in array where tag bytes begin * @param length * Total length of all tags bytes * @return List of tags */ public static List<Tag> asList(byte[] b, ...
3.26
hbase_TagUtil_readVIntValuePart_rdh
/** * Reads an int value stored as a VInt at tag's given offset. * * @param tag * The Tag * @param offset * The offset where VInt bytes begin * @return A pair of the int value and number of bytes taken to store VInt * @throws IOException * When varint is malformed and not able to be read correctly */ pu...
3.26
hbase_TagUtil_fromList_rdh
/** * Write a list of tags into a byte array Note : these are all purely internal APIs. It helps in * cases where we have set of tags and we would want to create a cell out of it. Say in Mobs we * create a reference tags to indicate the presence of mob data. Also note that these are not * exposed to CPs also * * ...
3.26
hbase_MetricRegistryInfo_getMetricsDescription_rdh
/** * Get the description of what this source exposes. */ public String getMetricsDescription() { return metricsDescription; }
3.26
hbase_MetricRegistryInfo_getMetricsName_rdh
/** * Get the name of the metrics that are being exported by this source. Eg. IPC, GC, WAL */ public String getMetricsName() { return metricsName; }
3.26
hbase_MetricRegistryInfo_getMetricsJmxContext_rdh
/** * Get the name of the context in JMX that this source will be exposed through. This is in * ObjectName format. With the default context being Hadoop -&gt; HBase */ public String getMetricsJmxContext() { return metricsJmxContext; }
3.26
hbase_MetricRegistryInfo_getMetricsContext_rdh
/** * Get the metrics context. For hadoop metrics2 system this is usually an all lowercased string. * eg. regionserver, master, thriftserver * * @return The string context used to register this source to hadoop's metrics2 system. */ public String getMetricsContext() { return metricsContext;}
3.26
hbase_SimpleServerCall_done_rdh
/** * Call is done. Execution happened and we returned results to client. It is now safe to cleanup. */ @SuppressWarnings(value = "IS2_INCONSISTENT_SYNC", justification = "Presume the lock on processing request held by caller is protection enough") @Override public void done() { super.done(); this.getConnecti...
3.26
hbase_UserScanQueryMatcher_mergeFilterResponse_rdh
/** * Call this when scan has filter. Decide the desired behavior by checkVersions's MatchCode and * filterCell's ReturnCode. Cell may be skipped by filter, so the column versions in result may be * less than user need. It need to check versions again when filter and columnTracker both include * the cell. <br/> * ...
3.26
hbase_ThriftUtilities_deletesFromThrift_rdh
/** * Converts multiple {@link TDelete}s (Thrift) into a list of {@link Delete}s (HBase). * * @param in * list of <code>TDelete</code>s to convert * @return list of converted <code>Delete</code>s * @see #deleteFromThrift(TDelete) */ public static List<Delete> deletesFromThrift(List<TDelete> in) { List<Dele...
3.26
hbase_ThriftUtilities_getFromThrift_rdh
/** * Creates a {@link Get} (HBase) from a {@link TGet} (Thrift). This ignores any timestamps set on * {@link TColumn} objects. * * @param in * the <code>TGet</code> to convert * @return <code>Get</code> object * @throws IOException * if an invalid time range or max versi...
3.26
hbase_ThriftUtilities_rowMutationsFromThrift_rdh
/** * Creates a {@link RowMutations} (HBase) from a {@link TRowMutations} (Thrift) * * @param in * the <code>TRowMutations</code> to convert * @return converted <code>RowMutations</code> */ public static RowMutations rowMutationsFromThrift(TRowMutations in) throws IOException { List<TMutation> mutations =...
3.26
hbase_ThriftUtilities_putsFromThrift_rdh
/** * Converts multiple {@link TPut}s (Thrift) into a list of {@link Put}s (HBase). * * @param in * list of <code>TPut</code>s to convert * @return list of converted <code>Put</code>s * @see #putFromThrift(TPut) */ public static List<Put> putsFromThrift(List<TPut> in) { List<Put> out = new ArrayList<>(in.s...
3.26
hbase_ThriftUtilities_deleteFromThrift_rdh
/** * Creates a {@link Delete} (HBase) from a {@link TDelete} (Thrift). * * @param in * the <code>TDelete</code> to convert * @return converted <code>Delete</code> */ public static Delete deleteFromThrift(TDelete in) { Delete out; if (in.isSetColumns()) { out = new Delete(in.getRow()); ...
3.26
hbase_ThriftUtilities_resultsFromHBase_rdh
/** * Converts multiple {@link Result}s (HBase) into a list of {@link TResult}s (Thrift). * * @param in * array of <code>Result</code>s to convert * @return list of converted <code>TResult</code>s * @see #resultFromHBase(Result) */ public static List<TResult> resultsFromHBase(Result[] in) { List<TResult> o...
3.26
hbase_ThriftUtilities_addAttributes_rdh
/** * Adds all the attributes into the Operation object */ private static void addAttributes(OperationWithAttributes op, Map<ByteBuffer, ByteBuffer> attributes) { if ((attributes == null) || attributes.isEmpty()) ...
3.26
hbase_ThriftUtilities_putFromThrift_rdh
/** * Creates a {@link Put} (HBase) from a {@link TPut} (Thrift) * * @param in * the <code>TPut</code> to convert * @return converted <code>Put</code> */ public static Put putFromThrift(TPut in) { Put out; if (in.isSetTimestamp()) { out = new Put(in.getRow(), in.getTimestamp()); } else { ...
3.26
hbase_ThriftUtilities_getsFromThrift_rdh
/** * Converts multiple {@link TGet}s (Thrift) into a list of {@link Get}s (HBase). * * @param in * list of <code>TGet</code>s to convert * @return list of <code>Get</code> objects * @throws IOException * if an invalid time range or max version parameter is given * @see #getFromThrift(TGet) */ public stati...
3.26
hbase_RegionStateStore_hasGlobalReplicationScope_rdh
// ========================================================================== // Table Descriptors helpers // ========================================================================== private boolean hasGlobalReplicationScope(TableName tableName) throws IOException { return hasGlobalReplicationScope(getDescriptor(tab...
3.26
hbase_RegionStateStore_hasMergeRegions_rdh
/** * Check whether the given {@code region} has any 'info:merge*' columns. */ public boolean hasMergeRegions(RegionInfo region) throws IOException { return CatalogFamilyFormat.hasMergeRegions(getRegionCatalogResult(region).rawCells()); }
3.26
hbase_RegionStateStore_mergeRegions_rdh
// ============================================================================================ // Update Region Merging State helpers // ============================================================================================ public void mergeRegions(RegionInfo child, RegionInfo[] parents, ServerName serverName, T...
3.26
hbase_RegionStateStore_deleteRegion_rdh
// ============================================================================================ // Delete Region State helpers // ============================================================================================ /** * Deletes the specified region. */ public void deleteRegion(final RegionInfo regionInfo) th...
3.26