name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hbase_TableBackupClient_addManifest_rdh
/** * Add manifest for the current backup. The manifest is stored within the table backup directory. * * @param backupInfo * The current backup info * @throws IOException * exception ...
3.26
hbase_TableBackupClient_cleanupTargetDir_rdh
/** * Clean up the uncompleted data at target directory if the ongoing backup has already entered the * copy phase. */ protected static void cleanupTargetDir(BackupInfo backupInfo, Configuration conf) { try { // clean up the uncompleted data at target directory if the ongoing backup has already entered ...
3.26
hbase_TableBackupClient_completeBackup_rdh
/** * Complete the overall backup. * * @param backupInfo * backup info * @throws IOException * exception */protected void completeBackup(final Connection conn, BackupInfo backupInfo, BackupManager backupManager, BackupType type, Configuration conf) throws IOException { // set the complete timestamp of th...
3.26
hbase_ImmutableSegment_getNumOfSegments_rdh
// /////////////////// PUBLIC METHODS ///////////////////// public int getNumOfSegments() { return 1; }
3.26
hbase_ImmutableSegment_getSnapshotScanners_rdh
/** * We create a new {@link SnapshotSegmentScanner} to increase the reference count of * {@link MemStoreLABImpl} used by this segment. */List<KeyValueScanner> getSnapshotScanners() { return Collections.singletonList(new SnapshotSegmentScanner(this)); }
3.26
hbase_AbstractStateMachineNamespaceProcedure_m0_rdh
/** * Insert/update the row into the ns family of meta table. * * @param env * MasterProcedureEnv */ protected static void m0(MasterProcedureEnv env, NamespaceDescriptor ns) throws IOException { getTableNamespaceManager(env).addOrUpdateNamespace(ns); }
3.26
hbase_AbstractStateMachineNamespaceProcedure_createDirectory_rdh
/** * Create the namespace directory * * @param env * MasterProcedureEnv * @param nsDescriptor * NamespaceDescriptor */ protected static void createDirectory(MasterProcedureEnv env, NamespaceDescriptor nsDescriptor) throws IOException { createDirectory(env.getMaste...
3.26
hbase_FSDataInputStreamWrapper_unbuffer_rdh
/** * This will free sockets and file descriptors held by the stream only when the stream implements * org.apache.hadoop.fs.CanUnbuffer. NOT THREAD SAFE. Must be called only when all the clients * using this stream to read the blocks have finished reading. If by chance the stream is * unbuffered and there are clien...
3.26
hbase_FSDataInputStreamWrapper_fallbackToFsChecksum_rdh
/** * Read from non-checksum stream failed, fall back to FS checksum. Thread-safe. * * @param offCount * For how many checksumOk calls to turn off the HBase checksum. */ public FSDataInputStream fallbackToFsChecksum(int offCount) throws IOException { // checksumOffCount is speculative, but let's try to reset it ...
3.26
hbase_FSDataInputStreamWrapper_prepareForBlockReader_rdh
/** * Prepares the streams for block reader. NOT THREAD SAFE. Must be called once, after any reads * finish and before any other reads start (what happens in reality is we read the tail, then call * this based on what's in the tail, then read blocks). * * @param forceNoHBaseChecksum * Force not using HBase chec...
3.26
hbase_FSDataInputStreamWrapper_shouldUseHBaseChecksum_rdh
/** * Returns Whether we are presently using HBase checksum. */ public boolean shouldUseHBaseChecksum() { return this.useHBaseChecksum; }
3.26
hbase_FSDataInputStreamWrapper_getStream_rdh
/** * Get the stream to use. Thread-safe. * * @param useHBaseChecksum * must be the value that shouldUseHBaseChecksum has returned at some * point in the past, otherwise the result is undefined. */ public FSDataInputStream getStream(boolean useHBaseChecksum) { return useHBaseChecksum ? this.streamNoFsChecksum...
3.26
hbase_FSDataInputStreamWrapper_close_rdh
/** * CloseClose stream(s) if necessary. */ @Override public void close() {if (!doCloseStreams) { return; } updateInputStreamStatistics(this.streamNoFsChecksum); // we do not care about the close exception as it is for reading, no data loss issue. Closeables.closeQuietly(streamNoFsChecksum); updateInputStreamStatisti...
3.26
hbase_FSDataInputStreamWrapper_checksumOk_rdh
/** * Report that checksum was ok, so we may ponder going back to HBase checksum. */ public void checksumOk() { if ((this.useHBaseChecksumConfigured && (!this.useHBaseChecksum)) && (this.hbaseChecksumOffCount.getAndDecrement() < 0)) { // The stream we need is already open (because we were using HBase checksum in the ...
3.26
hbase_HStoreFile_m0_rdh
/** * * @param key * to look up * @return value associated with the metadata key */ public byte[] m0(byte[] key) { return metadataMap.get(key); }
3.26
hbase_HStoreFile_initReader_rdh
/** * Initialize the reader used for pread. */ public void initReader() throws IOException { if (initialReader == null) { synchronized(this) { if (initialReader == null) { try { open(); } catch (Exception e) { try {boolean evictOnClose = (cacheConf != null) ? cacheConf.shouldEvictOn...
3.26
hbase_HStoreFile_getReader_rdh
/** * * @return Current reader. Must call initReader first else returns null. * @see #initReader() */ public StoreFileReader getReader() { return this.initialReader; }
3.26
hbase_HStoreFile_closeStoreFile_rdh
/** * * @param evictOnClose * whether to evict blocks belonging to this file */ public synchronized void closeStoreFile(boolean evictOnClose) throws IOException { if (this.initialReader != null) { this.initialReader.close(evictOnClose); this.initialReader = null; } }
3.26
hbase_HStoreFile_open_rdh
/** * Opens reader on this store file. Called by Constructor. * * @see #closeStoreFile(boolean) */ private void open() throws IOException { fileInfo.initHDFSBlocksDistribution(); long readahead = (fileInfo.isNoReadahead()) ? 0L : -1L; ReaderContext context...
3.26
hbase_HStoreFile_isSkipResetSeqId_rdh
/** * Gets whether to skip resetting the sequence id for cells. * * @param skipResetSeqId * The byte array of boolean. * @return Whether to skip resetting the sequence id. */ private boolean isSkipResetSeqId(byte[] skipResetSeqId) { if ((skipResetSeqId != null) && (skipResetSeqId.length == 1)) { return Bytes.t...
3.26
hbase_HStoreFile_getStreamScanner_rdh
/** * Get a scanner which uses streaming read. * <p> * Must be called after initReader. */ public StoreFileScanner getStreamScanner(boolean canUseDropBehind, boolean cacheBlocks, boolean isCompaction, long readPt, long scannerOrder, boolean canOptimizeForNonNullColumn) throws IOException { return createStreamReader...
3.26
hbase_HStoreFile_deleteStoreFile_rdh
/** * Delete this file */ public void deleteStoreFile() throws IOException { boolean evictOnClose = (cacheConf != null) ? cacheConf.shouldEvictOnClose() : true; closeStoreFile(evictOnClose); this.fileInfo.getFileSystem().delete(getPath(), true); }
3.26
hbase_HStoreFile_getPreadScanner_rdh
/** * Get a scanner which uses pread. * <p> * Must be called after initReader. */ public StoreFileScanner getPreadScanner(boolean cacheBlocks, long readPt, long scannerOrder, boolean canOptimizeForNonNullColumn) { return getReader().getStoreFileScanner(cacheBlocks, true, false, readPt, scannerOrder, canOptimizeForN...
3.26
hbase_HStoreFile_isReferencedInReads_rdh
/** * Returns true if the file is still used in reads */ public boolean isReferencedInReads() { int rc = fileInfo.getRefCount(); assert rc >= 0;// we should not go negative. return rc > 0; }
3.26
hbase_StoreFileListFile_update_rdh
/** * We will set the timestamp in this method so just pass the builder in */ void update(StoreFileList.Builder builder) throws IOException { if (nextTrackFile < 0) { // we need to call load first to load the prevTimestamp and also the next file // we are already in the update method, which ...
3.26
hbase_StoreFileListFile_listFiles_rdh
// file sequence id to path private NavigableMap<Long, List<Path>> listFiles() throws IOException { FileSystem fs = ctx.getRegionFileSystem().getFileSystem(); FileStatus[] statuses; try { statuses = fs.listStatus(trackFileDir); } catch (FileNotFoundException e) { LOG.debug("Track file di...
3.26
hbase_SimpleLoadBalancer_balanceOverall_rdh
/** * If we need to balanceoverall, we need to add one more round to peel off one region from each * max. Together with other regions left to be assigned, we distribute all regionToMove, to the RS * that have less regions in whole cluster scope. */ private void balanceOverall(List<RegionPlan> regionsToReturn, Map<S...
3.26
hbase_SimpleLoadBalancer_m1_rdh
/** * A checker function to decide when we want balance overall and certain table has been balanced, * do we still need to re-distribute regions of this table to achieve the state of overall-balance * * @return true if this table should be balanced. */ private boolean m1() { int floor = ((int) (Math.floor(avgL...
3.26
hbase_SimpleLoadBalancer_addRegionPlan_rdh
/** * Add a region from the head or tail to the List of regions to return. */ private void addRegionPlan(final MinMaxPriorityQueue<RegionPlan> regionsToMove, final boolean fetchFromTail, final ServerName sn, List<RegionPlan> regionsToReturn) { RegionPlan rp = null; if (!fetchFromTail) { rp = regionsT...
3.26
hbase_IdLock_releaseLockEntry_rdh
/** * Must be called in a finally block to decrease the internal counter and remove the monitor * object for the given id if the caller is the last client. * * @param entry * the return value of {@link #getLockEntry(long)} */ public void releaseLockEntry(Entry entry) { Thread currentThread = Thread.curr...
3.26
hbase_IdLock_getLockEntry_rdh
/** * Blocks until the lock corresponding to the given id is acquired. * * @param id * an arbitrary number to lock on * @return an "entry" to pass to {@link #releaseLockEntry(Entry)} to release the lock * @throws IOException * if interrupted */ public Entry getLockEntry(long id) throws IOException { Thread...
3.26
hbase_IdLock_tryLockEntry_rdh
/** * Blocks until the lock corresponding to the given id is acquired. * * @param id * an arbitrary number to lock on * @param time * time to wait in ms * @return an "entry" to pass to {@link #releaseLockEntry(Entry)} to release the lock * @throws IOException * if interrupted */ public Entry tryLockEntr...
3.26
hbase_IdLock_isHeldByCurrentThread_rdh
/** * Test whether the given id is already locked by the current thread. */public boolean isHeldByCurrentThread(long id) { Thread currentThread = Thread.currentThread();Entry entry = map.get(id); if (entry == null) { return false; } synchronized(entry) { return currentThread.equals(ent...
3.26
hbase_JSONBean_open_rdh
/** * Notice that, closing the return {@link Writer} will not close the {@code writer} passed in, you * still need to close the {@code writer} by yourself. * <p/> * This is because that, we can only finish the json after you call {@link Writer#close()}. So if * we just close the {@code writer}, you can write nothi...
3.26
hbase_JSONBean_dumpAllBeans_rdh
/** * Dump out all registered mbeans as json on System.out. */public static void dumpAllBeans() throws IOException, MalformedObjectNameException { try (PrintWriter writer = new PrintWriter(new OutputStreamWriter(System.out, StandardCharsets.UTF_8))) { JSONBean dumper = new JSONBean(); try (JSONBea...
3.26
hbase_JSONBean_write_rdh
/** * Returns Return non-zero if failed to find bean. 0 */private static int write(JsonWriter writer, MBeanServer mBeanServer, ObjectName qry, String attribute, boolean description, ObjectName excluded) throws IOException { LOG.debug("Listing beans for {}", qry); Set<ObjectName> names = mBeanServer.queryNam...
3.26
hbase_TableRecordReaderImpl_next_rdh
/** * * @param key * HStoreKey as input key. * @param value * MapWritable as input value * @return true if there was more data */ public boolean next(ImmutableBytesWritable key, Result value) throws IOException { Result result; try { try { result = this.scanner.next(); ...
3.26
hbase_TableRecordReaderImpl_setRowFilter_rdh
/** * * @param rowFilter * the {@link Filter} to be used. */ public void setRowFilter(Filter rowFilter) { this.trrRowFilter = rowFilter;}
3.26
hbase_TableRecordReaderImpl_setHTable_rdh
/** * * @param htable * the table to scan. */ public void setHTable(Table htable) { Configuration conf = htable.getConfiguration(); logScannerActivity = conf.getBoolean(ConnectionConfiguration.LOG_SCANNER_ACTIVITY, false); logPerRowCount = conf.getInt(LOG_PER_ROW_COUNT, 100); this.htable = htable;...
3.26
hbase_TableRecordReaderImpl_restart_rdh
/** * Restart from survivable exceptions by creating a new scanner. */ public void restart(byte[] firstRow) throws IOException { Scan v0; if ((endRow != null) && (endRow.length > 0)) { if (trrRowFilter != null) { Scan scan = new Scan().withStartRow(firstRow).withStopRow(endRow); ...
3.26
hbase_TableRecordReaderImpl_setStartRow_rdh
/** * * @param startRow * the first row in the split */ public void setStartRow(final byte[] startRow) { this.startRow = startRow; }
3.26
hbase_TableRecordReaderImpl_init_rdh
/** * Build the scanner. Not done in constructor to allow for extension. */public void init() throws IOException { restart(startRow); }
3.26
hbase_TableRecordReaderImpl_setEndRow_rdh
/** * * @param endRow * the last row in the split */ public void setEndRow(final byte[] endRow) { this.endRow = endRow; }
3.26
hbase_TableRecordReaderImpl_createValue_rdh
/** * * @see org.apache.hadoop.mapred.RecordReader#createValue() */ public Result createValue() { return new Result(); }
3.26
hbase_TableRecordReaderImpl_setInputColumns_rdh
/** * * @param inputColumns * the columns to be placed in {@link Result}. */ public void setInputColumns(final byte[][] inputColumns) { this.trrInputColumns = inputColumns; }
3.26
hbase_TableRecordReaderImpl_createKey_rdh
/** * * @see org.apache.hadoop.mapred.RecordReader#createKey() */ public ImmutableBytesWritable createKey() { return new ImmutableBytesWritable(); }
3.26
hbase_ZKClusterId_getUUIDForCluster_rdh
/** * Get the UUID for the provided ZK watcher. Doesn't handle any ZK exceptions * * @param zkw * watcher connected to an ensemble * @return the UUID read from zookeeper * @throws KeeperException * if a ZooKeeper operation fails */ public static UUID getUUIDForCluster(ZKWatcher zkw) throws KeeperException...
3.26
hbase_ChecksumUtil_generateExceptionForChecksumFailureForTest_rdh
/** * Mechanism to throw an exception in case of hbase checksum failure. This is used by unit tests * only. * * @param value * Setting this to true will cause hbase checksum verification failures to generate * exceptions. */ public static void generateExceptionForChecksumFailureForTest(boolean value) { g...
3.26
hbase_ChecksumUtil_numBytes_rdh
/** * Returns the number of bytes needed to store the checksums for a specified data size * * @param datasize * number of bytes of data * @param bytesPerChecksum * number of bytes in a checksum chunk * @return The number of bytes needed to store the checksum values */ static long numBytes(long datasize, int...
3.26
hbase_ChecksumUtil_validateChecksum_rdh
/** * Validates that the data in the specified HFileBlock matches the checksum. Generates the * checksums for the data and then validate that it matches those stored in the end of the data. * * @param buf * Contains the data in following order: HFileBlock header, data, checksums. * @param pathName * Path of ...
3.26
hbase_ChecksumUtil_generateChecksums_rdh
/** * Generates a checksum for all the data in indata. The checksum is written to outdata. * * @param indata * input data stream * @param startOffset * starting offset in the indata stream from where to compute checkums * from * @param endOffset * ending offset in the indata stream upto which checksums...
3.26
hbase_ChecksumUtil_numChunks_rdh
/** * Returns the number of checksum chunks needed to store the checksums for a specified data size * * @param datasize * number of bytes of data * @param bytesPerChecksum * number of bytes in a checksum chunk * @return The number of checksum chunks */ static long numChunks(long datasize, int bytesPerChecks...
3.26
hbase_HFileCorruptionChecker_checkMobColFamDir_rdh
/** * Check all files in a mob column family dir. mob column family directory */ protected void checkMobColFamDir(Path cfDir) throws IOException { FileStatus[] statuses = null; try { statuses = fs.listStatus(cfDir);// use same filter as scanner. } catch (FileNotFoundException fnfe) { // ...
3.26
hbase_HFileCorruptionChecker_getQuarantined_rdh
/** * Returns the set of successfully quarantined paths after checkTables is called. */ public Collection<Path> getQuarantined() { return new HashSet<>(quarantined); }
3.26
hbase_HFileCorruptionChecker_checkMobFile_rdh
/** * Checks a path to see if it is a valid mob file. full Path to a mob file. This is a connectivity * related exception */ protected void checkMobFile(Path p) throws IOException { HFile.Reader r = null; try { r = HFile.createReader(fs, p, cacheConf, true, conf); ...
3.26
hbase_HFileCorruptionChecker_getHFilesChecked_rdh
/** * Returns number of hfiles checked in the last HfileCorruptionChecker run */public int getHFilesChecked() { return hfilesChecked.get(); }
3.26
hbase_HFileCorruptionChecker_getCorruptedMobFiles_rdh
/** * Returns the set of corrupted mob file paths after checkTables is called. */ public Collection<Path> getCorruptedMobFiles() { return new HashSet<>(corruptedMobFiles); }
3.26
hbase_HFileCorruptionChecker_checkMobRegionDir_rdh
/** * Checks all the mob files of a table. * * @param regionDir * The mob region directory */ private void checkMobRegionDir(Path regionDir) throws IOException { if (!fs.exists(regionDir)) { return; } FileStatus[] v22 = null; try { v22 = fs.listStatus(regionDir, new FamilyDirFilt...
3.26
hbase_HFileCorruptionChecker_m0_rdh
/** * Check all files in a column family dir. column family directory */ protected void m0(Path cfDir) throws IOException { FileStatus[] statuses = null; try { statuses = fs.listStatus(cfDir);// use same filter as scanner. } catch (FileNotFoundException fnfe) { // Hadoop 0.23+ listStatus...
3.26
hbase_HFileCorruptionChecker_checkTables_rdh
/** * Check the specified table dirs for bad hfiles. */ public void checkTables(Collection<Path> tables) throws IOException { for (Path t : tables) { checkTableDir(t); } }
3.26
hbase_HFileCorruptionChecker_getQuarantinedMobFiles_rdh
/** * Returns the set of successfully quarantined paths after checkTables is called. */ public Collection<Path> getQuarantinedMobFiles() { return new HashSet<>(quarantinedMobFiles); }
3.26
hbase_HFileCorruptionChecker_getFailures_rdh
/** * Returns the set of check failure file paths after checkTables is called. */ public Collection<Path> getFailures() { return new HashSet<>(failures); }
3.26
hbase_HFileCorruptionChecker_createMobRegionDirChecker_rdh
/** * Creates an instance of MobRegionDirChecker. * * @param tableDir * The current table directory. * @return An instance of MobRegionDirChecker. */ private MobRegionDirChecker createMobRegionDirChecker(Path tableDir) { TableName tableName = CommonFSUtils.getTableName(tableDir); Path mobDir = MobUtils.getMobRe...
3.26
hbase_HFileCorruptionChecker_getMobFilesChecked_rdh
/** * Returns number of mob files checked in the last HfileCorruptionChecker run */ public int getMobFilesChecked() { return mobFilesChecked.get(); }
3.26
hbase_HFileCorruptionChecker_checkTableDir_rdh
/** * Check all the regiondirs in the specified tableDir path to a table */ void checkTableDir(Path tableDir) throws IOException { List<FileStatus> rds = FSUtils.listStatusWithStatusFilter(fs, tableDir, new RegionDirFilter(fs)); if (rds == null) { if (!fs.exists(tableDir)) { LOG.warn(("Table Directory " + ta...
3.26
hbase_HFileCorruptionChecker_checkHFile_rdh
/** * Checks a path to see if it is a valid hfile. full Path to an HFile This is a connectivity * related exception */ protected void checkHFile(Path p) throws IOException { HFile.Reader r = null; try { r = HFile.createReader(fs, p, cacheConf, true, conf); } catch (CorruptHFileException che) { ...
3.26
hbase_HFileCorruptionChecker_checkRegionDir_rdh
/** * Check all column families in a region dir. region directory */ protected void checkRegionDir(Path regionDir) throws IOException { FileStatus[] statuses = null; try { statuses = fs.listStatus(regionDir); } catch (FileNotFoundException fnfe) {// Hadoop 0.23+ listStatus semantics throws an exce...
3.26
hbase_HFileCorruptionChecker_m1_rdh
/** * Returns the set of check failure mob file paths after checkTables is called. */ public Collection<Path> m1() { return new HashSet<>(failureMobFiles); }
3.26
hbase_AuthManager_authorizeUserTable_rdh
/** * Check if user has given action privilige in table:family:qualifier scope. * * @param user * user name * @param table * table name * @param fami...
3.26
hbase_AuthManager_getMTime_rdh
/** * Last modification logical time */ public long getMTime() { return mtime.get(); }
3.26
hbase_AuthManager_authorizeUserNamespace_rdh
/** * Check if user has given action privilige in namespace scope. * * @param user * user name * @param namespace * namespace * @param action * one of action in [Read, Write, Create, Exec, Admin] * @return true if user has, false otherwise */ public boolean authorizeUserNamespace(User user, String nam...
3.26
hbase_AuthManager_removeNamespace_rdh
/** * Remove given namespace from AuthManager's namespace cache. * * @param ns * namespace */ public void removeNamespace(byte[] ns) { namespaceCache.remove(Bytes.toString(ns)); }
3.26
hbase_AuthManager_authorizeCell_rdh
/** * Check if user has given action privilige in cell scope. * * @param user * user name * @param table * table name * @param cell * cell to be checked * @param action * one of action in [Read, Write, Create, Exec, Admin] * @return true if user has, false otherwise */ public boolean authorizeCell(U...
3.26
hbase_AuthManager_refreshNamespaceCacheFromWritable_rdh
/** * Update acl info for namespace. * * @param namespace * namespace * @param data * updated acl data * @throws IOException * exception when deserialize data */ public void refreshNamespaceCacheFromWritable(String namespace, byte[] data) throws IOException { if ((data != null) && (data.length > 0))...
3.26
hbase_AuthManager_accessUserTable_rdh
/** * Checks if the user has access to the full table or at least a family/qualifier for the * specified action. * * @param user * user name * @param table * table name * @param action * action in one of [Read, Write, Create, Exec, Admin] * @return true if the user has access to the table, false otherwi...
3.26
hbase_AuthManager_updateTableCache_rdh
/** * Updates the internal table permissions cache for specified table. * * @param table * updated table name * @param tablePerms * new table permissions */ private void updateTableCache(TableName table, ListMultimap<String, Permission> tablePerms) { PermissionCache<TablePermission> cacheToUpdate = table...
3.26
hbase_AuthManager_authorizeUserGlobal_rdh
/** * Check if user has given action privilige in global scope. * * @param user * user name * @param action * one of action in [Read, Write, Create, Exec, Admin] * @return true if user has, false otherwise */ public boolean authorizeUserGlobal(User user, Permission.Action action) { if (user == null) { ...
3.26
hbase_AuthManager_authorizeUserFamily_rdh
/** * Check if user has given action privilige in table:family scope. This method is for backward * compatibility. * * @param user * user name * @param table * table name ...
3.26
hbase_AuthManager_updateGlobalCache_rdh
/** * Updates the internal global permissions cache. * * @param globalPerms * new global permissions */ private void updateGlobalCache(ListMultimap<String, Permission> globalPerms) { globalCache.clear();for (String name : globalPerms.keySet()) { for (Permission permission : globalPerms.get(name))...
3.26
hbase_AuthManager_updateNamespaceCache_rdh
/** * Updates the internal namespace permissions cache for specified namespace. * * @param namespace * updated namespace * @param nsPerms * new namespace permissions */ private void updateNamespaceCache(String namespace, ListMultimap<String, Permission> nsPerms) { PermissionCache<NamespacePermission> cac...
3.26
hbase_AuthManager_refreshTableCacheFromWritable_rdh
/** * Update acl info for table. * * @param table * name of table * @param data * updated acl data * @throws IOException * exception when deserialize data */ public void refreshTableCacheFromWritable(TableName table, byte[] data) throws IOException { if ((data != null) && (data.length > 0)) { ...
3.26
hbase_ZstdCompressor_maxCompressedLength_rdh
// Package private static int maxCompressedLength(final int len) { return ((int) (Zstd.compressBound(len))); }
3.26
hbase_CoprocessorClassLoader_clearCache_rdh
// This method is used in unit test public static void clearCache() { classLoadersCache.clear(); }
3.26
hbase_CoprocessorClassLoader_getAllCached_rdh
// This method is used in unit test public static Collection<? extends ClassLoader> getAllCached() { return classLoadersCache.values(); }
3.26
hbase_CoprocessorClassLoader_getClassLoader_rdh
/** * Get a CoprocessorClassLoader for a coprocessor jar path from cache. If not in cache, create * one. * * @param path * the path to the coprocessor jar file to load classes from * @param parent * the parent cla...
3.26
hbase_CoprocessorClassLoader_getIfCached_rdh
// This method is used in unit test public static CoprocessorClassLoader getIfCached(final Path path) { Preconditions.checkNotNull(path, "The jar path is null!"); return classLoadersCache.get(path); }
3.26
hbase_CoprocessorClassLoader_isClassExempt_rdh
/** * Determines whether the given class should be exempt from being loaded by this ClassLoader. * * @param name * the name of the class to test. * @return true if the class should *not* be loaded by this ClassLoader; false otherwise. */ protected boolean isClassExempt(String name, String[] includedClassPrefixe...
3.26
hbase_LogLevel_main_rdh
/** * A command line implementation */ public static void main(String[] args) throws Exception { CLI cli = new CLI(new Configuration()); System.exit(cli.m0(args)); }
3.26
hbase_LogLevel_doSetLevel_rdh
/** * Send HTTP request to set log level. * * @throws HadoopIllegalArgumentException * if arguments are invalid. * @throws Exception * if unable to connect */ private void doSetLevel() throws Exception { process((((((protocol + "://") + hostName) + "/logLevel?log=") + className) + "&level=") + level);...
3.26
hbase_LogLevel_process_rdh
/** * Configures the client to send HTTP request to the URL. Supports SPENGO for authentication. * * @param urlString * URL and query string to the daemon's web UI * @throws Exception * if unable to connect */ private void process(String urlString) throws Exception { URL url = new URL(urlString); S...
3.26
hbase_LogLevel_doGetLevel_rdh
/** * Send HTTP request to get log level. * * @throws HadoopIllegalArgumentException * if arguments are invalid. * @throws Exception * if unable to connect */ private void doGetLevel() throws Exception { process((((protocol + "://") + hostName) + "/logLevel?log=") + className); }
3.26
hbase_LogLevel_sendLogLevelRequest_rdh
/** * Send HTTP request to the daemon. * * @throws HadoopIllegalArgumentException * if arguments are invalid. * @throws Exception * if unable to connect */ private void sendLogLevelRequest() throws HadoopIllegalArgumentException, Exception { switch (operation) { case GETLEVEL : ...
3.26
hbase_AuthResult_concatenateExtraParams_rdh
/** * Returns extra parameter key/value string */ private String concatenateExtraParams() { final StringBuilder sb = new StringBuilder(); boolean first = true; for (Entry<String, String> entry : extraParams.entrySet()) { if ((entry.getKey() != null) && (entry.getValue() != null)) { if (!first) { sb.append(','); } fir...
3.26
hbase_IdReadWriteLockWithObjectPool_getLock_rdh
/** * Get the ReentrantReadWriteLock corresponding to the given id * * @param id * an arbitrary number to identify the lock */ @Override public ReentrantReadWriteLock getLock(T id) { lockPool.purge(); ReentrantReadWriteLock readWriteLock = lockPool.get(id); return readWriteLock; }
3.26
hbase_IdReadWriteLockWithObjectPool_purgeAndGetEntryPoolSize_rdh
/** * For testing */ int purgeAndGetEntryPoolSize() {gc(); Threads.sleep(200); lockPool.purge(); return lockPool.size(); }
3.26
hbase_MemStoreSnapshot_getId_rdh
/** * Returns snapshot's identifier. */ public long getId() { return id; }
3.26
hbase_MemStoreSnapshot_getTimeRangeTracker_rdh
/** * Returns {@link TimeRangeTracker} for all the Cells in the snapshot. */ public TimeRangeTracker getTimeRangeTracker() { return timeRangeTracker; } /** * Create new {@link SnapshotSegmentScanner}s for iterating over the snapshot. <br/> * NOTE:Here when create new {@link SnapshotSegmentScanner}s, {@link Se...
3.26
hbase_MemStoreSnapshot_getCellsCount_rdh
/** * Returns Number of Cells in this snapshot. */ public int getCellsCount() { return cellsCount; }
3.26
hbase_MemStoreSnapshot_isTagsPresent_rdh
/** * Returns true if tags are present in this snapshot */ public boolean isTagsPresent() { return this.tagsPresent; }
3.26
hbase_NewVersionBehaviorTracker_isDeleted_rdh
/** * This method is not idempotent, we will save some info to judge VERSION_MASKED. * * @param cell * - current cell to check if deleted by a previously seen delete * @return We don't distinguish DeleteColumn and DeleteFamily. We only return code for column. */ @Override public DeleteResult isDeleted(Cell cell...
3.26