name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hbase_ProcedureStore_cleanup_rdh
/** * Will be called by the framework to give the store a chance to do some clean up works. * <p/> * Notice that this is for periodical clean up work, not for the clean up after close, if you want * to close the store just call the {@link #stop(boolean)} method above. */default void cleanup() { }
3.26
hbase_ProcedureStore_postSync_rdh
/** * triggered when the store sync is completed. */default void postSync() { }
3.26
hbase_Compactor_postCompactScannerOpen_rdh
/** * Calls coprocessor, if any, to create scanners - after normal scanner creation. * * @param request * Compaction request. * @param scanType * Scan type. * @param scanner * The default scanner created for compaction. * @return Scanner scanner to use (usually the default); null if compaction should not...
3.26
hbase_Compactor_getFileDetails_rdh
/** * Extracts some details about the files to compact that are commonly needed by compactors. * * @param filesToCompact * Files. * @param allFiles * Whether all files are included for compaction * @parma major If major compaction * @return The result. */ private FileDetails getFileDetails(Collection<HSto...
3.26
hbase_Compactor_getProgress_rdh
/** * Return the aggregate progress for all currently active compactions. */public CompactionProgress getProgress() { synchronized(progressSet) { long totalCompactingKVs = 0; long currentCompactedKVs = 0; long totalCompactedSize = 0; for (CompactionProgress progress : progressSet) { totalCompa...
3.26
hbase_Compactor_createScanner_rdh
/** * * @param store * The store. * @param scanners * Store file scanners. * @param smallestReadPoint * Smallest MVCC read point. * @param earliestPutTs * Earliest put across all files. * @param dropDeletesFromRow * Drop deletes starting with this row, inclusive. Can be null. * @param dropDeletesT...
3.26
hbase_Compactor_createWriter_rdh
/** * Creates a writer for a new file. * * @param fd * The file details. * @return Writer for a new StoreFile * @throws IOException * if creation failed */ protected final StoreFileWriter createWriter(FileDetails fd, boolean shouldDropBehind, boolean major, Consumer<Path> writerCreationTracker) throws I...
3.26
hbase_Compactor_createFileScanners_rdh
/** * Creates file scanners for compaction. * * @param filesToCompact * Files. * @return Scanners. */ private List<StoreFileScanner> createFileScanners(Collection<HStoreFile> filesToCompact, long smallestReadPoint, boolean useDropBehind) throws IOException { return StoreFileScanner.getScannersForCompaction...
3.26
hbase_Compactor_performCompaction_rdh
/** * Performs the compaction. * * @param fd * FileDetails of cell sink writer * @param scanner * Where to read from. * @param writer * Where to write to. * @param smallestReadPoint * Smallest read point. ...
3.26
hbase_MetricsRegionServer_incrementRegionSizeReportingChoreTime_rdh
/** * * @see MetricsRegionServerQuotaSource#incrementRegionSizeReportingChoreTime(long) */ public void incrementRegionSizeReportingChoreTime(long time) { quotaSource.incrementRegionSizeReportingChoreTime(time); }
3.26
hbase_MetricsRegionServer_incrementNumRegionSizeReportsSent_rdh
/** * * @see MetricsRegionServerQuotaSource#incrementNumRegionSizeReportsSent(long) */ public void incrementNumRegionSizeReportsSent(long numReportsSent) { quotaSource.incrementNumRegionSizeReportsSent(numReportsSent); }
3.26
hbase_CellModel_setColumn_rdh
/** * * @param column * the column to set */ public void setColumn(byte[] column) { this.column = column; }
3.26
hbase_CellModel_getTimestamp_rdh
/** * Returns the timestamp */ public long getTimestamp() { return timestamp; }
3.26
hbase_CellModel_hasUserTimestamp_rdh
/** * Returns true if the timestamp property has been specified by the user */ public boolean hasUserTimestamp() { return timestamp != HConstants.LATEST_TIMESTAMP; }
3.26
hbase_CellModel_getValue_rdh
/** * Returns the value */ public byte[] getValue() { return value; }
3.26
hbase_CellModel_setValue_rdh
/** * * @param value * the value to set */ public void setValue(byte[] value) { this.value = value; }
3.26
hbase_CellModel_getColumn_rdh
/** * Returns the column */ public byte[] getColumn() { return column; }
3.26
hbase_CellModel_setTimestamp_rdh
/** * * @param timestamp * the timestamp to set */ public void setTimestamp(long timestamp) { this.timestamp = timestamp; }
3.26
hbase_MetricRegistriesLoader_load_rdh
/** * Creates a {@link MetricRegistries} instance using the corresponding {@link MetricRegistries} * available to {@link ServiceLoader} on the classpath. If no instance is found, then default * implementation will be loaded. * * @return A {@link MetricRegistries} implementation. */ static MetricRegistries load(Li...
3.26
hbase_FavoredNodesManager_filterNonFNApplicableRegions_rdh
/** * Filter and return regions for which favored nodes is not applicable. * * @return set of regions for which favored nodes is not applicable */ public static Set<RegionInfo> filterNonFNApplicableRegions(Collection<RegionInfo> regions) { return regions.stream().filter(r -> !isFavoredNodeApplicable(r)).collec...
3.26
hbase_FavoredNodesManager_isFavoredNodeApplicable_rdh
/** * Favored nodes are not applicable for system tables. We will use this to check before we apply * any favored nodes logic on a region. */ public static boolean isFavoredNodeApplicable(RegionInfo regionInfo) { return !regionInfo.getTable().isSystemTable(); }
3.26
hbase_FavoredNodesManager_getReplicaLoad_rdh
/** * Get the replica count for the servers provided. * <p/> * For each server, replica count includes three counts for primary, secondary and tertiary. If a * server is the primary favored node for 10 regions, secondary for 5 and tertiary for 1, then the * list would be [10, 5, 1]. If the server is newly added to...
3.26
hbase_FavoredNodesManager_getFavoredNodesWithDNPort_rdh
/** * This should only be used when sending FN information to the region servers. Instead of sending * the region server port, we use the datanode port. This helps in centralizing the DN port logic * in Master. The RS uses the port from the favored node list as hints. */ public synchronized List<ServerName> getFavo...
3.26
hbase_QuotaSettings_buildSetQuotaRequestProto_rdh
/** * Convert a QuotaSettings to a protocol buffer SetQuotaRequest. This is used internally by the * Admin client to serialize the quota settings and send them to the master. */ @InterfaceAudience.Private public static SetQuotaRequest buildSetQuotaRequestProto(final QuotaSettings settings) { SetQuotaRequest.Buil...
3.26
hbase_QuotaSettings_buildFromProto_rdh
/** * Converts the protocol buffer request into a QuotaSetting POJO. Arbitrarily enforces that the * request only contain one "limit", despite the message allowing multiple. The public API does * not allow such use of the message. * * @param request * The ...
3.26
hbase_QuotaSettings_validateQuotaTarget_rdh
/** * Validates that settings being merged into {@code this} is targeting the same "subject", e.g. * user, table, namespace. * * @param mergee * The quota settings to be merged into {@code this}. * @throws IllegalArgumentException * if the subjects are not equal. */ v...
3.26
hbase_SaslClientAuthenticationProviders_m0_rdh
/** * Returns the number of providers that have been registered. */ public int m0() { return providers.size(); }
3.26
hbase_SaslClientAuthenticationProviders_selectProvider_rdh
/** * Chooses the best authentication provider and corresponding token given the HBase cluster * identifier and the user. */ public Pair<SaslClientAuthenticationProvider, Token<? extends TokenIdentifier>> selectProvider(String clusterId, User clientUser) { return selector.selectProvider(clusterId, clientUser); }
3.26
hbase_SaslClientAuthenticationProviders_addProviderIfNotExists_rdh
/** * Adds the given {@code provider} to the set, only if an equivalent provider does not already * exist in the set. */ static void addProviderIfNotExists(SaslClientAuthenticationProvider provider, HashMap<Byte, SaslClientAuthenticationProvider> providers) { Byte code = provider.getSaslAuthMethod().getCode(); ...
3.26
hbase_SaslClientAuthenticationProviders_reset_rdh
/** * Removes the cached singleton instance of {@link SaslClientAuthenticationProviders}. */ public static synchronized void reset() { providersRef.set(null); }
3.26
hbase_SaslClientAuthenticationProviders_instantiate_rdh
/** * Instantiates all client authentication providers and returns an instance of * {@link SaslClientAuthenticationProviders}. */ static SaslClientAuthenticationProviders instantiate(Configuration conf) { ServiceLoader<SaslClientAuthenticationProvider> loader = ServiceLoader.load(SaslClientAuthenticationProvider...
3.26
hbase_SaslClientAuthenticationProviders_instantiateSelector_rdh
/** * Instantiates the ProviderSelector implementation from the provided configuration. */ static AuthenticationProviderSelector instantiateSelector(Configuration conf, Collection<SaslClientAuthenticationProvider> providers) { Class<? extends AuthenticationProviderSelector> clz = conf....
3.26
hbase_SaslClientAuthenticationProviders_getSimpleProvider_rdh
/** * Returns the provider and token pair for SIMPLE authentication. This method is a "hack" while * SIMPLE authentication for HBase does not flow through the SASL codepath. */ public Pair<SaslClientAuthenticationProvider, Token<? extends TokenIdentifier>> getSimpleProvider() { Optional<SaslClientAuthenticationP...
3.26
hbase_SaslClientAuthenticationProviders_getInstance_rdh
/** * Returns a singleton instance of {@link SaslClientAuthenticationProviders}. */ public static synchronized SaslClientAuthenticationProviders getInstance(Configuration conf) { SaslClientAuthenticationProviders providers = providersRef.get(); if (providers == null) { providers = instantiate(conf);...
3.26
hbase_SaslClientAuthenticationProviders_addExplicitProviders_rdh
/** * Extracts and instantiates authentication providers from the configuration. */ static void addExplicitProviders(Configuration conf, HashMap<Byte, SaslClientAuthenticationProvider> providers) { for (String implName : conf.getStringCollection(EXTRA_PROVIDERS_KEY)) { Class<?> clz; // Load the cl...
3.26
hbase_ExtendedCellBuilderFactory_create_rdh
/** * Allows creating a cell with the given CellBuilderType. * * @param type * the type of CellBuilder(DEEP_COPY or SHALLOW_COPY). * @return the cell that is created */ public static ExtendedCellBuilder create(CellBuilderType type) { switch (type) { case SHALLOW_COPY : return new Indiv...
3.26
hbase_RegionRemoteProcedureBase_reportTransition_rdh
// should be called with RegionStateNode locked, to avoid race with the execute method below void reportTransition(MasterProcedureEnv env, RegionStateNode regionNode, ServerName serverName, TransitionCode transitionCode, long seqId) throws IOException { if (state != RegionRemoteProcedureBaseState.REGION_REMOT...
3.26
hbase_RegionRemoteProcedureBase_persistAndWake_rdh
// A bit strange but the procedure store will throw RuntimeException if we can not persist the // state, so upper layer should take care of this... private void persistAndWake(MasterProcedureEnv env, RegionStateNode regionNode) { env.getMasterServices().getMasterProcedureExecutor().getStore().update(this); regi...
3.26
hbase_UnsafeAccess_getAsLong_rdh
/** * Reads bytes at the given offset as a long value. * * @return long value at offset */ private static long getAsLong(ByteBuffer buf, int offset) { if (buf.isDirect()) { return HBasePlatformDependent.getLong(directBufferAddress(buf) + offset); } return HBasePlatformDependent.getLong(buf.array...
3.26
hbase_UnsafeAccess_toLong_rdh
/** * Reads a long value at the given Object's offset considering it was written in big-endian * format. * * @return long value at offset */ public static long toLong(Object ref, long offset) { if (LITTLE_ENDIAN) { return Long.reverseBytes(HBasePlatformDependent.getLong(ref, offset)); } return ...
3.26
hbase_UnsafeAccess_m0_rdh
/** * Converts a byte array to a long value considering it was written in big-endian format. * * @param bytes * byte array * @param offset * offset into array * @return the long value */ public static long m0(byte[] bytes, int offset) { if (LITTLE_ENDIAN) { return Long.reverseBytes(HBasePlatfor...
3.26
hbase_UnsafeAccess_toInt_rdh
/** * Reads a int value at the given Object's offset considering it was written in big-endian format. * * @return int value at offset */ public static int toInt(Object ref, long offset) { if (LITTLE_ENDIAN) { return Integer.reverseBytes(HBasePlatformDependent.getInt(ref, offset)); } return HBa...
3.26
hbase_UnsafeAccess_putLong_rdh
/** * Put a long value out to the specified BB position in big-endian format. * * @param buf * the byte buffer * @param offset * position in the buffer * @param val * long to write out * @return incremented offset */ public static int putLong(ByteBuffer buf, int offset, long val) { if (LITTLE_ENDIAN...
3.26
hbase_UnsafeAccess_getAsInt_rdh
/** * Reads bytes at the given offset as an int value. * * @return int value at offset */ private static int getAsInt(ByteBuffer buf, int offset) { if (buf.isDirect()) { return HBasePlatformDependent.getInt(directBufferAddress(buf) + offset); } return HBasePlatformDependent.getInt(buf.array(), (...
3.26
hbase_UnsafeAccess_copy_rdh
/** * Copies specified number of bytes from given offset of {@code src} buffer into the {@code dest} * buffer. * * @param src * source buffer * @param srcOffset * offset into source buffer * @param dest * destination buffer * @param destOffset * offset into destination buffer * @param length * le...
3.26
hbase_UnsafeAccess_putInt_rdh
/** * Put an int value out to the specified ByteBuffer offset in big-endian format. * * @param buf * the ByteBuffer to write to * @param offset * offset in the ByteBuffer * @param val * int to write out * @return incremented offset */ public static int putInt(ByteBuffer buf, int offset, int val) { i...
3.26
hbase_UnsafeAccess_putShort_rdh
// APIs to add primitives to BBs /** * Put a short value out to the specified BB position in big-endian format. * * @param buf * the byte buffer * @param offset * position in the buffer * @param val * short to write out * @return incremented offset */ public static int putShort(ByteBuffer buf, int offse...
3.26
hbase_UnsafeAccess_toByte_rdh
/** * Returns the byte at the given offset of the object * * @return the byte at the given offset */public static byte toByte(Object ref, long offset) { return HBasePlatformDependent.getByte(ref, offset); }
3.26
hbase_UnsafeAccess_toShort_rdh
/** * Reads a short value at the given Object's offset considering it was written in big-endian * format. * * @return short value at offset */public static short toShort(Object ref, long offset) { if (LITTLE_ENDIAN) { return Short.reverseBytes(HBasePlatformDependent.getShort(ref, offset));} return...
3.26
hbase_UnsafeAccess_putByte_rdh
/** * Put a byte value out to the specified BB position in big-endian format. * * @param buf * the byte buffer * @param offset * position in the buffer * @param b * byte to write out * @return incremented offset */ public static int putByte(ByteBuffer buf, int offset, byte b) { if (buf.isDirect()) {...
3.26
hbase_UnsafeAccess_getAsShort_rdh
/** * Reads bytes at the given offset as a short value. * * @return short value at offset */ private static short getAsShort(ByteBuffer buf, int offset) { if (buf.isDirect()) { return HBasePlatformDependent.getShort(directBufferAddress(buf) + offset); } return HBasePlatformDependent.getShort(buf...
3.26
hbase_ScanInfo_customize_rdh
/** * Used by CP users for customizing max versions, ttl, keepDeletedCells, min versions, and time to * purge deletes. */ ScanInfo customize(int maxVersions, long ttl, KeepDeletedCells keepDeletedCells, int minVersions, long timeToPurgeDeletes) { return new ScanInfo(family, minVersions, maxVersions, ttl, keepDelete...
3.26
hbase_BlockingRpcCallback_run_rdh
/** * Called on completion of the RPC call with the response object, or {@code null} in the case of * an error. * * @param parameter * the response object or {@code null} if an error occurred */ @Override public void run(R parameter) { synchronized(this) { result = parameter; resultS...
3.26
hbase_BlockingRpcCallback_get_rdh
/** * Returns the parameter passed to {@link #run(Object)} or {@code null} if a null value was * passed. When used asynchronously, this method will block until the {@link #run(Object)} method * has been called. * * @return the response object or {@code null} if no response was passed */ public synchronized R get...
3.26
hbase_HashTable_getCurrentKey_rdh
/** * Get the current key * * @return the current key or null if there is no current key */ public ImmutableBytesWritable getCurrentKey() { return key; }
3.26
hbase_HashTable_next_rdh
/** * Read the next key/hash pair. Returns true if such a pair exists and false when at the end * of the data. */ public boolean next() throws IOException { if (cachedNext) { cachedNext = false;return true; } key = new ImmutableBytesWritable(); hash = new ImmutableBytesWritable(); ...
3.26
hbase_HashTable_getCurrentHash_rdh
/** * Get the current hash * * @return the current hash or null if there is no current hash */ public ImmutableBytesWritable getCurrentHash() { return hash; }
3.26
hbase_HashTable_selectPartitions_rdh
/** * Choose partitions between row ranges to hash to a single output file Selects region * boundaries that fall within the scan range, and groups them into the desired number of * partitions. */void selectPartitions(Pair<byte[][], byte[][]> regionStartEndKeys) { List<byte[]> startKeys = new ArrayList<>(...
3.26
hbase_HashTable_main_rdh
/** * Main entry point. */ public static void main(String[] args) throws Exception { int ret = ToolRunner.run(new HashTable(HBaseConfiguration.create()), args); System.exit(ret); }
3.26
hbase_HashTable_newReader_rdh
/** * Open a TableHash.Reader starting at the first hash at or after the given key. */ public Reader newReader(Configuration conf, ImmutableBytesWritable startKey) throws IOException { return new Reader(conf, startKey); }
3.26
hbase_WALEntryStream_getPosition_rdh
/** * Returns the position of the last Entry returned by next() */ public long getPosition() { return currentPositionOfEntry; }
3.26
hbase_WALEntryStream_readNextEntryAndRecordReaderPosition_rdh
/** * Returns whether the file is opened for writing. */ private Pair<WALTailingReader.State, Boolean> readNextEntryAndRecordReaderPosition() { OptionalLong v13; if (logQueue.getQueueSize(walGroupId) > 1) { // if there are more than one files in queue, although it is possible that we are // still trying to w...
3.26
hbase_WALEntryStream_close_rdh
/** * {@inheritDoc } */ @Override public void close() {closeReader(); }
3.26
hbase_WALEntryStream_hasNext_rdh
/** * Try advance the stream if there is no entry yet. See the javadoc for {@link HasNext} for more * details about the meanings of the return values. * <p/> * You can call {@link #peek()} or {@link #next()} to get the actual {@link Entry} if this method * returns {@link HasNext#YES}. */ public HasNext hasNext() ...
3.26
hbase_WALEntryStream_getCurrentPath_rdh
/** * Returns the {@link Path} of the current WAL */ public Path getCurrentPath() { return currentPath; }
3.26
hbase_WALEntryStream_peek_rdh
/** * Returns the next WAL entry in this stream but does not advance. * <p/> * Must call {@link #hasNext()} first before calling this method, and if you have already called * {@link #next()} to consume the current entry, you need to call {@link #hasNext()} again to * advance the stream before calling this method a...
3.26
hbase_EncryptionTest_testCipherProvider_rdh
/** * Check that the configured cipher provider can be loaded and initialized, or throw an exception. */ public static void testCipherProvider(final Configuration conf) throws IOException { String providerClassName = conf.get(HConstants.CRYPTO_CIPHERPROVIDER_CONF_KEY, DefaultCipherProvider.class.getName()); B...
3.26
hbase_EncryptionTest_testKeyProvider_rdh
/** * Check that the configured key provider can be loaded and initialized, or throw an exception. */ public static void testKeyProvider(final Configuration conf) throws IOException { String providerClassName = conf.get(HConstants.CRYPTO_KEYPROVIDER_CONF_KEY, KeyStoreKeyProvider.class.getNam...
3.26
hbase_EncryptionTest_testEncryption_rdh
/** * Check that the specified cipher can be loaded and initialized, or throw an exception. Verifies * key and cipher provider configuration as a prerequisite for cipher verification. Also verifies * if encryption is enabled globally. * * @param conf * HBase configuration * @param cipher * chiper algorith t...
3.26
hbase_MutableFastCounter_incr_rdh
/** * Increment the value by a delta * * @param delta * of the increment */ public void incr(long delta) { counter.add(delta); setChanged(); }
3.26
hbase_RawShort_decodeShort_rdh
/** * Read a {@code short} value from the buffer {@code buff}. */ public short decodeShort(byte[] buff, int offset) { return Bytes.toShort(buff, offset); }
3.26
hbase_RawShort_encodeShort_rdh
/** * Write instance {@code val} into buffer {@code buff}. */ public int encodeShort(byte[] buff, int offset, short val) { return Bytes.putShort(buff, offset, val); }
3.26
hbase_BulkLoadObserver_preCleanupBulkLoad_rdh
/** * Called as part of SecureBulkLoadEndpoint.cleanupBulkLoad() RPC call. It can't bypass the * default action, e.g., ctx.bypass() won't have effect. If you need to get the region or table * name, get it from the <code>ctx</code> as follows: * <code>code>ctx.getEnvironment().getRegion()</code>. Use getRegionInfo t...
3.26
hbase_BulkLoadObserver_prePrepareBulkLoad_rdh
/** * Coprocessors implement this interface to observe and mediate bulk load operations. <br> * <br> * <h3>Exception Handling</h3> For all functions, exception handling is done as follows: * <ul> * <li>Exceptions of type {@link IOException} are reported back to client.</li> * <li>For any other kind of exception: ...
3.26
hbase_MultithreadedTableMapper_getNumberOfThreads_rdh
/** * The number of threads in the thread pool that will run the map function. * * @param job * the job * @return the number of threads */ public static int getNumberOfThreads(JobContext job) { return job.getConfiguration().getInt(NUMBER_OF_THREADS, 10); }
3.26
hbase_MultithreadedTableMapper_getMapperClass_rdh
/** * Get the application's mapper class. * * @param <K2> * the map's output key type * @param <V2> * the map's output value type * @param job * the job * @return the mapper class to run */ @SuppressWarnings("unchecked") public static <K2, V2> Class<Mapper<ImmutableBytesWritable, Result, K2, V2>> getMap...
3.26
hbase_MultithreadedTableMapper_setNumberOfThreads_rdh
/** * Set the number of threads in the pool for running maps. * * @param job * the job to modify * @param threads * the new number of threads */ public static void setNumberOfThreads(Job job, int threads) { job.getConfiguration().setInt(NUMBER_OF_THREADS, threads); }
3.26
hbase_MultithreadedTableMapper_run_rdh
/** * Run the application's maps using a thread pool. */ @Override public void run(Context context) throws IOException, InterruptedException { f0 = context; int numberOfThreads = getNumberOfThreads(context); mapClass = getMapperClass(context); if (LOG.isDebugEnabled...
3.26
hbase_AbstractFSWALProvider_findArchivedLog_rdh
/** * Find the archived WAL file path if it is not able to locate in WALs dir. * * @param path * - active WAL file path * @param conf * - configuration * @return archived path if exists, null - otherwise * @throws IOException * exception */ public static Path findArchivedLog(Path path, Configuration con...
3.26
hbase_AbstractFSWALProvider_isMetaFile_rdh
/** * Returns True if String ends in {@link #META_WAL_PROVIDER_ID} */ public static boolean isMetaFile(String p) { return (p != null) && p.endsWith(META_WAL_PROVIDER_ID); }
3.26
hbase_AbstractFSWALProvider_getLogFileSize_rdh
/** * returns the size of rolled WAL files. */ public static long getLogFileSize(WAL wal) { return ((AbstractFSWAL<?>) (wal)).getLogFileSize(); }
3.26
hbase_AbstractFSWALProvider_getArchivedWALFiles_rdh
/** * List all the old wal files for a dead region server. * <p/> * Initially added for supporting replication, where we need to get the wal files to replicate for * a dead region server. */ public static List<Path> getArchivedWALFiles(Configuration conf, ServerName serverName, String logPrefix) throws IOException...
3.26
hbase_AbstractFSWALProvider_doInit_rdh
/** * * @param factory * factory that made us, identity used for FS layout. may not be null * @param conf * may not be null * @param providerId * differentiate between providers from one factory, used for FS layout. may be * null */ @Override protected vo...
3.26
hbase_AbstractFSWALProvider_getWALFiles_rdh
/** * List all the wal files for a logPrefix. */ public static List<Path> getWALFiles(Configuration c, ServerName serverName) throws IOException { Path walRoot = new Path(CommonFSUtils.getWALRootDir(c), HConstants.HREGION_LOGDIR_NAME); FileSystem v20 = walRoot.getFileSystem(c); List<Path> walFiles = new ArrayList<>()...
3.26
hbase_AbstractFSWALProvider_getWALArchiveDirectoryName_rdh
/** * Construct the directory name for all old WALs on a given server. The default old WALs dir looks * like: <code>hbase/oldWALs</code>. If you config hbase.separate.oldlogdir.by.regionserver to * true, it looks like <code>hbase//oldWALs/kalashnikov.att.net,61634,1486865297088</code>. * * @param serverName * S...
3.26
hbase_AbstractFSWALProvider_getCurrentFileName_rdh
/** * return the current filename from the current wal. */ public static Path getCurrentFileName(final WAL wal) { return ((AbstractFSWAL<?>) (wal)).getCurrentFileName(); }
3.26
hbase_AbstractFSWALProvider_getNumRolledLogFiles_rdh
/** * returns the number of rolled WAL files. */ public static int getNumRolledLogFiles(WAL wal) { return ((AbstractFSWAL<?>) (wal)).getNumRolledLogFiles(); }
3.26
hbase_AbstractFSWALProvider_getTimestamp_rdh
/** * Split a WAL filename to get a start time. WALs usually have the time we start writing to them * with as part of their name, usually the suffix. Sometimes there will be an extra suffix as when * it is a WAL for the meta table. For example, WALs might look like this * <code>10.20.20.171%3A60020.1277499063250</c...
3.26
hbase_AbstractFSWALProvider_recoverLease_rdh
// For HBASE-15019 public static void recoverLease(Configuration conf, Path path) { try { final FileSystem v38 = CommonFSUtils.getCurrentFileSystem(conf); RecoverLeaseFSUtils.recoverFileLease(v38, path, conf, new CancelableProgressable() { @Override public boolean progress() { LOG.debug("Still trying to recover ...
3.26
hbase_AbstractFSWALProvider_getTS_rdh
/** * Split a path to get the start time For example: 10.20.20.171%3A60020.1277499063250 Could also * be a meta WAL which adds a '.meta' suffix or a synchronous replication WAL which adds a * '.syncrep' suffix. Check. * * @param p * path to split * @return start time */ public static long getTS(Path p) { retu...
3.26
hbase_AbstractFSWALProvider_getNumLogFiles0_rdh
/** * iff the given WALFactory is using the DefaultWALProvider for meta and/or non-meta, count the * number of files (rolled and active). if either of them aren't, count 0 for that provider. */ @Override protected long getNumLogFiles0() { T log = this.wal; return log == null ? 0 : log.getNumLogFiles(); }
3.26
hbase_AbstractFSWALProvider_requestLogRoll_rdh
/** * request a log roll, but don't actually do it. */ static void requestLogRoll(final WAL wal) { ((AbstractFSWAL<?>) (wal)).requestLogRoll(); }
3.26
hbase_AbstractFSWALProvider_m1_rdh
/** * It returns the file create timestamp (the 'FileNum') from the file name. For name format see * {@link #validateWALFilename(String)} public until remaining tests move to o.a.h.h.wal * * @param wal * must not be null * @return the file number that is part of the WAL file name */ public static long m1(final...
3.26
hbase_AbstractFSWALProvider_parseServerNameFromWALName_rdh
/** * Parse the server name from wal prefix. A wal's name is always started with a server name in non * test code. * * @throws IllegalArgumentException * if the name passed in is not started with a server name * @return the server name */ public static ServerName parseServerNameFromWALName(String name) { Stri...
3.26
hbase_AbstractFSWALProvider_getWALPrefixFromWALName_rdh
/** * Get prefix of the log from its name, assuming WAL name in format of * log_prefix.filenumber.log_suffix * * @param name * Name of the WAL to parse * @return prefix of the log * @throws IllegalArgumentException * if the name passed in is not a valid wal file name * @see AbstractFSWAL#getCurrentFileName...
3.26
hbase_AccessController_hasFamilyQualifierPermission_rdh
/** * Returns <code>true</code> if the current user is allowed the given action over at least one of * the column qualifiers in the given column families. */ private boolean hasFamilyQualifierPermission(User user, Action perm, RegionCoprocessorEnvironment env, Map<byte[], ? extends Collection<byte[]>> familyMap) t...
3.26
hbase_AccessController_checkForReservedTagPresence_rdh
// Checks whether incoming cells contain any tag with type as ACL_TAG_TYPE. This tag // type is reserved and should not be explicitly set by user. private void checkForReservedTagPresence(User user, Mutation m) throws IOException { // No need to check if we're not going to throw if (!authorizationEnabled) { m.setAttrib...
3.26
hbase_AccessController_start_rdh
/* ---- MasterObserver implementation ---- */ @Override public void start(CoprocessorEnvironment env) throws IOException { CompoundConfiguration conf = new CompoundConfiguration(); conf.add(env.getConfiguration()); authorizationEnabled = AccessChecker.isAuthorizationSupported(conf); if (!authorizationEnabled) { LOG.w...
3.26
hbase_AccessController_checkCoveringPermission_rdh
/** * Determine if cell ACLs covered by the operation grant access. This is expensive. * * @return false if cell ACLs failed to grant access, true otherwise */ private boolean checkCoveringPermission(User user, OpType request, RegionCoprocessorEnvironment e, byte[] row, Map<byte[], ? extends Collection<?>> family...
3.26
hbase_AccessController_requireScannerOwner_rdh
/** * Verify, when servicing an RPC, that the caller is the scanner owner. If so, we assume that * access control is correctly enforced based on the checks performed in preScannerOpen() */ private void requireScannerOwner(InternalScanner s) throws AccessDeniedException { if (!RpcServer.isInRpcCallContext()) { retur...
3.26