name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hbase_RegionStates_getRegionsOfTable_rdh | /**
* Returns Return the regions of the table and filter them.
*/
private List<RegionInfo> getRegionsOfTable(TableName table, Predicate<RegionStateNode> filter) {
return getTableRegionStateNodes(table).stream().filter(filter).map(n -> n.getRegionInfo()).collect(Collectors.toList());
} | 3.26 |
hbase_RegionStates_logSplit_rdh | /**
* Called after we've split all logs on a crashed Server.
*
* @see #logSplitting(ServerName)
*/
public void logSplit(final ServerName serverName)
{
setServerState(serverName, ServerState.OFFLINE);
} | 3.26 |
hbase_RegionStates_getRegionStates_rdh | /**
* Returns A snapshot of region state nodes for all the regions.
*/
public ArrayList<RegionState> getRegionStates() {
final ArrayList<RegionState> regions = new ArrayList<>(regionsMap.size());
for (RegionStateNode node : regionsMap.values()) {
regions.add(node.toRegionState());
}
return regions;
} | 3.26 |
hbase_RegionStates_createRegionStateNode_rdh | // ==========================================================================
// RegionStateNode helpers
// ==========================================================================
RegionStateNode createRegionStateNode(RegionInfo regionInfo) {
synchronized(regionsMapLock) {RegionStateNode node = regionsMap.comput... | 3.26 |
hbase_RegionStates_getOrCreateServer_rdh | // ==========================================================================
// Servers
// ==========================================================================
/**
* Be judicious calling this method. Do it on server register ONLY otherwise you could mess up
* online server accounting. TOOD: Review usage and co... | 3.26 |
hbase_RegionStates_m0_rdh | /**
* Returns A view of region state nodes for all the regions.
*/
public Collection<RegionStateNode> m0() {
return Collections.unmodifiableCollection(regionsMap.values());
} | 3.26 |
hbase_CellSetModel_addRow_rdh | /**
* Add a row to this cell set
*
* @param row
* the row
*/
public void addRow(RowModel row) {
rows.add(row);
} | 3.26 |
hbase_CellSetModel_getRows_rdh | /**
* Returns the rows
*/
public List<RowModel> getRows() {
return rows;
} | 3.26 |
hbase_Dictionary_write_rdh | /**
* Helper methods to write the dictionary data to the OutputStream
*
* @param out
* the outputstream to which data needs to be written
* @param data
* the data to be written in ByteBuffer
* @param offset
* the offset
* @param length
* length to be written
* @param dict
* the dictionary whose co... | 3.26 |
hbase_ExploringCompactionPolicy_m0_rdh | /**
* Find the total size of a list of store files.
*
* @param potentialMatchFiles
* StoreFile list.
* @return Sum of StoreFile.getReader().length();
*/
private long m0(List<HStoreFile> potentialMatchFiles) {
return potentialMatchFiles.stream().mapToLong(sf -> sf.getReader().length()).sum();
} | 3.26 |
hbase_ExploringCompactionPolicy_filesInRatio_rdh | /**
* Check that all files satisfy the constraint
*
* <pre>
* FileSize(i) <= ( Sum(0,N,FileSize(_)) - FileSize(i)) * Ratio.
* </pre>
*
* @param files
* List of store files to consider as a compaction candidate.
* @param currentRatio
* The ratio to use.
* @r... | 3.26 |
hbase_ExploringCompactionPolicy_selectCompactFiles_rdh | /**
* Select at least one file in the candidates list to compact, through choosing files from the
* head to the index that the accumulation length larger the max compaction size. This method is a
* supplementary of the selectSimpleCompaction() method, aims to make sure at least one file can
* be selected to compact... | 3.26 |
hbase_InternalScan_isCheckOnlyMemStore_rdh | /**
* Returns true if only the MemStore should be checked. False if not.
*
* @return true to only check MemStore
*/
public boolean isCheckOnlyMemStore() {
return memOnly;
} | 3.26 |
hbase_InternalScan_m0_rdh | /**
* StoreFiles will not be scanned. Only MemStore will be scanned.
*/
public void m0() {
memOnly = true;
filesOnly = false;
} | 3.26 |
hbase_InternalScan_checkOnlyStoreFiles_rdh | /**
* MemStore will not be scanned. Only StoreFiles will be scanned.
*/
public void checkOnlyStoreFiles() {
memOnly = false;
filesOnly = true;
} | 3.26 |
hbase_ScannerContext_hasTimeLimit_rdh | /**
* Returns true if the time limit can be enforced in the checker's scope
*/
boolean hasTimeLimit(LimitScope checkerScope) {
return limits.canEnforceTimeLimitFromScope(checkerScope) && ((limits.getTime() > 0) || returnImmediately);
} | 3.26 |
hbase_ScannerContext_incrementBlockProgress_rdh | /**
* Progress towards the block limit has been made. Increment internal track of block progress
*/
void incrementBlockProgress(int blockSize) {
if (blockSize >
0) {
long curBlockSize
= progress.getBlockSize();
progress.setBlockSize(curBlockSize + blockSize);
}
} | 3.26 |
hbase_ScannerContext_m0_rdh | /**
* Get the metrics instance. Should only be called after a call to {@link #isTrackingMetrics()}
* has been made to confirm that metrics are indeed being tracked.
*
* @return {@link ServerSideScanMetrics} instance that is tracking metrics for this scan
*/
public ServerSideScanMetrics
m0() {
assert isTrac... | 3.26 |
hbase_ScannerContext_canEnforceTimeLimitFromScope_rdh | /**
* Returns true when the limit can be enforced from the scope of the checker
*/
boolean canEnforceTimeLimitFromScope(LimitScope checkerScope) {
return this.timeScope.canEnforceLimitFromScope(checkerScope);} | 3.26 |
hbase_ScannerContext_setSizeLimitScope_rdh | /**
*
* @param scope
* The scope in which the size limit will be enforced
*/
void setSizeLimitScope(LimitScope scope) {
limits.setSizeScope(scope);
} | 3.26 |
hbase_ScannerContext_m1_rdh | /**
* Progress towards the batch limit has been made. Increment internal tracking of batch progress
*/
void m1(int batch) {
if (skippingRow) {
return;
}
int currentBatch =
progress.getBatch();
progress.setBatch(currentBatch + batch);
} | 3.26 |
hbase_ScannerContext_checkBatchLimit_rdh | /**
*
* @param checkerScope
* The scope that the limit is being checked from
* @return true when the limit is enforceable from the checker's scope and it has been reached
*/
boolean checkBatchLimit(LimitScope checkerScope) {
return ((!skippingRow) && hasBatchLimit(checkerScope)) && (progress.getBatch() >= limits... | 3.26 |
hbase_ScannerContext_checkSizeLimit_rdh | /**
*
* @param checkerScope
* The scope that the limit is being checked from
* @return true when the limit is enforceable from the checker's scope and it has been reached
*/
boolean checkSizeLimit(LimitScope
checkerScope) {
return ((!skippingRow) && hasSizeLimit(checkerScope)) && (((progress.getDataSize() >= lim... | 3.26 |
hbase_ScannerContext_incrementSizeProgress_rdh | /**
* Progress towards the size limit has been made. Increment internal tracking of size progress
*/
void incrementSizeProgress(long dataSize, long heapSize) {
if (skippingRow) {
return;
}
long curDataSize = progress.getDataSize();
progress.m4(curDataSize + dataSize);long curHeapSize = progress.getHeapSize();
progres... | 3.26 |
hbase_ScannerContext_setSizeScope_rdh | /**
* Change the scope in which the size limit is enforced
*/
void setSizeScope(LimitScope scope) {
this.f0 = scope;
} | 3.26 |
hbase_ScannerContext_getSkippingRow_rdh | /**
* In this mode, only block size progress is tracked, and limits are ignored. We set this mode
* when skipping to next row, in which case all cells returned a thrown away so should not count
* towards progress.
*
* @return true if we are in skipping row mode.
*/
public boolean getSkippingRow() {
return skippin... | 3.26 |
hbase_ScannerContext_limitReached_rdh | /**
* Returns true when the state indicates that a limit has been reached and scan should stop
*/
public boolean limitReached() {
return this.limitReached;} | 3.26 |
hbase_ScannerContext_setScannerState_rdh | /**
* Note that this is not a typical setter. This setter returns the {@link NextState} that was
* passed in so that methods can be invoked against the new state. Furthermore, this pattern
* allows the {@link NoLimitScannerContext} to cleanly override this setter and simply return the
* new state, thus preserving t... | 3.26 |
hbase_ScannerContext_m3_rdh | /**
* Returns {@link LimitScope} indicating scope in which the time limit is enforced
*/
LimitScope m3() {
return this.timeScope;
} | 3.26 |
hbase_ScannerContext_checkAnyLimitReached_rdh | /**
*
* @param checkerScope
* The scope that the limits are being checked from
* @return true when some limit is enforceable from the checker's scope and it has been reached
*/
boolean checkAnyLimitReached(LimitScope checkerScope) {
return (checkSizeLimit(checkerScope) || checkBatchLimit(checkerScope)) || checkT... | 3.26 |
hbase_ScannerContext_clearProgress_rdh | /**
* Clear away any progress that has been made so far. All progress fields are reset to initial
* values. Only clears progress that should reset between rows. {@link #getBlockSizeProgress()} is
* not reset because it increments for all blocks scanned whether the result is included or
* filtered.
*/
void clearPro... | 3.26 |
hbase_ScannerContext_setTimeScope_rdh | /**
* Change the scope in which the time limit is enforced
*/
void setTimeScope(LimitScope scope) {
this.timeScope = scope;
} | 3.26 |
hbase_ScannerContext_checkTimeLimit_rdh | /**
*
* @param checkerScope
* The scope that the limit is being checked from. The time limit is always
* checked against {@link EnvironmentEdgeManager.currentTime}
* @return true when the limit is enforceable from the checker's scope and it has been reached
*/
boolean checkTimeLimit(LimitScope checkerScope) {... | 3.26 |
hbase_ScannerContext_canEnforceSizeLimitFromScope_rdh | /**
* Returns true when the limit can be enforced from the scope of the checker
*/
boolean canEnforceSizeLimitFromScope(LimitScope checkerScope) {
return this.f0.canEnforceLimitFromScope(checkerScope);
} | 3.26 |
hbase_ScannerContext_getSizeScope_rdh | /**
* Returns {@link LimitScope} indicating scope in which the size limit is enforced
*/
LimitScope getSizeScope() {
return this.f0;
} | 3.26 |
hbase_ScannerContext_hasAnyLimit_rdh | /**
* Returns true if any limit can be enforced within the checker's scope
*/
boolean hasAnyLimit(LimitScope checkerScope) {
return (hasBatchLimit(checkerScope) || hasSizeLimit(checkerScope)) || hasTimeLimit(checkerScope);
} | 3.26 |
hbase_ScannerContext_hasBatchLimit_rdh | /**
* Returns true if the batch limit can be enforced in the checker's scope
*/
boolean hasBatchLimit(LimitScope checkerScope) {
return limits.canEnforceBatchLimitFromScope(checkerScope) && (limits.getBatch() > 0);
} | 3.26 |
hbase_ScannerContext_setSkippingRow_rdh | /**
*
* @param skippingRow
* set true to cause disabling of collecting per-cell progress or enforcing any
* limits. This is used when trying to skip over all cells in a row, in which
* case those cells are thrown away so should not count towards progress.
*/
void setSkippingRow(boolean skippingRow) {
this.s... | 3.26 |
hbase_ScannerContext_setTimeLimitScope_rdh | /**
*
* @param scope
* The scope in which the time limit will be enforced
*/
void setTimeLimitScope(LimitScope scope) {
limits.setTimeScope(scope);
} | 3.26 |
hbase_ScannerContext_canEnforceBatchLimitFromScope_rdh | /**
* Returns true when the limit can be enforced from the scope of the checker
*/
boolean canEnforceBatchLimitFromScope(LimitScope checkerScope) {
return LimitScope.BETWEEN_CELLS.canEnforceLimitFromScope(checkerScope);
} | 3.26 |
hbase_ScannerContext_hasSizeLimit_rdh | /**
* Returns true if the size limit can be enforced in the checker's scope
*/
boolean hasSizeLimit(LimitScope checkerScope) {
return limits.canEnforceSizeLimitFromScope(checkerScope) && (((limits.getDataSize() > 0)
|| (limits.getHeapSize() > 0)) || (limits.getBlockSize() > 0));
} | 3.26 |
hbase_ScannerContext_setFields_rdh | /**
* Set all fields together.
*/
void setFields(int batch, long dataSize, long heapSize, long blockSize) {
setBatch(batch);
m4(dataSize);
setHeapSize(heapSize);
setBlockSize(blockSize);
} | 3.26 |
hbase_HBaseZKTestingUtility_setupClusterTestDir_rdh | /**
* Creates a directory for the cluster, under the test data
*/
protected void setupClusterTestDir() {
if (clusterTestDir != null) {
return;
}
// Using randomUUID ensures that multiple clusters can be launched by
// a same test, if it stops & starts them
Path testDir = getDataTestDir("c... | 3.26 |
hbase_HBaseZKTestingUtility_shutdownMiniZKCluster_rdh | /**
* Shuts down zk cluster created by call to {@link #startMiniZKCluster()} or does nothing.
*
* @see #startMiniZKCluster()
*/
public void shutdownMiniZKCluster() throws
IOException {
if ((!f0) && (this.zkCluster != null)) {
this.zkCluster.shutdown();
this.zkCluster = null;
}
} | 3.26 |
hbase_HBaseZKTestingUtility_getZooKeeperWatcher_rdh | /**
* Gets a ZKWatcher.
*/
public static ZKWatcher getZooKeeperWatcher(HBaseZKTestingUtility testUtil) throws IOException {
return new ZKWatcher(testUtil.getConfiguration(), "unittest", new Abortable() {
boolean aborted = false;
@Override
public void abort(String why, Throwable e) {
aborted = t... | 3.26 |
hbase_HBaseZKTestingUtility_m1_rdh | /**
* Returns True if we removed the test dirs
*/
@Override
public boolean m1() {
boolean ret = super.cleanupTestDir();
if (deleteDir(this.clusterTestDir)) {
this.clusterTestDir = null;
return ret;
}
return false;
} | 3.26 |
hbase_HBaseZKTestingUtility_startMiniZKCluster_rdh | /**
* Call this if you only want a zk cluster.
*
* @see #shutdownMiniZKCluster()
* @return zk cluster started.
*/
public MiniZooKeeperCluster startMiniZKCluster(int zooKeeperServerNum, int... clientPortList) throws Exception {
setupClusterTestDir();
return m0(clusterTestDir, zooKeeperServerNum, clientPortL... | 3.26 |
hbase_HBaseZKTestingUtility_m0_rdh | /**
* Start a mini ZK cluster. If the property "test.hbase.zookeeper.property.clientPort" is set the
* port mentioned is used as the default port for ZooKeeper.
*/
private MiniZooKeeperCluster m0(File dir, int zooKeeperServerNum, int[] clientPortList) throws Exception {
if (this.zkCluster != null) {
thro... | 3.26 |
hbase_StoreUtils_getMaxMemStoreTSInList_rdh | /**
* Return the largest memstoreTS found across all storefiles in the given list. Store files that
* were created by a mapreduce bulk load are ignored, as they do not correspond to any specific
* put operation, and thus do not have a memstoreTS associated with them.
*/
public static OptionalLong getMaxMemStoreTSI... | 3.26 |
hbase_StoreUtils_getChecksumType_rdh | /**
* Returns the configured checksum algorithm.
*
* @param conf
* The configuration
* @return The checksum algorithm that is set in the configuration
*/
public static ChecksumType getChecksumType(Configuration conf) {
return ChecksumType.nameToType(conf.get(HConstants.CHECKSUM_TYPE_NAME, ChecksumType.getDe... | 3.26 |
hbase_StoreUtils_getLowestTimestamp_rdh | /**
* Gets lowest timestamp from candidate StoreFiles
*/
public static long getLowestTimestamp(Collection<HStoreFile> candidates) throws IOException {
long minTs = Long.MAX_VALUE;
for (HStoreFile storeFile : candidates)
{
minTs = Math.min(minTs, storeFile.getModificationTimestamp());
}retur... | 3.26 |
hbase_StoreUtils_getFileSplitPoint_rdh | /**
* Gets the approximate mid-point of the given file that is optimal for use in splitting it.
*
* @param file
* the store file
* @param comparator
* Comparator used to compare KVs.
* @return The split point row, or null if splitting is not possible, or reader is null.
*/
static Optional<byte[]> getFileSpl... | 3.26 |
hbase_StoreUtils_getBytesPerChecksum_rdh | /**
* Returns the configured bytesPerChecksum value.
*
* @param conf
* The configuration
* @return The bytesPerChecksum that is set in the configuration
*/
public static int getBytesPerChecksum(Configuration conf) {
return conf.getInt(HConstants.BYTES_PER_CHECKSUM, HFile.DEFAULT_BYTES_PER_CHECKSUM);
} | 3.26 |
hbase_StoreUtils_getLargestFile_rdh | /**
* Gets the largest file (with reader) out of the list of files.
*
* @param candidates
* The files to choose from.
* @return The largest file; null if no file has a reader.
*/
static Optional<HStoreFile> getLargestFile(Collection<HStoreFile> candidates) {
return candidates.stream().filter(f -> f.getReade... | 3.26 |
hbase_StoreUtils_getMaxSequenceIdInList_rdh | /**
* Return the highest sequence ID found across all storefiles in the given list.
*/
public static OptionalLong getMaxSequenceIdInList(Collection<HStoreFile> sfs) {
return sfs.stream().mapToLong(HStoreFile::getMaxSequenceId).max();
} | 3.26 |
hbase_StoreUtils_getDeterministicRandomSeed_rdh | /**
* Creates a deterministic hash code for store file collection.
*/
public static OptionalInt getDeterministicRandomSeed(Collection<HStoreFile> files) {
return files.stream().mapToInt(f -> f.getPath().getName().hashCode()).findFirst();
} | 3.26 |
hbase_StoreUtils_getSplitPoint_rdh | /**
* Gets the mid point of the largest file passed in as split point.
*/
static Optional<byte[]> getSplitPoint(Collection<HStoreFile> storefiles, CellComparator comparator) throws
IOException {
Optional<HStoreFile> largestFile = StoreUtils.getLargestFile(storefiles);
return largestFile.isPresent() ? StoreUt... | 3.26 |
hbase_FSWALEntry_getFamilyNames_rdh | /**
* Returns the family names which are effected by this edit.
*/
Set<byte[]> getFamilyNames() {
return
familyNames;} | 3.26 |
hbase_FSWALEntry_getTxid_rdh | /**
* Returns The transaction id of this edit.
*/
long getTxid() {
return this.txid;
} | 3.26 |
hbase_FSWALEntry_m1_rdh | /**
* Here is where a WAL edit gets its sequenceid. SIDE-EFFECT is our stamping the sequenceid into
* every Cell AND setting the sequenceid into the MVCC WriteEntry!!!!
*
* @return The sequenceid we stamped on this edit.
*/
long m1(MultiVersionConcurrencyControl.WriteEntry we) throws IOException {
long v3 =
... | 3.26 |
hbase_ReplicationSourceWALActionListener_scopeWALEdits_rdh | /**
* Utility method used to set the correct scopes on each log key. Doesn't set a scope on keys from
* compaction WAL edits and if the scope is local.
*
* @param logKey
* Key that may get scoped according to its edits
* @param logEdit
* Edits used to lookup the scopes
*/
static void scopeWALEdits(WALKey lo... | 3.26 |
hbase_TinyLfuBlockCache_asReferencedHeapBlock_rdh | /**
* The block cached in TinyLfuBlockCache will always be an heap block: on the one side, the heap
* access will be more faster then off-heap, the small index block or meta block cached in
* CombinedBlockCache will benefit a lot. on other side, the TinyLfuBlockCache size is always
* calculated based on the total h... | 3.26 |
hbase_TinyLfuBlockCache_recordEviction_rdh | /**
* Records an eviction. The number of eviction operations and evicted blocks are identical, as an
* eviction is triggered immediately when the capacity has been exceeded. An eviction is performed
* asynchronously. See the library's documentation for details on write buffers, batching, and
* maintenance behavior... | 3.26 |
hbase_RSGroupAdminClient_moveTables_rdh | /**
* Move given set of tables to the specified target RegionServer group. This will unassign all of
* a table's region so it can be reassigned to the correct group.
*/
public void moveTables(Set<TableName> tables, String
targetGroup) throws IOException {
MoveTablesRequest.Builder builder = MoveTablesRequest.new... | 3.26 |
hbase_RSGroupAdminClient_moveServersAndTables_rdh | /**
* Move given set of servers and tables to the specified target RegionServer group.
*
* @param servers
* set of servers to move
* @param tables
* set of tables to move
* @param targetGroup
* the target group name
* @throws IOException
* if moving the server and tables fail
*/
public void moveServe... | 3.26 |
hbase_RSGroupAdminClient_getRSGroupInfoOfTable_rdh | /**
* Gets {@code RSGroupInfo} for the given table's group.
*/
public RSGroupInfo getRSGroupInfoOfTable(TableName tableName) throws IOException {
GetRSGroupInfoOfTableRequest request = GetRSGroupInfoOfTableRequest.newBuilder().setTableName(ProtobufUtil.toProtoTableName(tableName)).build();
try {
GetRS... | 3.26 |
hbase_RSGroupAdminClient_removeRSGroup_rdh | /**
* Removes RegionServer group associated with the given name.
*/
public void removeRSGroup(String name) throws IOException {
RemoveRSGroupRequest request = RemoveRSGroupRequest.newBuilder().setRSGroupName(name).build();try {
stub.removeRSGroup(null,
request);
} catch (ServiceException e) ... | 3.26 |
hbase_RSGroupAdminClient_removeServers_rdh | /**
* Remove decommissioned servers from rsgroup. 1. Sometimes we may find the server aborted due to
* some hardware failure and we must offline the server for repairing. Or we need to move some
* servers to join other clusters. So we need to remove these servers from the rsgroup. 2.
* Dead/recovering/live servers ... | 3.26 |
hbase_RSGroupAdminClient_balanceRSGroup_rdh | /**
* Balance regions in the given RegionServer group.
*
* @return BalanceResponse details about the balancer run
*/
public BalanceResponse balanceRSGroup(String groupName, BalanceRequest request) throws IOException {
try {
BalanceRSGroupRequest req = ProtobufUtil.createBal... | 3.26 |
hbase_RSGroupAdminClient_getRSGroupOfServer_rdh | /**
* Retrieve the RSGroupInfo a server is affiliated to
*
* @param hostPort
* HostPort to get RSGroupInfo for
*/
public RSGroupInfo getRSGroupOfServer(Address hostPort) throws IOException {
GetRSGroupInfoOfServerRequest request = GetRSGroupInfoOfServerRequest.newBuilder().setServer(HBaseProtos.ServerName.n... | 3.26 |
hbase_RSGroupAdminClient_getRSGroupInfo_rdh | /**
* Gets {@code RSGroupInfo} for given group name.
*/
public RSGroupInfo getRSGroupInfo(String groupName) throws IOException {
try {
GetRSGroupInfoResponse resp = stub.getRSGroupInfo(null, GetRSGroupInfoRequest.newBuilder().setRSGroupName(groupName).build());
if (resp.hasRSGroupInfo()) {
... | 3.26 |
hbase_RSGroupAdminClient_listRSGroups_rdh | /**
* Lists current set of RegionServer groups.
*/
public List<RSGroupInfo> listRSGroups() throws IOException {
try {
List<RSGroupProtos.RSGroupInfo> v11 = stub.listRSGroupInfos(null, ListRSGroupInfosRequest.getDefaultInstance()).getRSGroupInfoList();
List<RSGroupInfo> result = new ArrayList<>(v... | 3.26 |
hbase_RSGroupAdminClient_moveServers_rdh | /**
* Move given set of servers to the specified target RegionServer group.
*/
public void moveServers(Set<Address> servers, String targetGroup) throws IOException {
Set<HBaseProtos.ServerName> hostPorts = Sets.newHashSet();
for (Address el : servers) {
hostPorts.add(HBaseProtos.ServerName.newBuilder... | 3.26 |
hbase_NamespacesModel_toString_rdh | /* (non-Javadoc)
@see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
for (String namespace : namespaces) {
sb.append(namespace);
sb.append("\n");
}
return sb.toString();
} | 3.26 |
hbase_NamespacesModel_getNamespaces_rdh | /**
* Returns all namespaces
*/public
List<String> getNamespaces() {
return namespaces;
} | 3.26 |
hbase_NamespacesModel_setNamespaces_rdh | /**
*
* @param namespaces
* the namespace name array
*/public void setNamespaces(List<String> namespaces) {
this.namespaces = namespaces;} | 3.26 |
hbase_ProcedureWALFile_addToSize_rdh | /**
* Used to update in-progress log sizes. the FileStatus will report 0 otherwise.
*/
void addToSize(long size) {this.logSize += size;
} | 3.26 |
hbase_NamespaceDescriptor_setConfiguration_rdh | /**
* Setter for storing a configuration setting in {@link #configuration} map.
*
* @param key
* Config key. Same as XML config key e.g. hbase.something.or.other.
* @param value
* String value. If null, removes the setting.
*/
public void setConfiguration(String key, String value) {
if (value == null) {
... | 3.26 |
hbase_NamespaceDescriptor_getConfigurationValue_rdh | /**
* Getter for accessing the configuration value by key
*/
public String getConfigurationValue(String key) {
return configuration.get(key);
} | 3.26 |
hbase_NamespaceDescriptor_removeConfiguration_rdh | /**
* Remove a config setting represented by the key from the {@link #configuration} map
*/
public void removeConfiguration(final String key) {configuration.remove(key);
} | 3.26 |
hbase_NamespaceDescriptor_getConfiguration_rdh | /**
* Getter for fetching an unmodifiable {@link #configuration} map.
*/
public Map<String, String> getConfiguration() {
// shallow pointer copy
return Collections.unmodifiableMap(configuration);} | 3.26 |
hbase_ZKAuthentication_login_rdh | /**
* Log in the current process using the given configuration keys for the credential file and login
* principal.
* <p>
* <strong>This is only applicable when running on secure hbase</strong> On regular HBase (without
* security features), this will safely be ignored.
* </p>
*
* @param conf
* The configurat... | 3.26 |
hbase_ZKAuthentication_isSecureZooKeeper_rdh | /**
* Returns {@code true} when secure authentication is enabled (whether
* {@code hbase.security.authentication} is set to "{@code kerberos}").
*/
public static boolean isSecureZooKeeper(Configuration conf) {
// Detection for embedded HBase client with jaas configuration
// defined for third party programs.... | 3.26 |
hbase_ZKAuthentication_loginClient_rdh | /**
* Log in the current zookeeper client using the given configuration keys for the credential file
* and login principal.
* <p>
* <strong>This is only applicable when running on secure hbase</strong> On regular HBase (without
* security features), this will safely be ignored.
* </p>
*
* @param conf
* The c... | 3.26 |
hbase_ZKAuthentication_loginServer_rdh | /**
* Log in the current zookeeper server process using the given configuration keys for the
* credential file and login principal.
* <p>
* <strong>This is only applicable when running on secure hbase</strong> On regular HBase (without
* security features), this will safely be ignored.
* </p>
*
* @param conf
*... | 3.26 |
hbase_TableInputFormat_addColumn_rdh | /**
* Parses a combined family and qualifier and adds either both or just the family in case there is
* no qualifier. This assumes the older colon divided notation, e.g. "family:qualifier".
*
* @param scan
* The Scan to update.
* @param familyAndQualifier
... | 3.26 |
hbase_TableInputFormat_configureSplitTable_rdh | /**
* Sets split table in map-reduce job.
*/
public static void configureSplitTable(Job job, TableName tableName) {
job.getConfiguration().set(SPLIT_TABLE, tableName.getNameAsString());
} | 3.26 |
hbase_TableInputFormat_createScanFromConfiguration_rdh | /**
* Sets up a {@link Scan} instance, applying settings from the configuration property constants
* defined in {@code TableInputFormat}. This allows specifying things such as:
* <ul>
* <li>start and stop rows</li>
* <li>column qualifiers or families</li>
* <li>timestamps or timerange</li>
* <li>scanner caching ... | 3.26 |
hbase_TableInputFormat_getSplits_rdh | /**
* Calculates the splits that will serve as input for the map tasks. The number of splits matches
* the number of regions in a table. Splits are shuffled if required.
*
* @param context
* The current job context.
* @return The list of input splits.
* @throws IOException
* When creating the list of splits... | 3.26 |
hbase_TableInputFormat_setConf_rdh | /**
* Sets the configuration. This is used to set the details for the table to be scanned.
*
* @param configuration
* The configuration to set.
* @see org.apache.hadoop.conf.Configurable#setConf( org.apache.hadoop.conf.Configuration)
*/
@Override
@SuppressWarnings(value = "REC_CATCH_EXCEPTION", justification = ... | 3.26 |
hbase_TableInputFormat_addColumns_rdh | /**
* Convenience method to parse a string representation of an array of column specifiers.
*
* @param scan
* The Scan to update.
* @param columns
* The columns to parse.
*/
private static void addColumns(Scan scan, String columns) {
String[] cols = columns.split(" ");
for (String col : cols) {
... | 3.26 |
hbase_TableInputFormat_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_ObserverContextImpl_createAndPrepare_rdh | /**
* Instantiates a new ObserverContext instance if the passed reference is <code>null</code> and
* sets the environment in the new or existing instance. This allows deferring the instantiation
* of a ObserverContext until it is actually needed.
*
* @param <E>
* The environment type for the context
* @param e... | 3.26 |
hbase_RawAsyncTableImpl_mutateRow_rdh | // We need the MultiRequest when constructing the org.apache.hadoop.hbase.client.MultiResponse,
// so here I write a new method as I do not want to change the abstraction of call method.
@SuppressWarnings("unchecked")
private <RES, RESP> CompletableFuture<RESP> mutateRow(... | 3.26 |
hbase_RestoreSnapshotProcedure_updateTableDescriptor_rdh | /**
* Update descriptor
*
* @param env
* MasterProcedureEnv
*/
private void updateTableDescriptor(final MasterProcedureEnv env) throws IOException {
env.getMasterServices().getTableDescriptors().update(modifiedTableDescriptor);
} | 3.26 |
hbase_RestoreSnapshotProcedure_restoreSnapshot_rdh | /**
* Execute the on-disk Restore
*
* @param env
* MasterProcedureEnv
*/
private void restoreSnapshot(final MasterProcedureEnv env) throws IOException {MasterFileSystem fileSystemManager = env.getMaste... | 3.26 |
hbase_RestoreSnapshotProcedure_updateMETA_rdh | /**
* Apply changes to hbase:meta
*/
private void updateMETA(final MasterProcedureEnv env) throws IOException {
try {
Connection conn = env.getMasterServices().getConnection();
RegionStateStore regionStateStore =
env.getAssignmentManager().getRegionStateStore();
int regionRepli... | 3.26 |
hbase_RestoreSnapshotProcedure_addRegionsToInMemoryStates_rdh | /**
* Add regions to in-memory states
*
* @param regionInfos
* regions to add
* @param env
* MasterProcedureEnv
* @param regionReplication
* the number of region replications
*/
private void
addRegionsToInMemoryStates(List<RegionInfo> regionInfos, MasterProcedureEnv
env, int regionReplication) {
Assi... | 3.26 |
hbase_RestoreSnapshotProcedure_deleteRegionsFromInMemoryStates_rdh | /**
* Delete regions from in-memory states
*
* @param regionInfos
* regions to delete
* @param env
* MasterProcedureEnv
* @param regionReplication
* the number of region replications
*/
private void deleteRegionsFromInMemoryStates(List<RegionInfo> regionInfos, MasterProcedureEnv env, int regionReplicati... | 3.26 |
hbase_RestoreSnapshotProcedure_getRestoreAcl_rdh | /**
* Exposed for Testing: HBASE-26462
*/
@RestrictedApi(explanation = "Should only be called in tests", link = "", allowedOnPath = ".*/src/test/.*")
public boolean getRestoreAcl() {
return restoreAcl;
} | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.