name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hbase_WALInputFormat_getSplits_rdh
/** * implementation shared with deprecated HLogInputFormat */ List<InputSplit> getSplits(final JobContext context, final String startKey, final String endKey) throws IOException, InterruptedException { Configuration conf = context.getConfiguration(); boolean ignoreMissing = conf.getBoolean(WALPlayer.IGNORE_MISSING...
3.26
hbase_WALInputFormat_getFiles_rdh
/** * * @param startTime * If file looks like it has a timestamp in its name, we'll check if newer or * equal to this value else we will filter out the file. If name does not seem to * have a timestamp, we will just return it w/o filtering. * @param endTime * If file looks like it has a timestamp in its ...
3.26
hbase_ScanDeleteTracker_update_rdh
// should not be called at all even (!) @Override public void update() { this.reset(); }
3.26
hbase_ScanDeleteTracker_reset_rdh
// called between every row. @Override public void reset() { hasFamilyStamp = false; familyStamp = 0L; familyVersionStamps.clear(); deleteCell = null; }
3.26
hbase_ScanDeleteTracker_isDeleted_rdh
/** * Check if the specified Cell buffer has been deleted by a previously seen delete. * * @param cell * - current cell to check if deleted by a previously seen delete */ @Override public DeleteResult isDeleted(Cell cell) { long timestamp = cell.getTimestamp(); if (hasFamilyStamp && (timestamp <= familyS...
3.26
hbase_ScanDeleteTracker_add_rdh
/** * Add the specified Cell to the list of deletes to check against for this row operation. * <p> * This is called when a Delete is encountered. * * @param cell * - the delete cell */ @Override public void add(Cell cell) { long timestamp = cell.getTimestamp(); byte type = cell.getTypeByte(); if ((...
3.26
hbase_RegionInfoDisplay_getStartKeyForDisplay_rdh
/** * Get the start key for display. Optionally hide the real start key. * * @return the startkey */ public static byte[] getStartKeyForDisplay(RegionInfo ri, Configuration conf) { boolean displayKey = conf.getBoolean(DISPLAY_KEYS_KEY, true); if (displayKey) return ri.getStartKey(); return HIDD...
3.26
hbase_RegionInfoDisplay_getRegionNameForDisplay_rdh
/** * Get the region name for display. Optionally hide the start key. * * @return region name bytes */ public static byte[] getRegionNameForDisplay(RegionInfo ri, Configuration conf) { boolean displayKey = conf.getBoolean(DISPLAY_KEYS_KEY, true); if (displayKey || ri.getTable().equals(TableName.META_TABL...
3.26
hbase_RegionInfoDisplay_getRegionNameAsStringForDisplay_rdh
/** * Get the region name for display. Optionally hide the start key. * * @return region name as String */ public static String getRegionNameAsStringForDisplay(RegionInfo ri, Configuration conf) { return Bytes.toStringBinary(getRegi...
3.26
hbase_SortedList_get_rdh
/** * Returns a reference to the unmodifiable list currently backing the SortedList. Changes to the * SortedList will not be reflected in this list. Use this method to get a reference for iterating * over using the RandomAccess pattern. */ public List<E> get() { // FindBugs: UG_SYNC_SET_UNSYNC_GET complaint. Fi...
3.26
hbase_BufferedMutatorParams_setWriteBufferPeriodicFlushTimeoutMs_rdh
/** * Set the max timeout before the buffer is automatically flushed. */ public BufferedMutatorParams setWriteBufferPeriodicFlushTimeoutMs(long timeoutMs) { this.writeBufferPeriodicFlushTimeoutMs = timeoutMs; return this; }
3.26
hbase_BufferedMutatorParams_listener_rdh
/** * Override the default error handler. Default handler simply rethrows the exception. */ public BufferedMutatorParams listener(BufferedMutator.ExceptionListener listener) { this.listener = listener; return this; }
3.26
hbase_BufferedMutatorParams_writeBufferSize_rdh
/** * Override the write buffer size specified by the provided {@link Connection}'s * {@link org.apache.hadoop.conf.Configuration} instance, via the configuration key * {@code hbase.client.write.buffer}. */ public BufferedMutatorParams writeBufferSize(long writeBufferSize) { this.writeBufferSize = writeBuff...
3.26
hbase_BufferedMutatorParams_maxKeyValueSize_rdh
/** * Override the maximum key-value size specified by the provided {@link Connection}'s * {@link org.apache.hadoop.conf.Configuration} instance, via the configuration key * {@code hbase.client.keyvalue.maxsize}. */ public BufferedMutatorParams maxKeyValueSize(int maxKeyValueSize) { this.maxKeyValueSize = maxK...
3.26
hbase_BufferedMutatorParams_opertationTimeout_rdh
/** * * @deprecated Since 2.3.0, will be removed in 4.0.0. Use {@link #operationTimeout(int)} */ @Deprecated public BufferedMutatorParams opertationTimeout(final int operationTimeout) { this.operationTimeout = operationTimeout; return this; }
3.26
hbase_SpaceViolationPolicyEnforcementFactory_createWithoutViolation_rdh
/** * Creates the "default" {@link SpaceViolationPolicyEnforcement} for a table that isn't in * violation. This is used to have uniform policy checking for tables in and not quotas. This * policy will still verify that new bulk loads do not exceed the configured quota limit. * * @param rss ...
3.26
hbase_SpaceViolationPolicyEnforcementFactory_create_rdh
/** * Constructs the appropriate {@link SpaceViolationPolicyEnforcement} for tables that are in * violation of their space quota. */ public SpaceViolationPolicyEnforcement create(RegionServerServices rss, TableName tableName, SpaceQuotaSnapshot snapshot) { SpaceViolationPolicyEnforcement enforcement; SpaceQu...
3.26
hbase_SpaceViolationPolicyEnforcementFactory_getInstance_rdh
/** * Returns an instance of this factory. */ public static SpaceViolationPolicyEnforcementFactory getInstance() { return INSTANCE; }
3.26
hbase_AsyncBufferedMutator_getPeriodicalFlushTimeout_rdh
/** * Returns the periodical flush interval, 0 means disabled. */ default long getPeriodicalFlushTimeout(TimeUnit unit) {throw new UnsupportedOperationException("Not implemented"); }
3.26
hbase_SegmentFactory_createMutableSegment_rdh
// create mutable segment public MutableSegment createMutableSegment(final Configuration conf, CellComparator comparator, MemStoreSizing memstoreSizing) {MemStoreLAB memStoreLAB = MemStoreLAB.newInstance(conf); return generateMutableSegment(conf, comparator, memStoreLAB, memstoreSizing); }
3.26
hbase_SegmentFactory_createImmutableSegment_rdh
// ****** private methods to instantiate concrete store segments **********// private ImmutableSegment createImmutableSegment(final Configuration conf, final CellComparator comparator, MemStoreSegmentsIterator iterator, MemStoreLAB memStoreLAB, int numOfCells, MemStoreCompactionStrategy.Action action, CompactingMemSto...
3.26
hbase_SegmentFactory_createImmutableSegmentByCompaction_rdh
// create new flat immutable segment from compacting old immutable segments // for compaction public ImmutableSegment createImmutableSegmentByCompaction(final Configuration conf, final CellComparator comparator, MemStoreSegmentsIterator iterator, int numOfCells, CompactingMemStore.IndexType idxType, MemStoreCompactionS...
3.26
hbase_SegmentFactory_createCompositeImmutableSegment_rdh
// create composite immutable segment from a list of segments // for snapshot consisting of multiple segments public CompositeImmutableSegment createCompositeImmutableSegment(final CellComparator comparator, List<ImmutableSegment> segments) { return new CompositeImmutableSegment(comparator, segments); }
3.26
hbase_SegmentFactory_createImmutableSegmentByMerge_rdh
// create new flat immutable segment from merging old immutable segments // for merge public ImmutableSegment createImmutableSegmentByMerge(final Configuration conf, final CellComparator comparator, MemStoreSegmentsIterator iterator, int numOfCells, List<ImmutableSegment> segments, CompactingMemStore.IndexType idxType,...
3.26
hbase_Triple_create_rdh
// ctor cannot infer types w/o warning but a method can. public static <A, B, C> Triple<A, B, C> create(A first, B second, C third) { return new Triple<>(first, second, third); }
3.26
hbase_AbstractClientScanner_initScanMetrics_rdh
/** * Check and initialize if application wants to collect scan metrics */ protected void initScanMetrics(Scan scan) { // check if application wants to collect scan metrics if (scan.isScanMetricsEnabled()) { scanMetrics = new ScanMetrics(); } }
3.26
hbase_AbstractClientScanner_getScanMetrics_rdh
/** * Used internally accumulating metrics on scan. To enable collection of metrics on a Scanner, * call {@link Scan#setScanMetricsEnabled(boolean)}. * * @return Returns the running {@link ScanMetrics} instance or null if scan metrics not enabled. */ @Override public ScanMetrics getScanMetrics() { return scanM...
3.26
hbase_AsyncConnection_getBufferedMutator_rdh
/** * Retrieve an {@link AsyncBufferedMutator} for performing client-side buffering of writes. * <p> * The returned instance will use default configs. Use * {@link #getBufferedMutatorBuilder(TableName, ExecutorService)} if you want to customize some * configs. * * @param tableName * the name of the table * @...
3.26
hbase_AsyncConnection_getTable_rdh
/** * Retrieve an {@link AsyncTable} implementation for accessing a table. * <p> * The returned instance will use default configs. Use {@link #getTableBuilder(TableName)} if you * want to customize some configs. * <p> * This method no longer checks table existence. An exception will be thrown if the table does no...
3.26
hbase_AsyncConnection_m0_rdh
/** * Retrieve an {@link AsyncTable} implementation for accessing a table. * <p> * This method no longer checks table existence. An exception will be thrown if the table does not * exist only when the first operation is attempted. * * @param tableName * the name of the table * @param pool * the thread pool...
3.26
hbase_AsyncConnection_getAdmin_rdh
/** * Retrieve an {@link AsyncAdmin} implementation to administer an HBase cluster. * <p> * The returned instance will use default configs. Use {@link #getAdminBuilder(ExecutorService)} * if you want to customize some configs. * * @param pool * the thread pool to use for executing callback * @return an {@link...
3.26
hbase_StateMachineProcedure_isRollbackSupported_rdh
/** * Used by the default implementation of abort() to know if the current state can be aborted and * rollback can be triggered. */ protected boolean isRollbackSupported(final TState state) { return false; }
3.26
hbase_StateMachineProcedure_setNextState_rdh
/** * Set the next state for the procedure. * * @param stateId * the ordinal() of the state enum (or state id) */ private void setNextState(final int stateId) { if ((states == null) || (states.length == stateCount)) { int newCapacity = stateCount + 8; if (states != null) { st...
3.26
hbase_StateMachineProcedure_failIfAborted_rdh
/** * If procedure has more states then abort it otherwise procedure is finished and abort can be * ignored. */ protected final void failIfAborted() { if (aborted.get()) { if (hasMoreState()) { setAbortFailure(getClass().getSimpleName(), "abort requested"); } else { LOG.w...
3.26
hbase_StateMachineProcedure_getCurrentStateId_rdh
/** * This method is used from test code as it cannot be assumed that state transition will happen * sequentially. Some procedures may skip steps/ states, some may add intermediate steps in * future. */ public int getCurrentStateId() { return getStateId(getCurrentState()); }
3.26
hbase_StateMachineProcedure_addChildProcedure_rdh
/** * Add a child procedure to execute * * @param subProcedure * the child procedure */ protected <T extends Procedure<TEnvironment>> void addChildProcedure(@SuppressWarnings("unchecked") T... subProcedure) { if (subProcedure == null) {return; } final int len = subProcedure.length; if (len =...
3.26
hbase_ColumnValueFilter_getCompareOperator_rdh
/** * Returns operator */ public CompareOperator getCompareOperator() { return op; }
3.26
hbase_ColumnValueFilter_getFamily_rdh
/** * Returns the column family */ public byte[] getFamily() { return family; }
3.26
hbase_ColumnValueFilter_compareValue_rdh
/** * This method is used to determine a cell should be included or filtered out. * * @param op * one of operators {@link CompareOperator} * @param comparator * comparator used to compare cells. * @param cell * cell to be compared. * @return true means cell should be filtered out, included otherwise. */...
3.26
hbase_ColumnValueFilter_getQualifier_rdh
/** * Returns the qualifier */ public byte[] getQualifier() { return qualifier; }
3.26
hbase_ColumnValueFilter_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; } else if (!(o instanceof C...
3.26
hbase_ColumnValueFilter_convert_rdh
/** * Returns A pb instance to represent this instance. */ ColumnValueFilter convert() { FilterProtos.ColumnValueFilter.Builder builder = FilterProtos.ColumnValueFilter.newBuilder(); builder.setFamily(UnsafeByteOperations.unsafeWrap(this.family)); builder.setQualifier(UnsafeByteOperations.unsafeWrap(this....
3.26
hbase_ColumnValueFilter_parseFrom_rdh
/** * Parse a serialized representation of {@link ColumnValueFilter} * * @param pbBytes * A pb serialized {@link ColumnValueFilter} instance * @return An instance of {@link ColumnValueFilter} made from <code>bytes</code> * @throws DeserializationException * if an error occurred * @see #toByteArray */ publi...
3.26
hbase_ColumnValueFilter_createFilterFromArguments_rdh
/** * Creating this filter by reflection, it is used by {@link ParseFilter}, * * @param filterArguments * arguments for creating a ColumnValueFilter * @return a ColumnValueFilter */ public static Filter createFilterFromArguments(ArrayList<byte[]> filterArguments) { Preconditions.checkArgument(filterArgument...
3.26
hbase_ColumnValueFilter_getComparator_rdh
/** * Returns the comparator */public ByteArrayComparable getComparator() { return comparator; }
3.26
hbase_ZkSplitLogWorkerCoordination_attemptToOwnTask_rdh
/** * Try to own the task by transitioning the zk node data from UNASSIGNED to OWNED. * <p> * This method is also used to periodically heartbeat the task progress by transitioning the node * from OWNED to OWNED. * <p> * * @param isFirstTime * shows whther it's the first attempt. * @param zkw * zk wathcer ...
3.26
hbase_ZkSplitLogWorkerCoordination_endTask_rdh
/* Next part is related to WALSplitterHandler */ /** * endTask() can fail and the only way to recover out of it is for the * {@link org.apache.hadoop.hbase.master.SplitLogManager} to timeout the task node. */ @Override public void endTask(SplitLogTask slt, LongAdder ctr, SplitTaskDetails details) { ZkSplitTaskDetail...
3.26
hbase_ZkSplitLogWorkerCoordination_getDataSetWatchFailure_rdh
/* Support functions for ZooKeeper async callback */ void getDataSetWatchFailure(String path) {synchronized(grabTaskLock) { if (workerInGrabTask) { // currentTask can change but that's ok String taskpath = currentTask; if ((taskpath != null) && taskpath.equals(path)) {LOG...
3.26
hbase_ZkSplitLogWorkerCoordination_init_rdh
/** * Override setter from {@link SplitLogWorkerCoordination} */ @Override public void init(RegionServerServices server, Configuration conf, TaskExecutor splitExecutor, SplitLogWorker worker) { this.server = server; this.worker = worker; this.splitTaskExecutor = splitExecutor; maxConcurrentTasks = ...
3.26
hbase_ZkSplitLogWorkerCoordination_nodeChildrenChanged_rdh
/** * Override handler from {@link ZKListener} */ @Override public void nodeChildrenChanged(String path) { if (path.equals(watcher.getZNodePaths().splitLogZNode)) { if (LOG.isTraceEnabled()) { LOG.trace("tasks arrived or departed on " + path); } synchronized(taskReadySeq) { ...
3.26
hbase_ZkSplitLogWorkerCoordination_submitTask_rdh
/** * Submit a log split task to executor service * * @param curTask * task to submit * @param curTaskZKVersion * current version of task */ void submitTask(final String curTask, final int curTaskZKVersion, final int reportPeriod) { final MutableInt zkVersion = new MutableInt(curTaskZKVersion); CancelablePro...
3.26
hbase_ZkSplitLogWorkerCoordination_areSplittersAvailable_rdh
/** * Returns true if more splitters are available, otherwise false. */ private boolean areSplittersAvailable() { return (maxConcurrentTasks - tasksInProgress.get()) > 0; }
3.26
hbase_ZkSplitLogWorkerCoordination_grabTask_rdh
/** * try to grab a 'lock' on the task zk node to own and execute the task. * <p> * * @param path * zk node for the task * @return boolean value when grab a task success return true otherwise false */ private boolean grabTask(String path) ...
3.26
hbase_ZkSplitLogWorkerCoordination_taskLoop_rdh
/** * Wait for tasks to become available at /hbase/splitlog zknode. Grab a task one at a time. This * policy puts an upper-limit on the number of simultaneous log splitting that could be happening * in a cluster. * <p> * Synchronization using <code>taskReadySeq</code> ensures that it will try to grab every task *...
3.26
hbase_ZkSplitLogWorkerCoordination_nodeDataChanged_rdh
/** * Override handler from {@link ZKListener} */ @Override public void nodeDataChanged(String path) { // there will be a self generated dataChanged event every time attemptToOwnTask() // heartbeats the task znode by upping its version synchronized(grabTaskLock) { if (workerInGrabTask) {// curren...
3.26
hbase_RowMutations_add_rdh
/** * Add a list of mutations * * @param mutations * The data to send. * @throws IOException * if the row of added mutation doesn't match the original row */public RowMutations add(List<? extends Mutation> mutations) throws IOException { for (Mutation mutation : mutations) { if (!Bytes.equals...
3.26
hbase_RowMutations_of_rdh
/** * Create a {@link RowMutations} with the specified mutations. * * @param mutations * the mutations to send * @throws IOException * if any row in mutations is different to another */ public static RowMutations of(List<? extends Mutation> mutations) throws IOException { if (CollectionUtils.isEmpty(...
3.26
hbase_RowMutations_getMutations_rdh
/** * Returns An unmodifiable list of the current mutations. */ public List<Mutation> getMutations() { return Collections.unmodifiableList(mutations); }
3.26
hbase_RemoteWithExtrasException_isDoNotRetry_rdh
/** * Returns True if origin exception was a do not retry type. */ public boolean isDoNotRetry() { return this.doNotRetry; }
3.26
hbase_RemoteWithExtrasException_isServerOverloaded_rdh
/** * Returns True if the server was considered overloaded when the exception was thrown. */ public boolean isServerOverloaded() { return serverOverloaded; }
3.26
hbase_RemoteWithExtrasException_getPort_rdh
/** * Returns -1 if not set */ public int getPort() { return this.port; }
3.26
hbase_TableSpanBuilder_populateTableNameAttributes_rdh
/** * Static utility method that performs the primary logic of this builder. It is visible to other * classes in this package so that other builders can use this functionality as a mix-in. * * @param attributes * the attributes map to be populated. * @param tableName * the source of attribute values. */ sta...
3.26
hbase_Replication_startReplicationService_rdh
/** * If replication is enabled and this cluster is a master, it starts */ @Overridepublic void startReplicationService() throws IOException { this.replicationManager.init(); this.server.getChoreService().scheduleChore(new ReplicationStatisticsChore("ReplicationSourceStatistics", server, ((int) (TimeUnit.SECO...
3.26
hbase_Replication_stopReplicationService_rdh
/** * Stops replication service. */ @Override public void stopReplicationService() { this.replicationManager.join(); }
3.26
hbase_Replication_getReplicationManager_rdh
/** * Get the replication sources manager * * @return the manager if replication is enabled, else returns false */ public ReplicationSourceManager getReplicationManager() {return this.replicationManager; }
3.26
hbase_RowPrefixFixedLengthBloomContext_getRowPrefixCell_rdh
/** * * @param cell * the cell * @return the new cell created by row prefix */ private Cell getRowPrefixCell(Cell cell) {byte[] row = CellUtil.copyRow(cell); return ExtendedCellBuilderFactory.create(CellBuilderType.DEEP_COPY).setRow(row, 0, Math.min(prefixLength, row.length)).setType(Type.Put).build(); }
3.26
hbase_LockStatus_getExclusiveLockProcIdOwner_rdh
/** * Return the id of the procedure which holds the exclusive lock, if exists. Or a negative value * which means no one holds the exclusive lock. * <p/> * Notice that, in HBase, we assume that the procedure id is positive, or at least non-negative. */ default long getExclusiveLockProcIdOwner() { Procedure<?> ...
3.26
hbase_LockStatus_isLocked_rdh
/** * Return whether this lock has already been held, * <p/> * Notice that, holding the exclusive lock or shared lock are both considered as locked, i.e, this * method usually equals to {@code hasExclusiveLock() || getSharedLockCount() > 0}. */ default boolean isLocked() { return m0() || (getSharedLockCount() ...
3.26
hbase_JVM_getSystemLoadAverage_rdh
/** * Get the system load average * * @see java.lang.management.OperatingSystemMXBean#getSystemLoadAverage */public double getSystemLoadAverage() { return osMbean.getSystemLoadAverage(); }
3.26
hbase_JVM_isAmd64_rdh
/** * Check if the arch is amd64; * * @return whether this is amd64 or not. */ public static boolean isAmd64() { return amd64; }
3.26
hbase_JVM_runUnixMXBeanMethod_rdh
/** * Load the implementation of UnixOperatingSystemMXBean for Oracle jvm and runs the desired * method. * * @param mBeanMethodName * : method to run from the interface UnixOperatingSystemMXBean * @return the method result */ private Long runUnixMXBeanMethod(String mBeanMethodName) { Object unixos; Cla...
3.26
hbase_JVM_getFreeMemory_rdh
/** * Return the physical free memory (not the JVM one, as it's not very useful as it depends on the * GC), but the one from the OS as it allows a little bit more to guess if the machine is * overloaded or not). */ public long getFreeMemory() { if (ibmvendor) { return 0; } Long r = runUnixMXBeanMet...
3.26
hbase_JVM_getOpenFileDescriptorCount_rdh
/** * Get the number of opened filed descriptor for the runtime jvm. If Oracle java, it will use the * com.sun.management interfaces. Otherwise, this methods implements it (linux only). * * @return number of open file descriptors for the jvm */ public long getOpenFileDescriptorCount() { Long ofdc; if (!ibmvend...
3.26
hbase_JVM_getMaxFileDescriptorCount_rdh
/** * Get the number of the maximum file descriptors the system can use. If Oracle java, it will use * the com.sun.management interfaces. Otherwise, this methods implements it (linux only). * * @return max number of file descriptors the operating system can use. */ public long getMaxFileDescriptorCount() { Long mf...
3.26
hbase_JVM_isGZIPOutputStreamFinishBroken_rdh
/** * Check if the finish() method of GZIPOutputStream is broken * * @return whether GZIPOutputStream.finish() is broken. */ public static boolean isGZIPOutputStreamFinishBroken() { return ibmvendor && JVMVersion.contains("1.6.0"); }
3.26
hbase_JVM_getNumberOfRunningProcess_rdh
/** * Workaround to get the current number of process running. Approach is the one described here: * http://stackoverflow.com/questions/54686/how-to-get-a-list-of-current-open-windows-process-with-java */ @SuppressWarnings(value = "RV_DONT_JUST_NULL_CHECK_READLINE", justification = "used by testing") public int get...
3.26
hbase_JVM_isAarch64_rdh
/** * Check if the arch is aarch64; * * @return whether this is aarch64 or not. */ public static boolean isAarch64() { return aarch64; }
3.26
hbase_JVM_isUnix_rdh
/** * Check if the OS is unix. * * @return whether this is unix or not. */ public static boolean isUnix() { if (windows) { return false; } return ibmvendor ? linux : true; }
3.26
hbase_FavoredNodeLoadBalancer_availableServersContains_rdh
// Do a check of the hostname and port and return the servername from the servers list // that matched (the favoredNode will have a startcode of -1 but we want the real // server with the legit startcode private ServerName availableServersContains(List<ServerName> servers, ServerName favoredNode) { for (ServerName ...
3.26
hbase_CoprocessorWhitelistMasterObserver_verifyCoprocessors_rdh
/** * Perform the validation checks for a coprocessor to determine if the path is white listed or * not. * * @throws IOException * if path is not included in whitelist or a failure occurs in processing * @param ctx * as passed in from the coprocessor * @param htd * as passed in from the coprocessor */ p...
3.26
hbase_CoprocessorWhitelistMasterObserver_validatePath_rdh
/** * Validates a single whitelist path against the coprocessor path * * @param coprocPath * the path to the coprocessor including scheme * @param wlPath * can be: 1) a "*" to wildcard all coprocessor paths 2) a specific filesystem * (e.g. hdfs://my-cluster/) 3) a wildcard path to be evaluated by * {@li...
3.26
hbase_RegionServerSnapshotManager_waitForOutstandingTasks_rdh
/** * Wait for all of the currently outstanding tasks submitted via {@link #submitTask(Callable)}. * This *must* be called after all tasks are submitted via submitTask. * * @return <tt>true</tt> on success, <tt>false</tt> otherwise * @throws SnapshotCreationException * if the snapsho...
3.26
hbase_RegionServerSnapshotManager_initialize_rdh
/** * Create a default snapshot handler - uses a zookeeper based member controller. * * @param rss * region server running the handler * @throws KeeperException * if the zookeeper cluster cannot be reached */ @Override public void initialize(RegionServerServices rss) throws KeeperException { this.rss = rss;...
3.26
hbase_RegionServerSnapshotManager_buildSubprocedure_rdh
/** * If in a running state, creates the specified subprocedure for handling an online snapshot. * Because this gets the local list of regions to snapshot and not the set the master had, there * is a possibility of a race where regions may be missed. This detected by the master in the * snapshot verification step. ...
3.26
hbase_RegionServerSnapshotManager_submitTask_rdh
/** * Submit a task to the pool. NOTE: all must be submitted before you can safely * {@link #waitForOutstandingTasks()}. This version does not support issuing tasks from multiple * concurrent table snapshots requests. */ void submitTask(final Callable<Void> task) { Future<Void> f = this.taskPool.submit(task); ...
3.26
hbase_RegionServerSnapshotManager_cancelTasks_rdh
/** * This attempts to cancel out all pending and in progress tasks (interruptions issues) */ void cancelTasks() throws InterruptedException {Collection<Future<Void>> tasks = futures; LOG.debug((("cancelling " + tasks.size()) + " tasks for snapshot ") + name); for (Future<Void> f : tasks) { // TODO ...
3.26
hbase_RegionServerSnapshotManager_start_rdh
/** * Start accepting snapshot requests. */ @Overridepublic void start() { LOG.debug("Start Snapshot Manager " + rss.getServerName().toString());this.f0.start(rss.getServerName().toString(), member); }
3.26
hbase_RegionServerSnapshotManager_stop_rdh
/** * Abruptly shutdown the thread pool. Call when exiting a region server. */ void stop() { if (this.stopped) return; this.stopped = true; this.executor.shutdown(); }
3.26
hbase_JvmPauseMonitor_main_rdh
/** * Simple 'main' to facilitate manual testing of the pause monitor. This main function just leaks * memory into a list. Running this class with a 1GB heap will very quickly go into "GC hell" and * result in log messages about the GC pauses. */ public static void main(String[] args) throws Exception { new JvmPaus...
3.26
hbase_StoreHotnessProtector_m0_rdh
/** * {@link #init(Configuration)} is called for every Store that opens on a RegionServer. Here we * make a lightweight attempt to log this message once per RegionServer, rather than per-Store. * The goal is just to draw attention to this feature if debugging overload due to heavy writes. */ private static void m0(...
3.26
hbase_TimeRange_isAllTime_rdh
/** * Check if it is for all time * * @return true if it is for all time */ public boolean isAllTime() {return allTime; }
3.26
hbase_TimeRange_from_rdh
/** * Represents the time interval [minStamp, Long.MAX_VALUE) * * @param minStamp * the minimum timestamp value, inclusive */ public static TimeRange from(long minStamp) { check(minStamp, INITIAL_MAX_TIMESTAMP); return new TimeRange(minStamp, INITIAL_MAX_TIMESTAMP); }
3.26
hbase_TimeRange_getMax_rdh
/** * Returns the biggest timestamp that should be considered */ public long getMax() { return f0; }
3.26
hbase_TimeRange_getMin_rdh
/** * Returns the smallest timestamp that should be considered */ public long getMin() { return minStamp; }
3.26
hbase_TimeRange_between_rdh
/** * Represents the time interval [minStamp, maxStamp) * * @param minStamp * the minimum timestamp, inclusive * @param maxStamp * the maximum timestamp, exclusive */ public static TimeRange between(long minStamp, long maxStamp) { check(minStamp, maxStamp); return new TimeRange(minStamp, maxStamp);...
3.26
hbase_TimeRange_withinTimeRange_rdh
/** * Check if the specified timestamp is within this TimeRange. * <p/> * Returns true if within interval [minStamp, maxStamp), false if not. * * @param timestamp * timestamp to check * @return true if within TimeRange, false if not */ public boolean withinTimeRange(long timestamp) { assert timestamp >= 0...
3.26
hbase_TimeRange_includesTimeRange_rdh
/** * Check if the range has any overlap with TimeRange * * @param tr * TimeRange * @return True if there is overlap, false otherwise */ // This method came from TimeRangeTracker. We used to go there for this function but better // to come here to the immutable, unsynchronized datastructure at read time. public...
3.26
hbase_TimeRange_until_rdh
/** * Represents the time interval [0, maxStamp) * * @param maxStamp * the minimum timestamp value, exclusive */ public static TimeRange until(long maxStamp) { check(INITIAL_MIN_TIMESTAMP, maxStamp); return new TimeRange(INITIAL_MIN_TIMESTAMP, maxStamp); }
3.26
hbase_TimeRange_withinOrAfterTimeRange_rdh
/** * Check if the specified timestamp is within or after this TimeRange. * <p> * Returns true if greater than minStamp, false if not. * * @param timestamp * timestamp to check * @return true if within or after TimeRange, false if not */ public boolean withinOrAfterTimeRange(long timestamp) { assert times...
3.26
hbase_AsyncTable_toRow_rdh
/** * Specify a stop row * * @param endKey * select regions up to and including the region containing this row, exclusive. */ default CoprocessorServiceBuilder<S, R> toRow(byte[] endKey) { return toRow(endKey, false); }
3.26