name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hbase_FileArchiverNotifierImpl_bucketFilesToSnapshot_rdh | /**
* For the given snapshot, find all files which this {@code snapshotName} references. After a file
* is found to be referenced by the snapshot, it is removed from {@code filesToUpdate} and
* {@code snapshotSizeChanges} is updated in concert.
*
* @param snapshotName
* The snapshot to check
* @param filesToUp... | 3.26 |
hbase_CryptoAES_unwrap_rdh | /**
* Decrypts input data. The input composes of (msg, padding if needed, mac) and sequence num. The
* result is msg.
*
* @param data
* the input byte array
* @param offset
* the offset in input where the input starts
* @param len
* the input length
* @return the new decrypted byte array.
* @throws Sas... | 3.26 |
hbase_CryptoAES_wrap_rdh | /**
* Encrypts input data. The result composes of (msg, padding if needed, mac) and sequence num.
*
* @param data
* the input byte array
* @param offset
* the offset in input where the input starts
* @param len
* the input length
* @return the new encrypted byte array.
* @throws SaslException
* if er... | 3.26 |
hbase_RegionSizeCalculator_getRegionSize_rdh | /**
* Returns size of given region in bytes. Returns 0 if region was not found.
*/
public long getRegionSize(byte[] regionId) {
Long v7 = sizeMap.get(regionId);
if (v7 == null) {
LOG.debug("Unknown region:" + Arrays.toString(regionId));
return 0;
} else {
return v7;}
} | 3.26 |
hbase_MasterRpcServices_isProcedureDone_rdh | /**
* Checks if the specified procedure is done.
*
* @return true if the procedure is done, false if the procedure is in the process of completing
* @throws ServiceException
* if invalid procedure or failed procedure with progress failure reason.
*/
@Override
public IsProcedureDoneResponse isProcedureDone(RpcCo... | 3.26 |
hbase_MasterRpcServices_assigns_rdh | /**
* A 'raw' version of assign that does bulk and can skirt Master state checks if override is set;
* i.e. assigns can be forced during Master startup or if RegionState is unclean. Used by HBCK2.
*/
@Override
public AssignsResponse assigns(RpcController controller, MasterProtos.AssignsRequest request) throws Servic... | 3.26 |
hbase_MasterRpcServices_getCompletedSnapshots_rdh | /**
* List the currently available/stored snapshots. Any in-progress snapshots are ignored
*/
@Override
public GetCompletedSnapshotsResponse getCompletedSnapshots(RpcController controller, GetCompletedSnapshotsRequest request)
throws ServiceException {
try {
server.checkInitialized();
GetCompletedSnapshotsResponse.Bu... | 3.26 |
hbase_MasterRpcServices_hasAccessControlServiceCoprocessor_rdh | /**
* Determines if there is a MasterCoprocessor deployed which implements
* {@link AccessControlService.Interface}.
*/
boolean hasAccessControlServiceCoprocessor(MasterCoprocessorHost cpHost) {
return checkCoprocessorWithService(cpHost.findCoprocessors(MasterCoprocessor.class), Interface.class);
} | 3.26 |
hbase_MasterRpcServices_hasVisibilityLabelsServiceCoprocessor_rdh | /**
* Determines if there is a MasterCoprocessor deployed which implements
* {@link VisibilityLabelsService.Interface}.
*/
boolean
hasVisibilityLabelsServiceCoprocessor(MasterCoprocessorHost cpHost) {
return checkCoprocessorWithService(cpHost.findCoprocessors(MasterCoprocessor.class), Interface.class);
} | 3.26 |
hbase_MasterRpcServices_rpcPreCheck_rdh | /**
* Checks for the following pre-checks in order:
* <ol>
* <li>Master is initialized</li>
* <li>Rpc caller has admin permissions</li>
* </ol>
*
* @param requestName
* name of rpc request. Used in reporting failures to provide context.
* @throws ServiceException
* If any of the above listed pre-check fai... | 3.26 |
hbase_MasterRpcServices_getTableDescriptors_rdh | /**
* Get list of TableDescriptors for requested tables.
*
* @param c
* Unused (set to null).
* @param req
* GetTableDescriptorsRequest that contains: - tableNames: requested tables, or if
* empty, all are requested.
*/
@Override
public GetTableDescriptorsResponse getTableDescriptors(RpcController c, GetT... | 3.26 |
hbase_MasterRpcServices_lockHeartbeat_rdh | /**
*
* @return LOCKED, if procedure is found and it has the lock; else UNLOCKED.
* @throws ServiceException
* if given proc id is found but it is not a LockProcedure.
*/
@Override
public LockHeartbeatResponse lockHeartbeat(RpcController controller, LockHeartbeatRequest request) throws ServiceException {
try {
i... | 3.26 |
hbase_MasterRpcServices_getServices_rdh | /**
* Returns list of blocking services and their security info classes that this server supports
*/
@Override
protected List<BlockingServiceAndInterface> getServices() {
List<BlockingServiceAndInterface>
bssi = new ArrayList<>(5);bssi.add(new BlockingServiceAndInterface(MasterService.newReflectiveBlockingSer... | 3.26 |
hbase_MasterRpcServices_switchBalancer_rdh | /**
* Assigns balancer switch according to BalanceSwitchMode
*
* @param b
* new balancer switch
* @param mode
* BalanceSwitchMode
* @return old balancer switch
*/
boolean switchBalancer(final boolean b, BalanceSwitchMode mode) throws IOException {
boolean oldValue = server.loadBalancerStateStore.get();
... | 3.26 |
hbase_MasterRpcServices_setTableStateInMeta_rdh | /**
* Update state of the table in meta only. This is required by hbck in some situations to cleanup
* stuck assign/ unassign regions procedures for the table.
*
* @return previous state of the table
*/
@Override
public GetTableStateResponse setTableStateInMeta(RpcController controller, SetTableStateInMetaRequest... | 3.26 |
hbase_MasterRpcServices_setRegionStateInMeta_rdh | /**
* Update state of the region in meta only. This is required by hbck in some situations to cleanup
* stuck assign/ unassign regions procedures for the table.
*
* @return previous states of the regions
*/
@Override
public SetRegionStateInMetaResponse setRegionStateInMeta(RpcController controller, SetRegionState... | 3.26 |
hbase_MasterRpcServices_execProcedureWithRet_rdh | /**
* Triggers a synchronous attempt to run a distributed procedure and sets return data in response.
* {@inheritDoc }
*/
@Override
public ExecProcedureResponse execProcedureWithRet(RpcController controller, ExecProcedureRequest request) throws ServiceException {
rpcPreCheck("execProcedureWithRet");
try {
ProcedureD... | 3.26 |
hbase_MasterRpcServices_switchSnapshotCleanup_rdh | /**
* Turn on/off snapshot auto-cleanup based on TTL
*
* @param enabledNewVal
* Set to <code>true</code> to enable, <code>false</code> to disable
* @param synchronous
* If <code>true</code>, it waits until current snapshot cleanup is
* completed, if outstanding
* @return previous snapshot auto-cleanup mod... | 3.26 |
hbase_MasterRpcServices_checkCoprocessorWithService_rdh | /**
* Determines if there is a coprocessor implementation in the provided argument which extends or
* implements the provided {@code service}.
*/
boolean checkCoprocessorWithService(List<MasterCoprocessor> coprocessorsToCheck, Class<?> service) {
if ((coprocessorsToCheck == null) || coprocessorsToCheck.isEmpty()) ... | 3.26 |
hbase_MasterRpcServices_offlineRegion_rdh | /**
* Offline specified region from master's in-memory state. It will not attempt to reassign the
* region as in unassign. This is a special method that should be used by experts or hbck.
*/
@Override
public OfflineRegionResponse offlineRegion(RpcController controller, OfflineRegionRequest request) throws ServiceExc... | 3.26 |
hbase_MasterRpcServices_snapshot_rdh | /**
* Triggers an asynchronous attempt to take a snapshot. {@inheritDoc }
*/@Overridepublic SnapshotResponse snapshot(RpcController controller, SnapshotRequest request) throws ServiceException {
try {
server.checkInitialized();
server.snapshotManager.checkSnapshotSupport();
LOG.info((server.getClientIdAuditPrefix()... | 3.26 |
hbase_MasterRpcServices_checkMasterProcedureExecutor_rdh | /**
*
* @throws ServiceException
* If no MasterProcedureExecutor
*/
private void checkMasterProcedureExecutor() throws ServiceException {
if (this.server.getMasterProcedureExecutor() == null) {
throw new ServiceException("Master's ProcedureExecutor not initialized; retry later");
}
} | 3.26 |
hbase_MasterRpcServices_runHbckChore_rdh | // HBCK Services
@Override
public RunHbckChoreResponse runHbckChore(RpcController c, RunHbckChoreRequest req) throws ServiceException {
rpcPreCheck("runHbckChore");
LOG.info("{} request HBCK chore to run", server.getClientIdAuditPrefix());
HbckChore hbckChore = server.getHbckChore();boolean ran = hbckChore.runChore();
... | 3.26 |
hbase_MasterRpcServices_getTableNames_rdh | /**
* Get list of userspace table names
*
* @param controller
* Unused (set to null).
* @param req
* GetTableNamesRequest
*/
@Override
public GetTableNamesResponse getTableNames(RpcController controller, GetTableNamesRequest req) throws ServiceException {
try {
server.checkServiceStarted();
final String reg... | 3.26 |
hbase_MasterRpcServices_restoreSnapshot_rdh | /**
* Execute Restore/Clone snapshot operation.
* <p>
* If the specified table exists a "Restore" is executed, replacing the table schema and directory
* data with the content of the snapshot. The table must be disabled, or a
* UnsupportedOperationException will be thrown.
* <p>
* If the table doesn't exist a "C... | 3.26 |
hbase_MasterRpcServices_bypassProcedure_rdh | /**
* Bypass specified procedure to completion. Procedure is marked completed but no actual work is
* done from the current state/ step onwards. Parents of the procedure are also marked for bypass.
* NOTE: this is a dangerous operation and may be used to unstuck buggy procedures. This may leave
* system in incohere... | 3.26 |
hbase_MasterRpcServices_getSecurityCapabilities_rdh | /**
* Returns the security capabilities in effect on the cluster
*/
@Overridepublic SecurityCapabilitiesResponse getSecurityCapabilities(RpcController controller, SecurityCapabilitiesRequest request) throws ServiceException {
SecurityCapabilitiesResponse.Builder response = SecurityCapabilitiesResponse.newBuilder();
... | 3.26 |
hbase_MobFileName_getDateFromName_rdh | /**
* get date from MobFileName.
*
* @param fileName
* file name.
*/
public static String getDateFromName(final String fileName) {
return fileName.substring(STARTKEY_END_INDEX, DATE_END_INDEX);
} | 3.26 |
hbase_MobFileName_m0_rdh | /**
* Creates an instance of MobFileName
*
* @param startKey
* The md5 hex string of the start key.
* @param date
* The string of the latest timestamp of cells in this file, the format is
* yyyymmdd.
* @param uuid
* The uuid.
* @param regionName
* name of a region, where this file was created durin... | 3.26 |
hbase_MobFileName_getDate_rdh | /**
* Gets the date string. Its format is yyyymmdd.
*
* @return The date string.
*/
public String getDate() {return this.date;
} | 3.26 |
hbase_MobFileName_create_rdh | /**
* Creates an instance of MobFileName.
*
* @param fileName
* The string format of a file name.
* @return An instance of a MobFileName.
*/
public static MobFileName create(String fileName) {
// The format of a file name is md5HexString(0-31bytes) + date(32-39bytes) + UUID
// + "_" + region
// The ... | 3.26 |
hbase_MobFileName_m1_rdh | /**
* Gets region name
*
* @return name of a region, where this file was created during flush or compaction.
*/
public String
m1() {
return regionName;
} | 3.26 |
hbase_MobFileName_getStartKey_rdh | /**
* Gets the hex string of the md5 for a start key.
*
* @return The hex string of the md5 for a start key.
*/
public String getStartKey() {return startKey;
} | 3.26 |
hbase_MobFileName_getFileName_rdh | /**
* Gets the file name.
*
* @return The file name.
*/
public String getFileName() {
return this.fileName;
} | 3.26 |
hbase_MobFileName_getStartKeyFromName_rdh | /**
* get startKey from MobFileName.
*
* @param fileName
* file name.
*/
public static String getStartKeyFromName(final String fileName) {
return fileName.substring(0, STARTKEY_END_INDEX);
} | 3.26 |
hbase_NettyRpcFrameDecoder_readRawVarint32_rdh | /**
* Reads variable length 32bit int from buffer This method is from ProtobufVarint32FrameDecoder in
* Netty and modified a little bit to pass the cyeckstyle rule.
*
* @return decoded int if buffers readerIndex has been forwarded else nonsense value
*/
private static int readRawVarint32(ByteBuf buffer) {
if (... | 3.26 |
hbase_FavoredNodeAssignmentHelper_getOneRandomServer_rdh | /**
* Gets a random server from the specified rack and skips anything specified.
*
* @param rack
* rack from a server is needed
* @param skipServerSet
* the server shouldn't belong to this set
*/
protected ServerName getOneRandomServer(String rack, Set<ServerName>
skipServerSet) {
// Is the rack valid? D... | 3.26 |
hbase_FavoredNodeAssignmentHelper_initialize_rdh | // Always initialize() when FavoredNodeAssignmentHelper is constructed.
public void initialize() {
for (ServerName sn : this.servers) {
String rackName = getRackOfServer(sn);
List<ServerName> serverList =
this.rackToRegionServerMap.get(rackName);
if (serverList == null) {
... | 3.26 |
hbase_FavoredNodeAssignmentHelper_placePrimaryRSAsRoundRobin_rdh | // Place the regions round-robin across the racks picking one server from each
// rack at a time. Start with a random rack, and a random server from every rack.
// If a rack doesn't have enough servers it will go to the next rack and so on.
// for choosing a primary.
// For example, if 4 racks (r1 .... | 3.26 |
hbase_FavoredNodeAssignmentHelper_getFavoredNodes_rdh | /**
* Returns PB'ed bytes of {@link FavoredNodes} generated by the server list.
*/
public static byte[] getFavoredNodes(List<ServerName> serverAddrList) {
FavoredNodes.Builder f
= FavoredNodes.newBuilder();
for (ServerName s : serverAddrList) {
HBaseProtos.ServerName.Builder b = HBaseProtos.Serve... | 3.26 |
hbase_FavoredNodeAssignmentHelper_m1_rdh | /**
* Place secondary and tertiary nodes in a multi rack case. If there are only two racks, then we
* try the place the secondary and tertiary on different rack than primary. But if the other rack
* has only one region server, then we place primary and tertiary on one rack and seconda... | 3.26 |
hbase_FavoredNodeAssignmentHelper_generateFavoredNodes_rdh | /* Generate favored nodes for a set of regions when we know where they are currently hosted. */
private Map<RegionInfo,
List<ServerName>> generateFavoredNodes(Map<RegionInfo, ServerName> primaryRSMap) {
Map<RegionInfo, List<ServerName>> generatedFavNodes = new HashMap<>()... | 3.26 |
hbase_FavoredNodeAssignmentHelper_updateMetaWithFavoredNodesInfo_rdh | /**
* Update meta table with favored nodes info
*/
public static void updateMetaWithFavoredNodesInfo(Map<RegionInfo, List<ServerName>> regionToFavoredNodes, Configuration conf) throws
IOException {
// Write the region assignments to the meta table.
// TODO: See above overrides take a Connection rather than ... | 3.26 |
hbase_FavoredNodeAssignmentHelper_getRackOfServer_rdh | /**
* Get the rack of server from local mapping when present, saves lookup by the RackManager.
*/
private String getRackOfServer(ServerName sn)
{
if (this.regionServerToRackMap.containsKey(sn.getHostname())) {
return this.regionServerToRackMap.get(sn.getHost... | 3.26 |
hbase_FavoredNodeAssignmentHelper_getFavoredNodesList_rdh | /**
* Convert PB bytes to ServerName.
*
* @param favoredNodes
* The PB'ed bytes of favored nodes
* @return the array of {@link ServerName} for the byte array of favored nodes.
*/public static ServerName[] getFavoredNodesList(byte[] favoredNodes) throws IOException {
FavoredNodes f = FavoredNodes.parseFrom(f... | 3.26 |
hbase_FavoredNodeAssignmentHelper_placeSecondaryAndTertiaryWithRestrictions_rdh | /**
* For regions that share the primary, avoid placing the secondary and tertiary on a same RS. Used
* for generating new assignments for the primary/secondary/tertiary RegionServers
*
* @return the map of regions to the servers the region-files should be hosted on
*/
public Map<RegionInfo, ServerName[]> placeSec... | 3.26 |
hbase_SaslChallengeDecoder_tryDecodeError_rdh | // will throw a RemoteException out if data is enough, so do not need to return anything.
private void tryDecodeError(ByteBuf in, int offset, int readableBytes) throws IOException {
if (readableBytes < 4) {
return;
}
int classLen = in.getInt(offset);
if (classLen <= 0) {
throw new IOExce... | 3.26 |
hbase_MultiTableInputFormat_getConf_rdh | /**
* Returns the current configuration.
*
* @return The current configuration.
* @see org.apache.hadoop.conf.Configurable#getConf()
*/
@Override
public Configuration getConf() {
return conf;
} | 3.26 |
hbase_MultiTableInputFormat_setConf_rdh | /**
* Sets the configuration. This is used to set the details for the tables to be scanned.
*
* @param configuration
* The configuration to set.
* @see org.apache.hadoop.conf.Configurable#setConf( org.apache.hadoop.conf.Configuration)
*/
@Override
public void setConf(Configuration configuration) {
this.conf... | 3.26 |
hbase_ReversedStoreScanner_seekAsDirection_rdh | /**
* Do a backwardSeek in a reversed StoreScanner(scan backward)
*/
@Override
protected boolean seekAsDirection(Cell kv) throws IOException {
return backwardSeek(kv);
} | 3.26 |
hbase_HFileCleaner_countDeletedFiles_rdh | // Currently only for testing purpose
private void countDeletedFiles(boolean isLargeFile, boolean fromLargeQueue) {
if (isLargeFile) {
if (deletedLargeFiles.get() == Long.MAX_VALUE) {
LOG.debug("Deleted more than Long.MAX_VALUE large files, reset counter to 0");
deletedLargeFiles... | 3.26 |
hbase_HFileCleaner_checkAndUpdateConfigurations_rdh | /**
* Check new configuration and update settings if value changed
*
* @param conf
* The new configuration
* @return true if any configuration for HFileCleaner changes, false if no change
*/
private boolean checkAndUpdateConfigurations(Configuration conf) {
boolean updated = false;
int throttlePoint =
... | 3.26 |
hbase_HFileCleaner_m1_rdh | /**
* Stop threads for hfile deletion
*/
private void m1() {
running = false;
LOG.debug("Stopping file delete threads");
for (Thread thread : threads) {
thread.interrupt();
}
} | 3.26 |
hbase_HFileCleaner_startHFileDeleteThreads_rdh | /**
* Start threads for hfile deletion
*/
private void startHFileDeleteThreads() {
final String n = Thread.currentThread().getName();running = true;
// start thread for large file deletion
for (int i = 0; i < largeFileDeleteThreadNumber; i++) {
Thread large = new Th... | 3.26 |
hbase_HFileCleaner_getDelegatesForTesting_rdh | /**
* Exposed for TESTING!
*/public List<BaseHFileCleanerDelegate> getDelegatesForTesting() {
return this.cleanersChain;
} | 3.26 |
hbase_HFileCleaner_deleteFile_rdh | /**
* Construct an {@link HFileDeleteTask} for each file to delete and add into the correct queue
*
* @param file
* the file to delete
* @return HFileDeleteTask to track progress
*/
private HFileDeleteTask deleteFile(FileStatus file) {
HFileDeleteTask task = new HFileDeleteTask(file, cleanerThreadTimeoutMse... | 3.26 |
hbase_Random64_seedUniquifier_rdh | /**
* Copy from {@link Random#seedUniquifier()}
*/
private static long seedUniquifier() {
for (; ;) {
long current = seedUniquifier.get();
long next = current * 181783497276652981L;
if (seedUniquifier.compareAndSet(current, next)) {return next;
}
}
} | 3.26 |
hbase_Random64_main_rdh | /**
* Random64 is a pseudorandom algorithm(LCG). Therefore, we will get same sequence if seeds are
* the same. This main will test how many calls nextLong() it will get the same seed. We do not
* need to save all numbers (that is too large). We could save once every 100000 calls nextL... | 3.26 |
hbase_NettyRpcClientConfigHelper_setEventLoopConfig_rdh | /**
* Set the EventLoopGroup and channel class for {@code AsyncRpcClient}.
*/
public static void setEventLoopConfig(Configuration conf, EventLoopGroup group, Class<? extends Channel> channelClass) {
Preconditions.checkNotNull(group, "group is null");
Preconditions.checkNotNull(channelClass, "channel class is ... | 3.26 |
hbase_NettyRpcClientConfigHelper_createEventLoopPerClient_rdh | /**
* The {@link NettyRpcClient} will create its own {@code NioEventLoopGroup}.
*/
public static void createEventLoopPerClient(Configuration conf) {
conf.set(EVENT_LOOP_CONFIG, "");
EVENT_LOOP_CONFIG_MAP.clear();
} | 3.26 |
hbase_WindowMovingAverage_getNumberOfStatistics_rdh | /**
* Returns number of statistics
*/
protected int getNumberOfStatistics() {
return
lastN.length;
} | 3.26 |
hbase_WindowMovingAverage_moveForwardMostRecentPosition_rdh | /**
* Move forward the most recent index.
*
* @return the most recent index
*/
protected int moveForwardMostRecentPosition() {
int index = ++mostRecent;
if ((!oneRound) && (index == getNumberOfStatistics())) {
// Back to the head of the lastN, from now on will
// start to evict oldest value... | 3.26 |
hbase_WindowMovingAverage_getMostRecentPosition_rdh | /**
* Returns index of most recent
*/
protected int getMostRecentPosition() {
return mostRecent;
} | 3.26 |
hbase_WindowMovingAverage_enoughStatistics_rdh | /**
* Check if there are enough statistics.
*
* @return true if lastN is full
*/
protected boolean enoughStatistics() {
return oneRound;
} | 3.26 |
hbase_WindowMovingAverage_getStatisticsAtIndex_rdh | /**
* Get statistics at index.
*
* @param index
* index of bar
*/
protected long getStatisticsAtIndex(int index) {
if ((index < 0) || (index >= getNumberOfStatistics())) { // This case should not happen, but a prudent check.
throw new IndexOutOfBoundsException();
}
return lastN[index];
} | 3.26 |
hbase_RowIndexSeekerV1_copyFromNext_rdh | /**
* Copy the state from the next one into this instance (the previous state placeholder). Used to
* save the previous state when we are advancing the seeker to the next key/value.
*/
protected void copyFromNext(SeekerState nextState)
{
f2 = nextState.f2;
currentKey.setKey(nextState.f2, nextState.currentK... | 3.26 |
hbase_SnapshotFileCache_getFiles_rdh | /**
* Returns the hfiles in the snapshot when <tt>this</tt> was made.
*/
public Collection<String> getFiles() {
return this.f2;
} | 3.26 |
hbase_SnapshotFileCache_getUnreferencedFiles_rdh | /**
* Check to see if any of the passed file names is contained in any of the snapshots. First checks
* an in-memory cache of the files to keep. If its not in the cache, then the cache is refreshed
* and the cache checked again for that file. This ensures that we never return files that exist.
* <p>
* Note this ma... | 3.26 |
hbase_SnapshotFileCache_triggerCacheRefreshForTesting_rdh | /**
* Trigger a cache refresh, even if its before the next cache refresh. Does not affect pending
* cache refreshes.
* <p/>
* Blocks until the cache is refreshed.
* <p/>
* Exposed for TESTING.
*/
public synchronized void triggerCacheRefreshForTesting() {
try {
refreshCache();
} catch (IOException... | 3.26 |
hbase_DrainingServerTracker_start_rdh | /**
* Starts the tracking of draining RegionServers.
* <p>
* All Draining RSs will be tracked after this method is called.
*/
public void start() throws KeeperException, IOException {
watcher.registerListener(this);
// Add a ServerListener to check if a server is draining when it's added.
serverManager.... | 3.26 |
hbase_GroupingTableMap_createGroupKey_rdh | /**
* Create a key by concatenating multiple column values. Override this function in order to
* produce different types of keys.
*
* @return key generated by concatenating multiple column values
*/
protected ImmutableBytesWritable createGroupKey(byte[][] vals) {
if (vals == null) {
return null;
}... | 3.26 |
hbase_GroupingTableMap_map_rdh | /**
* Extract the grouping columns from value to construct a new key. Pass the new key and value to
* reduce. If any of the grouping columns are not found in the value, the record is skipped.
*/
public void map(ImmutableBytesWritable key, Result value, OutputCollector<ImmutableBytesWritable, Result> output, Reporte... | 3.26 |
hbase_GroupingTableMap_initJob_rdh | /**
* Use this before submitting a TableMap job. It will appropriately set up the JobConf.
*
* @param table
* table to be processed
* @param columns
* space separated list of columns to fetch
* @param groupColumns
* space separated list of columns used to form the key used in collect
* @param mapper
* ... | 3.26 |
hbase_GroupingTableMap_extractKeyValues_rdh | /**
* Extract columns values from the current record. This method returns null if any of the columns
* are not found. Override this method if you want to deal with nulls differently.
*
* @return array of byte values
*/
protected byte[][] extractKeyValues(Result r) {
byte[][] keyVals = null;
ArrayList<byte[... | 3.26 |
hbase_Connection_getClusterId_rdh | /**
* Returns the cluster ID unique to this HBase cluster. <br>
* The default implementation is added to keep client compatibility.
*/
default String getClusterId() {
return null;
} | 3.26 |
hbase_Connection_getHbck_rdh | /**
* Retrieve an Hbck implementation to fix an HBase cluster. The returned Hbck is not guaranteed to
* be thread-safe. A new instance should be created by each thread. This is a lightweight
* operation. Pooling or caching of the returned Hbck instance is not recommended. <br>
* The caller is responsible for callin... | 3.26 |
hbase_Connection_getTable_rdh | /**
* Retrieve a Table implementation for accessing a table. The returned Table is not thread safe, a
* new instance should be created for each using thread. This is a lightweight operation, pooling
* or caching of the returned Table is neither required nor desired.
* <p>
* The caller is responsible for calling {@... | 3.26 |
hbase_OpenRegionHandler_updateMeta_rdh | /**
* Update ZK or META. This can take a while if for example the hbase:meta is not available -- if
* server hosting hbase:meta crashed and we are waiting on it to come back -- so run in a thread
* and keep updating znode state meantime so master doesn't timeout our region-in-transition.
* Caller must cleanup regio... | 3.26 |
hbase_OpenRegionHandler_openRegion_rdh | /**
* Returns Instance of HRegion if successful open else null.
*/
private HRegion openRegion() {
HRegion region = null;
boolean compactionEnabled
= ((HRegionServer) (server)).getCompactSplitThread().isCompactionsEnabled();
this.server.getConfiguration().setBoolean(HBASE_REGION_SERVER_ENABLE_COMPAC... | 3.26 |
hbase_OpenRegionHandler_getException_rdh | /**
* Returns Null or the run exception; call this method after thread is done.
*/
Throwable getException()
{
return this.exception;
} | 3.26 |
hbase_MemoryBoundedLogMessageBuffer_dumpTo_rdh | /**
* Dump the contents of the buffer to the given stream.
*/
public synchronized void dumpTo(PrintWriter out) {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
for (LogMessage msg : messages) {
out.write(df.format(new Date(msg.timestamp)));
out.write(" ");
out.pr... | 3.26 |
hbase_MemoryBoundedLogMessageBuffer_estimateHeapUsage_rdh | /**
* Estimate the number of bytes this buffer is currently using.
*/
synchronized long estimateHeapUsage() {
return usage;
} | 3.26 |
hbase_MemoryBoundedLogMessageBuffer_add_rdh | /**
* Append the given message to this buffer, automatically evicting older messages until the
* desired memory limit is achieved.
*/
public synchronized void add(String messageText) {
LogMessage message = new LogMessage(messageText, EnvironmentEdgeManager.currentTime());
usage += message.estimateHeapUsage()... | 3.26 |
hbase_Procedure_bypass_rdh | /**
* Set the bypass to true. Only called in
* {@link ProcedureExecutor#bypassProcedure(long, long, boolean, boolean)} for now. DO NOT use
* this method alone, since we can't just bypass one single procedure. We need to bypass its
* ancestor too. If your Procedure has set state, it needs to undo... | 3.26 |
hbase_Procedure_doExecute_rdh | // ==========================================================================
// Internal methods - called by the ProcedureExecutor
// ==========================================================================
/**
* Internal method called by the ProcedureExecutor that starts the user-level code execute().
*
* @throw... | 3.26 |
hbase_Procedure_tryRunnable_rdh | /**
* Try to set this procedure into RUNNABLE state. Succeeds if all subprocedures/children are done.
*
* @return True if we were able to move procedure to RUNNABLE state.
*/
synchronized boolean tryRunnable() {
// Don't use isWaiting in the below; it returns true for WAITING and WAITING_TIMEOUT
if ((getSta... | 3.26 |
hbase_Procedure_setProcId_rdh | /**
* Called by the ProcedureExecutor to assign the ID to the newly created procedure.
*/
protected void setProcId(long procId) {
this.procId = procId;
this.submittedTime = EnvironmentEdgeManager.currentTime();
setState(ProcedureState.RUNNABLE);
} | 3.26 |
hbase_Procedure_isRunnable_rdh | // ==============================================================================================
// Runtime state, updated every operation by the ProcedureExecutor
//
// There is always 1 thread at the time operating on the state of the procedure.
// The ProcedureExecutor may check and set states, or some Procecedure... | 3.26 |
hbase_Procedure_getTimeout_rdh | /**
* Returns the timeout in msec
*/
public int getTimeout() {
return timeout;
} | 3.26 |
hbase_Procedure_toStringSimpleSB_rdh | /**
* Build the StringBuilder for the simple form of procedure string.
*
* @return the StringBuilder
*/
protected StringBuilder toStringSimpleSB() {
final StringBuilder sb = new StringBuilder();
sb.append("pid="... | 3.26 |
hbase_Procedure_addStackIndex_rdh | /**
* Called by the RootProcedureState on procedure execution. Each procedure store its stack-index
* positions.
*/
protected synchronized void addStackIndex(final int index) {
if (stackIndexes == null) {
stackIndexes = new int[]{ index };
} else {
int count = stackIndexes.length;
... | 3.26 |
hbase_Procedure_getResult_rdh | /**
* Returns the serialized result if any, otherwise null
*/
public byte[] getResult() {
return result;
} | 3.26 |
hbase_Procedure_setSubmittedTime_rdh | /**
* Called on store load to initialize the Procedure internals after the creation/deserialization.
*/
protected void setSubmittedTime(long
submittedTime) {
this.submittedTime =
submittedTime;
} | 3.26 |
hbase_Procedure_releaseLock_rdh | /**
* The user should override this method, and release lock if necessary.
*/
protected void releaseLock(TEnvironment env) {
// no-op
} | 3.26 |
hbase_Procedure_toStringDetails_rdh | /**
* Extend the toString() information with more procedure details
*/
public String toStringDetails() {
final StringBuilder sb = toStringSimpleSB();
sb.append(" submittedTime=");sb.append(getSubmittedTime());
sb.append(", lastUpdate=");
sb.append(getLastUpdate());
final int[] v7 = getStackIndexes... | 3.26 |
hbase_Procedure_doReleaseLock_rdh | /**
* Internal method called by the ProcedureExecutor that starts the user-level code releaseLock().
*/
final void doReleaseLock(TEnvironment env, ProcedureStore store) {
locked = false;
// persist that we have released the lock. This must be done before we actually release the
// lock. Another procedure... | 3.26 |
hbase_Procedure_elapsedTime_rdh | // ==========================================================================
// runtime state
// ==========================================================================
/**
* Returns the time elapsed between the last update and the start time of the procedure.
*/
public long elapsedTime() {
return getLastUpda... | 3.26 |
hbase_Procedure_setStackIndexes_rdh | /**
* Called on store load to initialize the Procedure internals after the creation/deserialization.
*/
protected synchronized void setStackIndexes(final List<Integer> stackIndexes) {
this.stackIndexes = new int[stackIndexes.size()];
for (int i = 0; i < this.stackIndexes.length; ++i) { this.stackIndexes[i] =... | 3.26 |
hbase_Procedure_hasLock_rdh | /**
* This is used in conjunction with {@link #holdLock(Object)}. If {@link #holdLock(Object)}
* returns true, the procedure executor will call acquireLock() once and thereafter not call
* {@link #releaseLock(Object)} until the Procedure is done (Normally, it calls release/acquire
* around each invocation of {@link... | 3.26 |
hbase_Procedure_setTimeout_rdh | // ==========================================================================
// runtime state - timeout related
// ==========================================================================
/**
*
* @param timeout
* timeout interval in msec
*/
protected void setTimeout(int timeout) {
this.timeout = timeou... | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.