name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hbase_ProcedureExecutor_bypassProcedure_rdh
/** * Bypass a procedure. If the procedure is set to bypass, all the logic in execute/rollback will * be ignored and it will return success, whatever. It is used to recover buggy stuck procedures, * releasing the lock resources and letting other procedures run. Bypassing one procedure (and its * ancestors will be b...
3.26
hbase_ProcedureExecutor_removeResult_rdh
/** * Mark the specified completed procedure, as ready to remove. * * @param procId * the ID of the procedure to remove */ public void removeResult(long procId) { CompletedProcedureRetainer<TEnvironment> retainer = completed.get(procId); if (retainer == null) { assert !procedu...
3.26
hbase_ProcedureExecutor_nextProcId_rdh
// Procedure IDs helpers // ========================================================================== private long nextProcId() { long procId = lastProcId.incrementAndGet(); if (procId < 0) { while (!lastProcId.compareAndSet(procId, 0)) { procId = lastProcId.get(); if (proc...
3.26
hbase_ProcedureExecutor_addChore_rdh
// ========================================================================== // Submit/Remove Chores // ========================================================================== /** * Add a chore procedure to the executor * * @param chore * the chore to add */ public void addChore(@Nullable ProcedureInMemoryCh...
3.26
hbase_ProcedureExecutor_getCorePoolSize_rdh
/** * Returns the core pool size settings. */ public int getCorePoolSize() { return corePoolSize; }
3.26
hbase_ProcedureExecutor_executeProcedure_rdh
// ========================================================================== // Executions // ========================================================================== private void executeProcedure(Procedure<TEnvironment> proc) { if (proc.isFinished()) { LOG.debug("{} is already finished, skipping executi...
3.26
hbase_ProcedureExecutor_registerListener_rdh
// ========================================================================== // Listeners helpers // ========================================================================== public void registerListener(ProcedureExecutorListener listener) { this.listeners.add(listener); }
3.26
hbase_ProcedureExecutor_getActiveProceduresNoCopy_rdh
/** * Should only be used when starting up, where the procedure workers have not been started. * <p/> * If the procedure works has been started, the return values maybe changed when you are * processing it so usually this is not safe. Use {@link #getProcedures()} below for most cases as * it will do a copy, and al...
3.26
hbase_ProcedureExecutor_getWorkerThreadCount_rdh
/** * Returns the current number of worker threads. */ public int getWorkerThreadCount() { return workerThreads.size(); }
3.26
hbase_ProcedureExecutor_executeRollback_rdh
/** * Execute the rollback of the procedure step. It updates the store with the new state (stack * index) or will remove completly the procedure in case it is a child. */ private LockState executeRollback(Procedure<TEnvironment> proc) { try ...
3.26
hbase_ProcedureExecutor_isRunning_rdh
// ========================================================================== public boolean isRunning() { return running.get(); }
3.26
hbase_ProcedureExecutor_abort_rdh
/** * Send an abort notification to the specified procedure. Depending on the procedure * implementation, the abort can be considered or ignored. * * @param procId * the procedure to abort * @param mayInterruptIfRunning * if the proc completed at least one step, should it be aborted? * @return true if the p...
3.26
hbase_ProcedureExecutor_isStarted_rdh
/** * Return true if the procedure is started. * * @param procId * the ID of the procedure to check * @return true if the procedure execution is started, otherwise false. */ public boolean isStarted(long procId) { Procedure<?> proc = procedures.get(procId); if (proc == null) { return completed...
3.26
hbase_ProcedureExecutor_getProcedures_rdh
/** * Get procedures. * * @return the procedures in a list */ public List<Procedure<TEnvironment>> getProcedures() { List<Procedure<TEnvironment>> procedureList = new ArrayList<>(procedures.size() + completed.size()); procedureList.addAll(procedures.values()); // Note: The procedure could show up twice in t...
3.26
hbase_ProcedureExecutor_removeChore_rdh
/** * Remove a chore procedure from the executor * * @param chore * the chore to remove * @return whether the chore is removed, or it will be removed later */ public boolean removeChore(@Nullable ProcedureInMemoryChore<TEnvironment> chore) { if (chore == null) { return true; } chore.setState...
3.26
hbase_ProcedureExecutor_unregisterNonceIfProcedureWasNotSubmitted_rdh
/** * Remove the NonceKey if the procedure was not submitted to the executor. * * @param nonceKey * A unique identifier for this operation from the client or process. */ public void unregisterNonceIfProcedureWasNotSubmitted(final NonceKey nonceKey) { ...
3.26
hbase_Sleeper_getPeriod_rdh
/** * Returns the sleep period in milliseconds */ public final int getPeriod() { return f0; }
3.26
hbase_Sleeper_sleep_rdh
/** * Sleep for period. */ public void sleep() {sleep(this.f0); }
3.26
hbase_Sleeper_skipSleepCycle_rdh
/** * If currently asleep, stops sleeping; if not asleep, will skip the next sleep cycle. */ public void skipSleepCycle() { synchronized(sleepLock) { f1 = true; sleepLock.notifyAll(); } }
3.26
hbase_EntityLock_shutdown_rdh
/** * Returns Shuts down the thread clean and quietly. */ Thread shutdown() { shutdown = true; interrupt(); return this; }
3.26
hbase_EntityLock_requestLock_rdh
/** * Sends rpc to the master to request lock. The lock request is queued with other lock requests. * Call {@link #await()} to wait on lock. Always call {@link #unlock()} after calling the below, * even after error. */ public void requestLock() throws IOException { if (procId == null) { try { ...
3.26
hbase_AsyncTableResultScanner_isSuspended_rdh
// used in tests to test whether the scanner has been suspended synchronized boolean isSuspended() { return resumer != null; }
3.26
hbase_UserMetrics_getNameAsString_rdh
/** * Returns the user name as a string */ default String getNameAsString() { return Bytes.toStringBinary(getUserName()); }
3.26
hbase_UserMetrics_getRequestCount_rdh
/** * Returns the number of write requests and read requests and coprocessor service requests made by * the user */ default long getRequestCount() { return getReadRequestCount() + getWriteRequestCount(); }
3.26
hbase_RegistryEndpointsRefresher_mainLoop_rdh
// The main loop for the refresh thread. private void mainLoop() { long lastRefreshTime = EnvironmentEdgeManager.currentTime(); boolean firstRefresh = true; for (; ;) { synchronized(this) { for (; ;) { if (stopped) { LOG.info("Registry end points refr...
3.26
hbase_RegistryEndpointsRefresher_create_rdh
/** * Create a {@link RegistryEndpointsRefresher}. If the interval secs configured via * {@code intervalSecsConfigName} is less than zero, will return null here, which means disable * refreshing of endpoints. */ static RegistryEndpointsRefresher create(Configuration conf, String initialDelaySecsConfigName, String i...
3.26
hbase_RegistryEndpointsRefresher_refreshNow_rdh
/** * Notifies the refresher thread to refresh the configuration. This does not guarantee a refresh. * See class comment for details. */ synchronized void refreshNow() {refreshNow = true; notifyAll(); }
3.26
hbase_AbstractMemStore_maybeCloneWithAllocator_rdh
/** * If the segment has a memory allocator the cell is being cloned to this space, and returned; * Otherwise the given cell is returned When a cell's size is too big (bigger than maxAlloc), it * is not allocated on MSLAB. Since the process of flattening to CellChunkMap assumes that all * cells are allocated on MSL...
3.26
hbase_AbstractMemStore_getLowest_rdh
/* @return Return lowest of a or b or null if both a and b are null */ protected Cell getLowest(final Cell a, final Cell b) {if (a == null) { return b; } if (b == null) { return a; } return comparator.compareRows(a, b) <= 0 ? a : b; }
3.26
hbase_AbstractMemStore_timeOfOldestEdit_rdh
/** * Returns Oldest timestamp of all the Cells in the MemStore */ @Override public long timeOfOldestEdit() {return timeOfOldestEdit; }
3.26
hbase_AbstractMemStore_clearSnapshot_rdh
/** * This method is protected under {@link HStore#lock} write lock,<br/> * and this method is used by {@link HStore#updateStorefiles} after flushing is completed.<br/> * The passed snapshot was successfully persisted; it can be let go. * * @param id * Id of the snapshot to clean out. * @see MemStore#snapshot(...
3.26
hbase_StructBuilder_reset_rdh
/** * Reset the sequence of accumulated fields. */ public StructBuilder reset() { fields.clear(); return this; }
3.26
hbase_StructBuilder_toStruct_rdh
/** * Retrieve the {@link Struct} represented by {@code this}. */ public Struct toStruct() { return new Struct(fields.toArray(new DataType<?>[fields.size()])); }
3.26
hbase_StructBuilder_add_rdh
/** * Append {@code field} to the sequence of accumulated fields. */ public StructBuilder add(DataType<?> field) { fields.add(field); return this; }
3.26
hbase_EnvironmentEdgeManager_getDelegate_rdh
/** * Retrieves the singleton instance of the {@link EnvironmentEdge} that is being managed. * * @return the edge. */ public static EnvironmentEdge getDelegate() {return delegate; }
3.26
hbase_EnvironmentEdgeManager_injectEdge_rdh
/** * Injects the given edge such that it becomes the managed entity. If null is passed to this * method, the default type is assigned to the delegate. * * @param edge * the new edge. */ public static void injectEdge(EnvironmentEdge edge) { if (edge == null) { ...
3.26
hbase_EnvironmentEdgeManager_reset_rdh
/** * Resets the managed instance to the default instance: {@link DefaultEnvironmentEdge}. */ public static void reset() { injectEdge(new DefaultEnvironmentEdge()); }
3.26
hbase_EnvironmentEdgeManager_currentTime_rdh
/** * Defers to the delegate and calls the {@link EnvironmentEdge#currentTime()} method. * * @return current time in millis according to the delegate. */ public static long currentTime() { return getDelegate().currentTime(); }
3.26
hbase_PrefixFilter_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 PrefixFilter)) { return false; ...
3.26
hbase_PrefixFilter_parseFrom_rdh
/** * Parse a serialized representation of {@link PrefixFilter} * * @param pbBytes * A pb serialized {@link PrefixFilter} instance * @return An instance of {@link PrefixFilter} made from <code>bytes</code> * @throws DeserializationException * if an error occurred * @see #toByteArray */public static Prefix...
3.26
hbase_PrefixFilter_toByteArray_rdh
/** * Returns The filter serialized using pb */ @Override public byte[] toByteArray() { FilterProtos.PrefixFilter.Builder builder = FilterProtos.PrefixFilter.newBuilder(); if (this.prefix != null) builder.setPrefix(UnsafeByteOperations.unsafeWrap(this.prefix)); return builder.build().toByteArray...
3.26
hbase_DefaultMobStoreFlusher_performMobFlush_rdh
/** * Flushes the cells in the mob store. * <ol> * In the mob store, the cells with PUT type might have or have no mob tags. * <li>If a cell does not have a mob tag, flushing the cell to different files depends on the * value length. If the length is larger than a threshold, it's flushed to a mob file and the mob ...
3.26
hbase_DefaultMobStoreFlusher_flushSnapshot_rdh
/** * Flushes the snapshot of the MemStore. If this store is not a mob store, flush the cells in the * snapshot to store files of HBase. If the store is a mob one, the flusher flushes the MemStore * into two places. One is the store files of HBase, the other is the mob files. * <ol> * <li>Cells that are not PUT ty...
3.26
hbase_HBaseMetrics2HadoopMetricsAdapter_m0_rdh
/** * Iterates over the MetricRegistry and adds them to the {@code builder}. * * @param builder * A record builder */ public void m0(MetricRegistry metricRegistry, MetricsRecordBuilder builder) { Map<String, Metric> metrics = metricRegistry.getMetrics(); for (Map.Entry<String, Metric> e : metrics.entryS...
3.26
hbase_HBaseMetrics2HadoopMetricsAdapter_addHistogram_rdh
/** * Add Histogram value-distribution data to a Hadoop-Metrics2 record building. * * @param name * A base name for this record. * @param histogram * A histogram to measure distribution of values. * @param builder * A Hadoop-Metrics2 record builder. */ private void addHistogram(String name, Histogram his...
3.26
hbase_HBaseMetrics2HadoopMetricsAdapter_snapshotAllMetrics_rdh
/** * Iterates over the MetricRegistry and adds them to the {@code collector}. * * @param collector * A metrics collector */ public void snapshotAllMetrics(MetricRegistry metricRegistry, MetricsCollector collector) { MetricRegistryInfo info = metricRegistry.getMetricRegistryInfo(); MetricsRecordBuilder b...
3.26
hbase_HBaseMetrics2HadoopMetricsAdapter_addMeter_rdh
/** * Add Dropwizard-Metrics rate information to a Hadoop-Metrics2 record builder, converting the * rates to the appropriate unit. * * @param builder * A Hadoop-Metrics2 record builder. * @param name * A base name for this record. */ private void addMeter(String name, Meter meter, MetricsRecordBuilder build...
3.26
hbase_PreemptiveFastFailException_getFirstFailureAt_rdh
/** * Returns time of the fist failure */ public long getFirstFailureAt() { return timeOfFirstFailureMilliSec; }
3.26
hbase_PreemptiveFastFailException_isGuaranteedClientSideOnly_rdh
/** * Returns true if we know no mutation made it to the server, false otherwise. */ public boolean isGuaranteedClientSideOnly() { return guaranteedClientSideOnly; }
3.26
hbase_PreemptiveFastFailException_getFailureCount_rdh
/** * Returns failure count */ public long getFailureCount() { return failureCount; }
3.26
hbase_PreemptiveFastFailException_getLastAttemptAt_rdh
/** * Returns time of the latest attempt */ public long getLastAttemptAt() { return timeOfLatestAttemptMilliSec; }
3.26
hbase_PreemptiveFastFailException_wasOperationAttemptedByServer_rdh
/** * Returns true if operation was attempted by server, false otherwise. */ public boolean wasOperationAttemptedByServer() { return false; }
3.26
hbase_HRegionFileSystem_getStoreHomedir_rdh
/** * * @param tabledir * {@link Path} to where the table is being stored * @param encodedName * Encoded region name. * @param family * {@link ColumnFamilyDescriptor} describing the column family * @return Path to family/Store home directory. */ public static Path getStoreHomedir(final Path tabledir, fin...
3.26
hbase_HRegionFileSystem_bulkLoadStoreFile_rdh
/** * Bulk load: Add a specified store file to the specified family. If the source file is on the * same different file-system is moved from the source location to the destination location, * otherwise is copied over. * * @param familyName * Family that will gain the file * @param srcPath * {@link Path} to ...
3.26
hbase_HRegionFileSystem_getSplitsDir_rdh
// =========================================================================== // Splits Helpers // =========================================================================== public Path getSplitsDir(final RegionInfo hri) { return new Path(getTableDir(), hri.getEncodedName()); }
3.26
hbase_HRegionFileSystem_cleanupTempDir_rdh
/** * Clean up any temp detritus that may have been left around from previous operation attempts. */ void cleanupTempDir() throws IOException { deleteDir(getTempDir()); }
3.26
hbase_HRegionFileSystem_generateUniqueName_rdh
/** * Generate a unique file name, used by createTempName() and commitStoreFile() * * @param suffix * extra information to append to the generated name * @return Unique file name */ private static String generateUniqueName(final String suffix) { String name = UUID.randomUUID().toString().replaceAll("-", ""...
3.26
hbase_HRegionFileSystem_getTempDir_rdh
// =========================================================================== // Temp Helpers // =========================================================================== /** * Returns {@link Path} to the region's temp directory, used for file creations */ public Path getTempDir() { return new Path(getRegionDi...
3.26
hbase_HRegionFileSystem_setStoragePolicy_rdh
/** * Set storage policy for a whole region. <br> * <i>"LAZY_PERSIST"</i>, <i>"ALL_SSD"</i>, <i>"ONE_SSD"</i>, <i>"HOT"</i>, <i>"WARM"</i>, * <i>"COLD"</i> <br> * <br> * See {@link org.apache.hadoop.hdfs.protocol.HdfsConstants} for more details. * * @param policyName * The name of the storage policy: 'HOT', '...
3.26
hbase_HRegionFileSystem_preCommitStoreFile_rdh
/** * Generate the filename in the main family store directory for moving the file from a build/temp * location. * * @param familyName * Family that will gain the file * @param buildPath * {@link Path} to the file to commit. * @param seqNum * Sequence Number to append to the file name (less then 0 if no ...
3.26
hbase_HRegionFileSystem_getTableDir_rdh
/** * Returns {@link Path} to the region's root directory. */ public Path getTableDir() { return this.tableDir; }
3.26
hbase_HRegionFileSystem_createTempName_rdh
/** * Generate a unique temporary Path. Used in conjuction with commitStoreFile() to get a safer file * creation. <code> * Path file = fs.createTempName(); * ...StoreFile.Writer(file)... * fs.commitStoreFile("family", file); * </code> * * @param suffix * extra information to append to the generated name * @...
3.26
hbase_HRegionFileSystem_getMergesDir_rdh
// =========================================================================== // Merge Helpers // =========================================================================== Path getMergesDir(final RegionInfo hri) { return new Path(getTableDir(), hri.getEncodedName()); }
3.26
hbase_HRegionFileSystem_checkRegionInfoOnFilesystem_rdh
/** * Write out an info file under the stored region directory. Useful recovering mangled regions. If * the regionInfo already exists on-disk, then we fast exit. */ void checkRegionInfoOnFilesystem() throws IOException { // Compose the content of the file so we can compare to length in filesystem. If not same, ...
3.26
hbase_HRegionFileSystem_getRegionInfoFileContent_rdh
// =========================================================================== // Create/Open/Delete Helpers // =========================================================================== /** * Returns Content of the file we write out to the filesystem under a region */ private static byte[] getRegionInfoFileContent(...
3.26
hbase_HRegionFileSystem_removeStoreFiles_rdh
/** * Closes and archives the specified store files from the specified family. * * @param familyName * Family that contains the store files * @param storeFiles * set of store files to remove * @throws IOException * if the archiving fails */ public void removeStoreFiles(String familyName, Collection<HStor...
3.26
hbase_HRegionFileSystem_createRegionOnFileSystem_rdh
/** * Create a new Region on file-system. * * @param conf * the {@link Configuration} to use * @param fs * {@link FileSystem} from which to add the region * @param tableDir * {@link Path} to where t...
3.26
hbase_HRegionFileSystem_rename_rdh
/** * Renames a directory. Assumes the user has already checked for this directory existence. * * @return true if rename is successful. */ boolean rename(Path srcpath, Path dstPath) throws IOException { IOException v85 = null; int i = 0; do { try { return fs.rename(srcpath, dstPa...
3.26
hbase_HRegionFileSystem_sleepBeforeRetry_rdh
/** * sleeping logic for static methods; handles the interrupt exception. Keeping a static version * for this to avoid re-looking for the integer values. */ private static void sleepBeforeRetry(String msg, int sleepMultiplier, int baseSleepBeforeRetries, int hdfsClientRetriesNumber) throws InterruptedException { ...
3.26
hbase_HRegionFileSystem_getStoreFilePath_rdh
/** * Return Qualified Path of the specified family/file * * @param familyName * Column Family Name * @param fileName * File Name * @return The qualified Path for the specified family/file */ Path getStoreFilePath(final String familyName, final String fileName) { Path familyDir = getStoreDir(familyName)...
3.26
hbase_HRegionFileSystem_deleteFamily_rdh
/** * Remove the region family from disk, archiving the store files. * * @param familyName * Column Family Name * @throws IOException * if an error occours during the archiving */public void deleteFamily(final String familyName) throws IOException { // archive family store files HFileArchiver.archive...
3.26
hbase_HRegionFileSystem_getStoreFiles_rdh
/** * Returns the store files available for the family. This methods performs the filtering based on * the valid store files. * * @param familyName * Column Family Name * @return a set of {@link StoreFileInfo} for the specified family. */ public List<StoreFileInfo> getStoreFiles(final String familyName, final...
3.26
hbase_HRegionFileSystem_createSplitsDir_rdh
/** * Creates region split daughter directories under the table dir. If the daughter regions already * exist, for example, in the case of a recovery from a previous failed split procedure, this * method deletes the given region dir recursively, then recreates it again. */public void createSplitsDir(RegionInfo daugh...
3.26
hbase_HRegionFileSystem_deleteRegionFromFileSystem_rdh
/** * Remove the region from the table directory, archiving the region's hfiles. * * @param conf * the {@link Configuration} to use * @param fs * {@link FileSystem} from which to remove the region * @param tableDir * {@link Path} to where the table is being stored * @param regionInfo * {@link RegionIn...
3.26
hbase_HRegionFileSystem_getStoreDir_rdh
// =========================================================================== // Store/StoreFile Helpers // =========================================================================== /** * Returns the directory path of the specified family * * @param familyName * Column Family Name * @return {@link Path} to th...
3.26
hbase_HRegionFileSystem_getStoreFilesLocatedStatus_rdh
/** * Returns the store files' LocatedFileStatus which available for the family. This methods * performs the filtering based on the valid store files. * * @param familyName * Column Family Name * @return a list of store files' LocatedFileStatus for the specified family. */public static List<LocatedFileStatus> ...
3.26
hbase_HRegionFileSystem_m0_rdh
/** * Archives the specified store file from the specified family. * * @param familyName * Family that contains the store files * @param filePath * {@link Path} to the store file to remove * @throws IOException * if the archiving fails */ public void m0(final String familyName, final Path filePath) throw...
3.26
hbase_HRegionFileSystem_writeRegionInfoOnFilesystem_rdh
/** * Write out an info file under the region directory. Useful recovering mangled regions. * * @param regionInfoContent * serialized version of the {@link RegionInfo} * @param useTempDir * indicate whether or not using the region .tmp dir for a safer file * creation. */ private void writeRegionInfoOnFile...
3.26
hbase_HRegionFileSystem_openRegionFromFileSystem_rdh
/** * Open Region from file-system. * * @param conf * the {@link Configuration} to use * @param fs * {@link FileSystem} from which to add the region * @param tableDir * {@link Path} to where the table is being stored * @param regionInfo * {@link RegionInfo} for region to be added * @param readOnly *...
3.26
hbase_HRegionFileSystem_cleanupDaughterRegion_rdh
/** * Remove daughter region * * @param regionInfo * daughter {@link RegionInfo} */ void cleanupDaughterRegion(final RegionInfo regionInfo) throws IOException { Path regionDir = new Path(this.tableDir, regionInfo.getEncodedName()); if (this.fs.exists(regionDir) && (!deleteDir(regionDir))) { ...
3.26
hbase_HRegionFileSystem_createStoreDir_rdh
/** * Create the store directory for the specified family name * * @param familyName * Column Family Name * @return {@link Path} to the directory of the specified family * @throws IOException * if the directory creation fails. */ Path createStoreDir(final String familyName) throws IOException { Path sto...
3.26
hbase_HRegionFileSystem_cleanupMergedRegion_rdh
/** * Remove merged region * * @param mergedRegion * {@link RegionInfo} */ public void cleanupMergedRegion(final RegionInfo mergedRegion) throws IOException { Path regionDir = new Path(this.tableDir, mergedRegion.getEncodedName()); if (this.fs.exists(regionDir) && (!this.fs.delete(regionDir, true))) { ...
3.26
hbase_HRegionFileSystem_getRegionDir_rdh
/** * Returns {@link Path} to the region directory. */ public Path getRegionDir() { return regionDir; }
3.26
hbase_HRegionFileSystem_commitStoreFile_rdh
/* Moves file from staging dir to region dir @param buildPath {@link Path} to the file to commit. @param dstPath {@link Path} to the file under region dir @return The {@link Path} of the committed file */ Path commitStoreFile(final Path buildPath, Path dstPath) throws IOException { // rename is not necessary in case o...
3.26
hbase_HRegionFileSystem_commitDaughterRegion_rdh
/** * Commit a daughter region, moving it from the split temporary directory to the proper location * in the filesystem. * * @param regionInfo * daughter {@link org.apache.hadoop.hbase.client.RegionInfo} */ public Pa...
3.26
hbase_HRegionFileSystem_splitStoreFile_rdh
/** * Write out a split reference. Package local so it doesnt leak out of regionserver. * * @param hri * {@link RegionInfo} of the destination * @param familyName * Column Family Name * @param f * File to split. * @param splitRow * Split Row * @param top * True if we are referring to the top half ...
3.26
hbase_HRegionFileSystem_getFileSystem_rdh
/** * Returns the underlying {@link FileSystem} */ public FileSystem getFileSystem() { return this.fs; }
3.26
hbase_HRegionFileSystem_getFamilies_rdh
/** * Returns the set of families present on disk n */ public Collection<String> getFamilies() throws IOException { FileStatus[] fds = CommonFSUtils.listStatus(fs, getRegionDir(), new FSUtils.FamilyDirFilter(fs)); if (fds == null) return null; ArrayList<String> families = new ArrayLi...
3.26
hbase_HRegionFileSystem_mergeStoreFile_rdh
/** * Write out a merge reference under the given merges directory. * * @param mergingRegion * {@link RegionInfo} for one of the regions being merged. * @param familyName * Column Family Name * @param f * File to create reference. * @return Path to created reference. * @throws IOException * if the me...
3.26
hbase_HRegionFileSystem_hasReferences_rdh
/** * Check whether region has Reference file * * @param htd * table desciptor of the region * @return true if region has reference file */ public boolean hasReferences(final TableDescriptor htd) throws IOException ...
3.26
hbase_HRegionFileSystem_getRegionInfo_rdh
/** * Returns the {@link RegionInfo} that describe this on-disk region view */ public RegionInfo getRegionInfo() { return this.regionInfo; }
3.26
hbase_HRegionFileSystem_commitMergedRegion_rdh
/** * Commit a merged region, making it ready for use. */ public void commitMergedRegion(List<Path> allMergedFiles, MasterProcedureEnv env) throws IOException { Path v63 = getMergesDir(regionInfoForFs); if ((v63 != null) && fs.exists(v63)) { // Write HRI to a file in case we need to recover hbase:meta...
3.26
hbase_HRegionFileSystem_loadRegionInfoFileContent_rdh
/** * Create a {@link RegionInfo} from the serialized version on-disk. * * @param fs * {@link FileSystem} that contains the Region Info file * @param regionDir * {@link Path} to the Region Directory...
3.26
hbase_HMaster_filterTablesByRegex_rdh
/** * Removes the table descriptors that don't match the pattern. * * @param descriptors * list of table descriptors to filter * @param pattern * the regex to use */ private static void filterTablesByRegex(final Collection<TableDescriptor> descriptors, final Pattern pattern) { final String defaultNS = Names...
3.26
hbase_HMaster_listNamespaces_rdh
/** * List namespace names * * @return All namespace names */ public List<String> listNamespaces() throws IOException { checkInitialized(); List<String> namespaces = new ArrayList<>(); if (cpHost != null) { cpHost.preListNamespaces(namespaces); }for (NamespaceDescriptor namespace : clusterSchemaService.getNamespace...
3.26
hbase_HMaster_login_rdh
/** * For compatibility, if failed with regionserver credentials, try the master one */ @Override protected void login(UserProvider user, String host) throws IOException { try { user.login(SecurityConstants.REGIONSERVER_KRB_KEYTAB_FILE, SecurityConstants.REGIONSERVER_KRB_PRINCIPAL, host); } catch (IOE...
3.26
hbase_HMaster_isActiveMaster_rdh
/** * Report whether this master is currently the active master or not. If not active master, we are * parked on ZK waiting to become active. This method is used for testing. * * @return true if active master, false if not. */ @Override public boolean isActiveMaster() { return activeMaster; }
3.26
hbase_HMaster_listDecommissionedRegionServers_rdh
/** * List region servers marked as decommissioned (previously called 'draining') to not get regions * assigned to them. * * @return List of decommissioned servers. */ public List<ServerName> listDecommissionedRegionServers() { return this.serverManager.getDrainingServersList(); }
3.26
hbase_HMaster_switchSnapshotCleanup_rdh
/** * Turn on/off Snapshot Cleanup Chore * * @param on * indicates whether Snapshot Cleanup Chore is to be run */ void switchSnapshotCleanup(final boolean on, final boolean synchronous) throws IOException { if (synchronous) { synchronized(this.snapshotCleanerChore) { switchSnapshotCleanup(on); } } else { switc...
3.26
hbase_HMaster_isInitialized_rdh
/** * Report whether this master has completed with its initialization and is ready. If ready, the * master is also the active master. A standby master is never ready. This method is used for * testing. * * @return true if master is ready to go, false if not. */ @Override public boolean isInitialized() { return i...
3.26