name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hbase_MobFileCache_closeFile_rdh
/** * Closes a mob file. * * @param file * The mob file that needs to be closed. */ public void closeFile(MobFile file) { IdLock.Entry v14 = null; try { if (!isCacheEnabled) { file.close(); } else { v14 = keyLock.getLockEntry(hashFileName(file.getFileName())); file.close(); } } catch (IOException e) { LOG.erro...
3.26
hbase_MobFileCache_openFile_rdh
/** * Opens a mob file. * * @param fs * The current file system. * @param path * The file path. * @param cacheConf * The current MobCacheConfig * @return A opened mob file. */ public MobFile openFile(FileSystem fs, Path path, CacheConfig cacheConf) throws IOException { if (!isCacheEnabled) { MobFile...
3.26
hbase_MobFileCache_evictFile_rdh
/** * Evicts the cached file by the name. * * @param fileName * The name of a cached file. */ public void evictFile(String fileName) { if (isCacheEnabled) { IdLock.Entry lockEntry = null; try { // obtains the lock to close the cached fil...
3.26
hbase_MetricsTableRequests_updatePutBatch_rdh
/** * Update the batch Put time histogram * * @param t * time it took */ public void updatePutBatch(long t) { if (isEnableTableLatenciesMetrics()) { putBatchTimeHistogram.update(t); } }
3.26
hbase_MetricsTableRequests_updateTableReadQueryMeter_rdh
/** * Update table read QPS */ public void updateTableReadQueryMeter() { if (isEnabTableQueryMeterMetrics()) { readMeter.mark();} }
3.26
hbase_MetricsTableRequests_updateCheckAndDelete_rdh
/** * Update the CheckAndDelete time histogram. * * @param time * time it took */ public void updateCheckAndDelete(long time) { if (isEnableTableLatenciesMetrics()) { checkAndDeleteTimeHistogram.update(time); } }
3.26
hbase_MetricsTableRequests_updateAppend_rdh
/** * Update the Append time histogram. * * @param time * time it took * @param blockBytesScanned * size of block bytes scanned to retrieve the response */ public void updateAppend(long time, long blockBytesScanned) {if (isEnableTableLatenciesMetrics()) { appendTimeHistogram.update(time); if (blockBy...
3.26
hbase_MetricsTableRequests_updateGet_rdh
/** * Update the Get time histogram . * * @param time * time it took * @param blockBytesScanned * size of block bytes scanned to retrieve the response */ public void updateGet(long time, long blockBytesScanned) { if (isEnableTableLatenciesMetrics()) { getTimeHistogram.update(time); if (bl...
3.26
hbase_MetricsTableRequests_updateIncrement_rdh
/** * Update the Increment time histogram. * * @param time * time it took * @param blockBytesScanned * size of block bytes scanned to retrieve the response */ public void updateIncrement(long time, long blockBytesScanned) { if (isEnableTableLatenciesMetrics()) { incrementTimeHistogram.update(time); ...
3.26
hbase_MetricsTableRequests_m1_rdh
/** * Update the CheckAndPut time histogram. * * @param time * time it took */ public void m1(long time) { if (isEnableTableLatenciesMetrics()) { checkAndPutTimeHistogram.update(time); } }
3.26
hbase_MetricsTableRequests_updateCheckAndMutate_rdh
/** * Update the CheckAndMutate time histogram. * * @param time * time it took */ public void updateCheckAndMutate(long time, long blockBytesScanned) {if (isEnableTableLatenciesMetrics()) { checkAndMutateTimeHistogram.update(time); if (blockBytesScanned > 0) { blockBytesScannedCount...
3.26
hbase_MetricsTableRequests_getMetricRegistryInfo_rdh
// Visible for testing public MetricRegistryInfo getMetricRegistryInfo() { return registryInfo; }
3.26
hbase_MetricsTableRequests_updateTableWriteQueryMeter_rdh
/** * Update table write QPS */ public void updateTableWriteQueryMeter() { if (isEnabTableQueryMeterMetrics()) { writeMeter.mark(); } }
3.26
hbase_MetricsTableRequests_updateScan_rdh
/** * Update the scan metrics. * * @param time * response time of scan * @param responseCellSize * size of the scan resposne * @param blockBytesScanned * size of block bytes scanned to retrieve the response */ public void updateScan(long time, long responseCellSize, long blockBytesScanned) { if (isEnable...
3.26
hbase_MetricsTableRequests_updateDeleteBatch_rdh
/** * Update the batch Delete time histogram * * @param t * time it took */ public void updateDeleteBatch(long t) { if (isEnableTableLatenciesMetrics()) { deleteBatchTimeHistogram.update(t); } }
3.26
hbase_MetricsTableRequests_updatePut_rdh
/** * Update the Put time histogram * * @param t * time it took */ public void updatePut(long t) { if (isEnableTableLatenciesMetrics()) { putTimeHistogram.update(t); } }
3.26
hbase_MetricsTableRequests_m2_rdh
/** * Update table read QPS * * @param count * Number of occurrences to record */ public void m2(long count) { if (isEnabTableQueryMeterMetrics()) { readMeter.mark(count);} }
3.26
hbase_NoLimitScannerContext_m0_rdh
/** * Returns the static, immutable instance of {@link NoLimitScannerContext} to be used whenever * limits should not be enforced */ @SuppressWarnings(value = "MS_EXPOSE_REP", justification = "singleton pattern") public static final ScannerContext m0() { return NO_LIMIT; }
3.26
hbase_ProcedureStoreBase_setRunning_rdh
/** * Change the state to 'isRunning', returns true if the store state was changed, false if the * store was already in that state. * * @param isRunning * the state to set. * @return true if the store state was changed, otherwise false. */ protected boolean setRunning(boolean isRunning) { return running.ge...
3.26
hbase_MemStoreLABImpl_incScannerCount_rdh
/** * Called when opening a scanner on the data of this MemStoreLAB */ @Override public void incScannerCount() { this.refCnt.retain(); }
3.26
hbase_MemStoreLABImpl_m0_rdh
/** * When a cell's size is too big (bigger than maxAlloc), copyCellInto does not allocate it on * MSLAB. Since the process of flattening to CellChunkMap assumes that all cells are allocated on * MSLAB, during this process, the big cells are copied into MSLAB using this method. */ @Overridepublic Cell m0(Cell cell)...
3.26
hbase_MemStoreLABImpl_getOrMakeChunk_rdh
/** * Get the current chunk, or, if there is no current chunk, allocate a new one from the JVM. */ private Chunk getOrMakeChunk() { // Try to get the chunk Chunk c = currChunk.get(); if (c != null) { return c; } // No current chunk, so we want to all...
3.26
hbase_MemStoreLABImpl_copyBBECellInto_rdh
/** * Mostly a duplicate of {@link #copyCellInto(Cell, int)}} done for perf sake. It presumes * ByteBufferExtendedCell instead of Cell so we deal with a specific type rather than the super * generic Cell. Removes instanceof checks. Shrinkage is enough to make this inline where before * it was too big. Uses less CPU...
3.26
hbase_MemStoreLABImpl_copyToChunkCell_rdh
/** * Clone the passed cell by copying its data into the passed buf and create a cell with a chunkid * out of it * * @see #copyBBECToChunkCell(ByteBufferExtendedCell, ByteBuffer, int, int) */ private static Cell copyToChunkCell(Cel...
3.26
hbase_MemStoreLABImpl_tryRetireChunk_rdh
/** * Try to retire the current chunk if it is still <code>c</code>. Postcondition is that * curChunk.get() != c * * @param c * the chunk to retire */ private void tryRetireChunk(Chunk c) { currChunk.compareAndSet(c, null); // If the CAS succeeds, that means that we won the race // to retire the ch...
3.26
hbase_MemStoreLABImpl_close_rdh
/** * Close this instance since it won't be used any more, try to put the chunks back to pool */ @Override public void close() { if (!this.closed.compareAndSet(false, true)) { return; } // We could put back the chunks to pool for reusing only when there is no // opening scanner which will read...
3.26
hbase_MemStoreLABImpl_decScannerCount_rdh
/** * Called when closing a scanner on the data of this MemStoreLAB */ @Override public void decScannerCount() { this.refCnt.release(); }
3.26
hbase_MemStoreLABImpl_copyCellInto_rdh
/** * * @see #copyBBECellInto(ByteBufferExtendedCell, int) */ private Cell copyCellInto(Cell cell, int maxAlloc) { int size = Segment.getCellLength(cell); Preconditions.checkArgument(size >= 0, "negative size"); // Callers should satisfy large allocations directly from JVM since they // don't cause f...
3.26
hbase_MemStoreLABImpl_copyBBECToChunkCell_rdh
/** * Clone the passed cell by copying its data into the passed buf and create a cell with a chunkid * out of it * * @see #copyToChunkCell(Cell, ByteBuffer, int, int) */ private static Cell copyBBECToChunkCell(ByteBufferExtendedCell cell, ByteBuffer buf, int offset, int len) { int tagsLen = cell.getTagsLength(...
3.26
hbase_JenkinsHash_m0_rdh
/** * Compute the hash of the specified file * * @param args * name of file to compute hash of. * @throws IOException * e */ public static void m0(String[] args) throws IOException { if (args.length != 1) { System.err.println("Usage: JenkinsHash filename"); System.exit(-1); }FileInput...
3.26
hbase_LogRollBackupSubprocedurePool_close_rdh
/** * Attempt to cleanly shutdown any running tasks - allows currently running tasks to cleanly * finish */ @Override public void close() { executor.shutdown(); }
3.26
hbase_LogRollBackupSubprocedurePool_waitForOutstandingTasks_rdh
/** * Wait for all of the currently outstanding tasks submitted via {@link #submitTask(Callable)} * * @return <tt>true</tt> on success, <tt>false</tt> otherwise * @throws ForeignException * exception */ public boolean waitForOutstandingTasks() throws ForeignException { LOG.debug("Waiting for backup procedur...
3.26
hbase_LogRollBackupSubprocedurePool_submitTask_rdh
/** * Submit a task to the pool. */ public void submitTask(final Callable<Void> task) { Future<Void> f = this.taskPool.submit(task); futures.add(f); }
3.26
hbase_JSONMetricUtil_dumpBeanToString_rdh
/** * Returns a subset of mbeans defined by qry. Modeled after DumpRegionServerMetrics#dumpMetrics. * Example: String qry= "java.lang:type=Memory" * * @throws MalformedObjectNameException * if json have bad format * @throws IOException * / * @return String representation of json array. */ public static Str...
3.26
hbase_JSONMetricUtil_buldKeyValueTable_rdh
/** * Method for building map used for constructing ObjectName. Mapping is done with arrays indices * * @param keys * Map keys * @param values * Map values * @return Map or null if arrays are empty or have different number of elements */ // javax requires hashtable param for ObjectName constructor @Suppress...
3.26
hbase_ReplicationSourceWALReader_addEntryToBatch_rdh
// returns true if we reach the size limit for batch, i.e, we need to finish the batch and return. protected final boolean addEntryToBatch(WALEntryBatch batch, Entry entry) { WALEdit edit = entry.getEdit(); if ((edit == null) || edit.isEmpty()) { LOG.trace("Edit null or empty for entry {} ", entry); ...
3.26
hbase_ReplicationSourceWALReader_checkBufferQuota_rdh
// returns false if we've already exceeded the global quota private boolean checkBufferQuota() { // try not to go over total quota if (!this.getSourceManager().checkBufferQuota(this.source.getPeerId())) { Threads.sleep(sleepForRetries); return false; } return true; }
3.26
hbase_ReplicationSourceWALReader_readWALEntries_rdh
// We need to get the WALEntryBatch from the caller so we can add entries in there // This is required in case there is any exception in while reading entries // we do not want to loss the existing entries in the batch protected void readWALEntries(WALEntryStream entryStream, WALEntryBatch batch) throws InterruptedExce...
3.26
hbase_ReplicationSourceWALReader_sizeOfStoreFilesIncludeBulkLoad_rdh
/** * Calculate the total size of all the store files * * @param edit * edit to count row keys from * @return the total size of the store files */ private int sizeOfStoreFilesIncludeBulkLoad(WALEdit edit) { List<Cell> cells = edit.getCells(); int totalStoreFilesSize = 0; int totalCells = edit.size()...
3.26
hbase_ReplicationSourceWALReader_take_rdh
/** * Retrieves the next batch of WAL entries from the queue, waiting up to the specified time for a * batch to become available * * @return A batch of entries, along with the position in the log after reading the batch * @throws InterruptedException * if interrupted while waiting */ public WALEntryBatch take(...
3.26
hbase_ReplicationSourceWALReader_countDistinctRowKeysAndHFiles_rdh
/** * Count the number of different row keys in the given edit because of mini-batching. We assume * that there's at least one Cell in the WALEdit. * * @param edit * edit to count row keys from * @return number of different row keys and HFiles */ private Pair<Integer, Integer> countDistinctRowKeysAndHFiles(WAL...
3.26
hbase_ReplicationSourceWALReader_setReaderRunning_rdh
/** * * @param readerRunning * the readerRunning to set */ public void setReaderRunning(boolean readerRunning) { this.isReaderRunning = readerRunning; }
3.26
hbase_ReplicationSourceWALReader_isReaderRunning_rdh
/** * Returns whether the reader thread is running */ public boolean isReaderRunning() { return isReaderRunning && (!isInterrupted()); }
3.26
hbase_AsyncFSWALProvider_createAsyncWriter_rdh
/** * Public because of AsyncFSWAL. Should be package-private */ public static AsyncWriter createAsyncWriter(Configuration conf, FileSystem fs, Path path, boolean overwritable, long blocksize, EventLoopGroup eventLoopGroup, Class<? extends Channel> channelClass, StreamSlowMonitor monitor) throws IOException { /...
3.26
hbase_AsyncFSWALProvider_load_rdh
/** * Test whether we can load the helper classes for async dfs output. */ public static boolean load() { try { Class.forName(FanOutOneBlockAsyncDFSOutput.class.getName()); Class.forName(FanOutOneBlockAsyncDFSOutputHelper.class.getName()); Class.forName(FanOutOneBlockAsyncDFSOutputSaslHel...
3.26
hbase_TimestampsFilter_parseFrom_rdh
/** * Parse a serialized representation of {@link TimestampsFilter} * * @param pbBytes * A pb serialized {@link TimestampsFilter} instance * @return An instance of {@link TimestampsFilter} made from <code>bytes</code> * @throws DeserializationException * if an error occurred * @see #toByteArray */ public s...
3.26
hbase_TimestampsFilter_areSerializedFieldsEqual_rdh
/** * Returns true if and only if the fields of the filter that are serialized are equal to the * corresponding fields in other. Used for testing. */ @Override boolean areSerializedFieldsEqual(Filter o) { if (o == this) { return true; } if (!(o instanceof TimestampsFilter)) { return ...
3.26
hbase_TimestampsFilter_getTimestamps_rdh
/** * Returns the list of timestamps */ public List<Long> getTimestamps() { List<Long> v1 = new ArrayList<>(timestamps.size()); v1.addAll(timestamps); return v1; }
3.26
hbase_TimestampsFilter_toByteArray_rdh
/** * Returns The filter serialized using pb */ @Override public byte[] toByteArray() { FilterProtos.TimestampsFilter.Builder v7 = FilterProtos.TimestampsFilter.newBuilder(); v7.addAllTimestamps(this.timestamps); v7.setCanHint(canHint); return v7.build().toByteArray(); }
3.26
hbase_TimestampsFilter_getNextCellHint_rdh
/** * Pick the next cell that the scanner should seek to. Since this can skip any number of cells any * of which can be a delete this can resurect old data. The method will only be used if canHint * was set to true while creating the filter. * * @throws IOException * This will never happen. */ @Override public...
3.26
hbase_TimestampsFilter_getMin_rdh
/** * Gets the minimum timestamp requested by filter. * * @return minimum timestamp requested by filter. */ public long getMin() { return minTimestamp; }
3.26
hbase_CellUtil_copyRowTo_rdh
/** * Copies the row to the given bytebuffer * * @param cell * cell the cell whose row has to be copied * @param destination * the destination bytebuffer to which the row has to be copied * @param destinationOffset * the offset in the destination byte[] * @return the offset of the bytebuffer after the co...
3.26
hbase_CellUtil_copyValueTo_rdh
/** * Copies the value to the given bytebuffer * * @param cell * the cell whose value has to be copied * @param destination * the destination bytebuffer to which the value has to be copied * @param destinationOffset * the offset in the destination bytebuffer * @return the offset of the bytebuffer after t...
3.26
hbase_CellUtil_matchingRows_rdh
/** * Compares the row of two keyvalues for equality */ public static boolean matchingRows(final Cell left, final short lrowlength, final Cell right, final short rrowlength) { if (lrowlength != rrowlength) return false; if ((left instanceof ByteBufferExtendedCell) && (right instanceof ByteBufferExten...
3.26
hbase_CellUtil_matchingQualifier_rdh
/** * Finds if the qualifier part of the cell and the KV serialized byte[] are equal. * * @return true if the qualifier matches, false otherwise */ public static boolean matchingQualifier(final Cell left, final byte[] buf) { if (buf == null) { return left.getQualifierLength() == 0; } ...
3.26
hbase_CellUtil_makeColumn_rdh
/** * Makes a column in family:qualifier form from separate byte arrays. * <p> * Not recommended for usage as this is old-style API. * * @return family:qualifier */ public static byte[] makeColumn(byte[] family, byte[] qualifier) { return Bytes.add(family, COLUMN_FAMILY_DELIM_ARRAY, qualifier); }
3.26
hbase_CellUtil_equals_rdh
/** * ************** equals *************************** */public static boolean equals(Cell a, Cell b) { return (((matchingRows(a, b) && m1(a, b)) && matchingQualifier(a, b)) && matchingTimestamp(a, b)) && PrivateCellUtil.matchingType(a, b); }
3.26
hbase_CellUtil_isDelete_rdh
/** * Return true if a delete type, a {@link KeyValue.Type#Delete} or a {KeyValue.Type#DeleteFamily} * or a {@link KeyValue.Type#DeleteColumn} KeyValue type. */ @SuppressWarnings("deprecation") public static boolean isDelete(final Cell cell) { return PrivateCellUtil.isDelete(cell.getTypeByte()); }
3.26
hbase_CellUtil_toString_rdh
/** * Returns a string representation of the cell */ public static String toString(Cell cell, boolean verbose) { if (cell == null) { return ""; } StringBuilder builder = new StringBuilder(); String keyStr = getCellKeyAsSt...
3.26
hbase_CellUtil_createCellScanner_rdh
/** * Flatten the map of cells out under the CellScanner * * @param map * Map of Cell Lists; for example, the map of families to Cells that is used inside * Put, etc., keeping Cells organized by family. * @return CellScanner interface over <code>cellIterable</code> */ public static CellScanner createCellSca...
3.26
hbase_CellUtil_copyQualifierTo_rdh
/** * Copies the qualifier to the given bytebuffer * * @param cell * the cell whose qualifier has to be copied * @param destination * the destination bytebuffer to which the qualifier has to be copied * @param destinationOffset * the offset in the destination bytebuffer * @return the offset of the bytebu...
3.26
hbase_CellUtil_setTimestamp_rdh
/** * Sets the given timestamp to the cell. Note that this method is a LimitedPrivate API and may * change between minor releases. * * @throws IOException * when the passed cell is not of type {@link ExtendedCell} */ @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.COPROC) public static void setTimestam...
3.26
hbase_CellUtil_copyRow_rdh
/** * Copies the row to a new byte[] * * @param cell * the cell from which row has to copied * @return the byte[] containing the row */ public static byte[] copyRow(Cell cell) { if (cell instanceof ByteBufferExtendedCell) { return ByteBufferUtils.copyOfRange(((ByteBufferExtendedCell) (cell)).getRo...
3.26
hbase_CellUtil_matchingRowColumn_rdh
/** * Compares the row and column of two keyvalues for equality */ public static boolean matchingRowColumn(final Cell left, final Cell right) { short lrowlength = left.getRowLength(); short rrowlength = right.getRowLength(); // match length if (lrowlength != rrowlength) { return false;...
3.26
hbase_CellUtil_matchingRowColumnBytes_rdh
/** * Compares the row and column of two keyvalues for equality */ public static boolean matchingRowColumnBytes(final Cell left, final Cell right) { int lrowlength = left.getRowLength(); int rrowlength = right.getRowLength(); int lfamlength = left.getFamilyLength(); int rfamlength =...
3.26
hbase_CellUtil_getCellKeyAsString_rdh
/** * Return the Key portion of the passed <code>cell</code> as a String. * * @param cell * the cell to convert * @param rowConverter * used to convert the row of the cell to a string * @return The Key portion of the passed <code>cell</code> as a String. */ public static String getCellKeyAsString(Cell cell,...
3.26
hbase_CellUtil_parseColumn_rdh
/** * Splits a column in {@code family:qualifier} form into separate byte arrays. An empty qualifier * (ie, {@code fam:}) is parsed as <code>{ fam, EMPTY_BYTE_ARRAY }</code> while no delimiter (ie, * {@code fam}) is parsed as an array of one element, <code>{ fam }</code>. * <p> * Don't forget, HBase DOES support e...
3.26
hbase_CellUtil_cloneRow_rdh
/** * *************** get individual arrays for tests *********** */ public static byte[] cloneRow(Cell cell) { byte[] output = new byte[cell.getRowLength()]; copyRowTo(cell, output, 0); return output; }
3.26
hbase_CellUtil_isPut_rdh
/** * Returns True if this cell is a Put. */ @SuppressWarnings("deprecation") public static boolean isPut(Cell cell) { return cell.getTypeByte() == Type.Put.getCode(); }
3.26
hbase_CellUtil_copyFamilyTo_rdh
/** * Copies the family to the given bytebuffer * * @param cell * the cell whose family has to be copied * @param destination * the destination bytebuffer to which the family has to be copied * @param destinationOffset * the offset in the destination bytebuffer * @return the offset of the bytebuffer afte...
3.26
hbase_CellUtil_matchingColumnFamilyAndQualifierPrefix_rdh
/** * Returns True if matching column family and the qualifier starts with <code>qual</code> */ public static boolean matchingColumnFamilyAndQualifierPrefix(final Cell left, final byte[] fam, final byte[] qual) { return matchingFamily(left, fam) && PrivateCellUtil.qualifierStartsWith(left, qual); }
3.26
hbase_QuotaState_isBypass_rdh
/** * Returns true if there is no quota information associated to this object */ public synchronized boolean isBypass() { return globalLimiter == NoopQuotaLimiter.get(); }
3.26
hbase_QuotaState_getGlobalLimiter_rdh
/** * Return the limiter associated with this quota. * * @return the quota limiter */ public synchronized QuotaLimiter getGlobalLimiter() { lastQuery = EnvironmentEdgeManager.currentTime(); return globalLimiter; }
3.26
hbase_QuotaState_setQuotas_rdh
/** * Setup the global quota information. (This operation is part of the QuotaState setup) */ public synchronized void setQuotas(final Quotas quotas) { if (quotas.hasThrottle()) { globalLimiter = QuotaLimiterFactory.fromThrottle(quotas.getThrottle()); } else { globalLimiter = NoopQuotaLimite...
3.26
hbase_QuotaState_getGlobalLimiterWithoutUpdatingLastQuery_rdh
/** * Return the limiter associated with this quota without updating internal last query stats * * @return the quota limiter */ synchronized QuotaLimiter getGlobalLimiterWithoutUpdatingLastQuery() { return globalLimiter;}
3.26
hbase_QuotaState_update_rdh
/** * Perform an update of the quota info based on the other quota info object. (This operation is * executed by the QuotaCache) */ public synchronized void update(final QuotaState other) { if (globalLimiter == NoopQuotaLimiter.get()) { globalLimiter = other.globalLimiter; } el...
3.26
hbase_ProcedureCoordinator_defaultPool_rdh
/** * Default thread pool for the procedure * * @param opThreads * the maximum number of threads to allow in the pool */ public static ThreadPoolExecutor defaultPool(String coordName, int opThreads) { return defaultPool(coordName, opThreads, KEEP_ALIVE_MILLIS_DEFAULT); }
3.26
hbase_ProcedureCoordinator_createProcedure_rdh
/** * Exposed for hooking with unit tests. * * @return the newly created procedure */ Procedure createProcedure(ForeignExceptionDispatcher fed, String procName, byte[] procArgs, List<String> expectedMembers) { // build the procedure return new Procedure(this, fed, wakeTimeMillis, timeoutMillis, procName, procArgs, ...
3.26
hbase_ProcedureCoordinator_close_rdh
/** * Shutdown the thread pools and release rpc resources */ public void close() throws IOException { // have to use shutdown now to break any latch waiting pool.shutdownNow(); rpcs.close(); }
3.26
hbase_ProcedureCoordinator_rpcConnectionFailure_rdh
/** * The connection to the rest of the procedure group (members and coordinator) has been * broken/lost/failed. This should fail any interested procedures, but not attempt to notify other * members since we cannot reach them anymore. * * @param message * description of the error * @param cause * the actual...
3.26
hbase_ProcedureCoordinator_getProcedureNames_rdh
/** * Returns Return set of all procedure names. */ public Set<String> getProcedureNames() { return new HashSet<>(procedures.keySet()); }
3.26
hbase_ProcedureCoordinator_getProcedure_rdh
/** * Returns the procedure. This Procedure is a live instance so should not be modified but can be * inspected. * * @param name * Name of the procedure * @return Procedure or null if not present any more */ public Procedure getProcedure(String name) { return procedures.get(name); }
3.26
hbase_ProcedureCoordinator_getRpcs_rdh
/** * Returns the rpcs implementation for all current procedures */ ProcedureCoordinatorRpcs getRpcs() { return rpcs;}
3.26
hbase_ProcedureCoordinator_memberAcquiredBarrier_rdh
/** * Notification that the procedure had the specified member acquired its part of the barrier via * {@link Subprocedure#acquireBarrier()}. * * @param procName * name of the procedure that acquired * @param member * name of the member that acquired */ void memberAcquiredBarrier(String procName, final Strin...
3.26
hbase_ProcedureCoordinator_abortProcedure_rdh
/** * Abort the procedure with the given name * * @param procName * name of the procedure to abort * @param reason * serialized information about the abort */ public void abortProcedure(String procName, ForeignException reason) { LOG.debug("abort procedure " + procName, reason); // if we know about the Proc...
3.26
hbase_ProcedureCoordinator_memberFinishedBarrier_rdh
/** * Notification that the procedure had another member finished executing its in-barrier subproc * via {@link Subprocedure#insideBarrier()}. * * @param procName * name of the subprocedure that finished * @param member * name of the member that executed and released its barrier * @param dataFromMember * ...
3.26
hbase_RegionServerTracker_processAsActiveMaster_rdh
// execute the operations which are only needed for active masters, such as expire old servers, // add new servers, etc. private void processAsActiveMaster(Set<ServerName> newServers) { Set<ServerName> oldServers = regionServers; ServerManager serverManager = server.getServerManager(); // expire dead servers for (Serve...
3.26
hbase_RegionServerTracker_upgrade_rdh
/** * Upgrade to active master mode, where besides tracking the changes of region server set, we will * also started to add new region servers to ServerManager and also schedule SCP if a region * server dies. Starts the tracking of online RegionServers. All RSes will be tracked after this * method is called. * <p/...
3.26
hbase_ClusterStatusListener_receive_rdh
/** * Acts upon the reception of a new cluster status. * * @param ncs * the cluster status */ public void receive(ClusterMetrics ncs) { if (ncs.getDeadServerNames() != null) { for (ServerName sn : ncs.getDeadServerNames()) { if (!isDeadServer(sn)) { LOG.info("There is a n...
3.26
hbase_ClusterStatusListener_isDeadServer_rdh
/** * Check if we know if a server is dead. * * @param sn * the server name to check. * @return true if we know for sure that the server is dead, false otherwise. */ public boolean isDeadServer(ServerName sn) { if (sn.getStartcode() <= 0) { return false; } for (ServerName dead : deadServers...
3.26
hbase_FileArchiverNotifierImpl_persistSnapshotSizeChanges_rdh
/** * Reads the current size for each snapshot to update, generates a new update based on that value, * and then writes the new update. * * @param snapshotSizeChanges * A map of snapshot name to size change */ void persistSnapshotSizeChanges(Map<String, Long> snapshotSizeChanges) throws IOException { try (T...
3.26
hbase_FileArchiverNotifierImpl_getSizeOfStoreFiles_rdh
/** * Computes the size of each store file in {@code storeFileNames} */ long getSizeOfStoreFiles(TableName tn, Set<StoreFileReference> storeFileNames) { return storeFileNames.stream().collect(Collectors.summingLong(sfr -> getSizeOfStoreFile(tn, sfr))); }
3.26
hbase_FileArchiverNotifierImpl_getLastFullCompute_rdh
/** * Returns a strictly-increasing measure of time extracted by {@link System#nanoTime()}. */ long getLastFullCompute() { return lastFullCompute; }
3.26
hbase_FileArchiverNotifierImpl_computeSnapshotSizes_rdh
/** * Computes the size of each snapshot against the table referenced by {@code this}. * * @param snapshots * A sorted list of snapshots against {@code tn}. * @return A list of the size for each snapshot against {@code tn}. */ ...
3.26
hbase_FileArchiverNotifierImpl_persistSnapshotSizes_rdh
/** * Writes the snapshot sizes to the provided {@code table}. */ void persistSnapshotSizes(Table table, List<SnapshotWithSize> snapshotSizes) throws IOException { // Convert each entry in the map to a Put and write them to the quota table table.put(snapshotSizes.stream().map(sws -> QuotaTableUtil.createPutFo...
3.26
hbase_FileArchiverNotifierImpl_getStoreFilesFromSnapshot_rdh
/** * Extracts the names of the store files referenced by this snapshot which satisfy the given * predicate (the predicate returns {@code true}). */ Set<StoreFileReference> getStoreFilesFromSnapshot(SnapshotManifest manifest, Predicate<String> filter) { Set<StoreFileReference> references = new HashSet<>(); /...
3.26
hbase_FileArchiverNotifierImpl_groupArchivedFiledBySnapshotAndRecordSize_rdh
/** * For each file in the map, this updates the first snapshot (lexicographic snapshot name) that * references this file. The result of this computation is serialized to the quota table. * * @param snapshots * A collection of HBase snapshots to group the files into * @param fileSizes * A map of file names t...
3.26
hbase_FileArchiverNotifierImpl_getSizeOfStoreFile_rdh
/** * Computes the size of the store file given its name, region and family name in the archive * directory. */ long getSizeOfStoreFile(TableName tn, String regionName, String family, String storeFile) { Path familyArchivePath; try { familyArchivePath = HFileArchiveUtil.getStoreArchivePath(conf, tn, ...
3.26
hbase_FileArchiverNotifierImpl_getSnapshotSizeFromResult_rdh
/** * Extracts the size component from a serialized {@link SpaceQuotaSnapshot} protobuf. * * @param r * A Result containing one cell with a SpaceQuotaSnapshot protobuf * @return The size in bytes of the snapshot. */ long getSnapshotSizeFromResult(Result r) throws InvalidProtocolBufferException { // Per java...
3.26
hbase_FileArchiverNotifierImpl_getPreviousNamespaceSnapshotSize_rdh
/** * Fetches the current size of all snapshots in the given {@code namespace}. * * @param quotaTable * The HBase quota table * @param namespace * Namespace to fetch the sum of snapshot sizes for * @return The size of all snapshot sizes for the namespace in bytes. */ long getPreviousNamespaceSnapshotSize(Ta...
3.26