name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hbase_AsyncTable_fromRow_rdh | /**
* Specify a start row
*
* @param startKey
* start region selection with region containing this row, inclusive.
*/
default CoprocessorServiceBuilder<S, R> fromRow(byte[] startKey) {
return fromRow(startKey, true);
} | 3.26 |
hbase_AsyncTable_getScanner_rdh | /**
* Gets a scanner on the current table for the given family and qualifier.
*
* @param family
* The column family to scan.
* @param qualifier
* The column qualifier to scan.
* @return A scanner.
*/
default ResultScanner getScanner(byte[] family, byte[] qualifier) {
... | 3.26 |
hbase_AsyncTable_getRequestAttributes_rdh | /**
* Get the map of request attributes
*
* @return a map of request attributes supplied by the client
*/
default Map<String, byte[]> getRequestAttributes() {
throw new NotImplementedException("Add an implementation!");
}
/**
* Test for the existence of columns in the table, as specified by the Get.
* <p>
*... | 3.26 |
hbase_AsyncTable_getAll_rdh | /**
* A simple version for batch get. It will fail if there are any failures and you will get the
* whole result list at once if the operation is succeeded.
*
* @param gets
* The objects that specify what data to fetch and from which rows.
* @return A {@link CompletableFuture} that wrapper the result list.
*/
... | 3.26 |
hbase_AsyncTable_exists_rdh | /**
* Test for the existence of columns in the table, as specified by the Gets.
* <p>
* This will return a list of booleans. Each value will be true if the related Get matches one or
* more keys, false if not.
* <p>
* This is a server-side call so it prevents any data from being transferred to the client.
*
* @... | 3.26 |
hbase_AsyncTable_batchAll_rdh | /**
* A simple version of batch. It will fail if there are any failures and you will get the whole
* result list at once if the operation is succeeded.
*
* @param actions
* list of Get, Put, Delete, Increment, Append and RowMutations objects
* @return A list of the result for the actions. Wrapped by a {@link Co... | 3.26 |
hbase_AsyncTable_deleteAll_rdh | /**
* A simple version of batch delete. It will fail if there are any failures.
*
* @param deletes
* list of things to delete.
* @return A {@link CompletableFuture} that always returns null when complete normally.
*/
default CompletableFuture<Void> deleteAll(List<Delete> deletes) {
return allOf(delete(dele... | 3.26 |
hbase_AsyncTable_checkAndMutateAll_rdh | /**
* A simple version of batch checkAndMutate. It will fail if there are any failures.
*
* @param checkAndMutates
* The list of rows to apply.
* @return A {@link CompletableFuture} that wrapper the result list.
*/
default CompletableFuture<List<CheckAndMutateResult>> checkAndMutateAll(List<CheckAndMutate> chec... | 3.26 |
hbase_AsyncTable_ifEquals_rdh | /**
* Check for equality.
*
* @param value
* the expected value
*/
default CheckAndMutateBuilder ifEquals(byte[] value) {
return ifMatches(CompareOperator.EQUAL, value);
} | 3.26 |
hbase_AsyncTable_putAll_rdh | /**
* A simple version of batch put. It will fail if there are any failures.
*
* @param puts
* The list of mutations to apply.
* @return A {@link CompletableFuture} that always returns null when complete normally.
*/
default CompletableFuture<Void> putAll(List<Put> puts) {
return allOf(put(puts)).thenApply(... | 3.26 |
hbase_ZKSplitLog_isRescanNode_rdh | /**
* Checks if the given path represents a rescan node.
*
* @param zkw
* reference to the {@link ZKWatcher} which also contains configuration and constants
* @param path
* the absolute path, starts with '/'
* @return whether the path represents a rescan node
*/
public static boolean isRescanNode(ZKWatcher ... | 3.26 |
hbase_ZKSplitLog_getEncodedNodeName_rdh | /**
* Gets the full path node name for the log file being split. This method will url encode the
* filename.
*
* @param zkw
* zk reference
* @param filename
* log file name (only the basename)
*/
public static String getEncodedNodeName(ZKWatcher zkw, String filename) {
return ZNodePaths.joinZNode(zkw.ge... | 3.26 |
hbase_NamespaceTableAndRegionInfo_getTables_rdh | /**
* Gets the set of table names belonging to namespace.
*
* @return A set of table names.
*/
synchronized Set<TableName> getTables() {
return this.tableAndRegionInfo.keySet();
} | 3.26 |
hbase_NamespaceTableAndRegionInfo_getName_rdh | /**
* Gets the name of the namespace.
*
* @return name of the namespace.
*/
String getName() {
return f0;
} | 3.26 |
hbase_NamespaceTableAndRegionInfo_getRegionCount_rdh | /**
* Gets the total number of regions in namespace.
*
* @return the region count
*/
synchronized int getRegionCount() {
int regionCount = 0;
for (Entry<TableName, AtomicInteger> entry : this.tableAndRegionInfo.entrySet()) {
regionCount = regionCount + entry.getValue().get();
}
retur... | 3.26 |
hbase_RowFilter_toByteArray_rdh | /**
* Returns The filter serialized using pb
*/
@Override
public byte[] toByteArray() {
FilterProtos.RowFilter.Builder builder = FilterProtos.RowFilter.newBuilder(); builder.setCompareFilter(super.convert());
return builder.build().toByteArray();
} | 3.26 |
hbase_RowFilter_areSerializedFieldsEqual_rdh | /**
* Returns true if and only if the fields of the filter that are serialized are equal to the
* corresponding fields in other. Used for testing.
*/
@Override boolean areSerializedFieldsEqual(Filter o) {
if (o == this) {
return true;
}
if (!(o instanceof RowFilter)) {
... | 3.26 |
hbase_RowFilter_parseFrom_rdh | /**
* Parse a serialized representation of {@link RowFilter}
*
* @param pbBytes
* A pb serialized {@link RowFilter} instance
* @return An instance of {@link RowFilter} made from <code>bytes</code>
* @throws DeserializationException
* if an error occurred
* @see #toByteArray
*/
public static RowFilter parse... | 3.26 |
hbase_HBaseSaslRpcClient_readNextRpcPacket_rdh | // unwrap messages with Crypto AES
private void readNextRpcPacket() throws IOException {
LOG.debug("reading next wrapped RPC packet");
DataInputStream dis = new DataInputStream(in);int rpcLen = dis.readInt();
byte[] rpcBuf = new byte[rpcLen];
dis.readFully(rpcBuf);
// unwrap with Crypto AES
rpcBuf = cryptoAES.unwra... | 3.26 |
hbase_HBaseSaslRpcClient_m1_rdh | /**
* Get a SASL wrapped OutputStream. Can be called only after saslConnect() has been called.
*
* @return a SASL wrapped OutputStream
*/
public OutputStream m1() throws IOException {
if (!saslClient.isComplete()) {
throw new IOException("Sasl authentication exchange hasn't completed yet");
}
// If Crypto AES is e... | 3.26 |
hbase_HBaseSaslRpcClient_saslConnect_rdh | /**
* Do client side SASL authentication with server via the given InputStream and OutputStream
*
* @param inS
* InputStream to use
* @param outS
* OutputStream to use
* @return true if connection is set up, or false if needs to switch to simple Auth.
*/
public boolea... | 3.26 |
hbase_HBaseSaslRpcClient_getInputStream_rdh | /**
* Get a SASL wrapped InputStream. Can be called only after saslConnect() has been called.
*
* @return a SASL wrapped InputStream
*/
public InputStream getInputStream() throws IOException {
if (!saslClient.isComplete()) {
throw new IOException("Sasl authentication exchange hasn't completed yet");
}
// If Crypto ... | 3.26 |
hbase_DirectMemoryUtils_getDirectMemorySize_rdh | /**
* Returns the direct memory limit of the current progress
*/
public static long getDirectMemorySize() {return f1;
} | 3.26 |
hbase_DirectMemoryUtils_getDirectMemoryUsage_rdh | /**
* Returns the current amount of direct memory used.
*/public static long getDirectMemoryUsage() {
if (((f0 == null) || (NIO_DIRECT_POOL == null)) || (!HAS_MEMORY_USED_ATTRIBUTE))
return 0;
try {
Long value = ((Long) (f0.getAttribute(NIO_DIRECT_POOL, MEMORY_USED)));
return value =... | 3.26 |
hbase_DirectMemoryUtils_getNettyDirectMemoryUsage_rdh | /**
* Returns the current amount of direct memory used by netty module.
*/
public static long getNettyDirectMemoryUsage() {
ByteBufAllocatorMetric metric = ((ByteBufAllocatorMetricProvider) (PooledByteBufAllocator.DEFAULT)).metric();
return metric.usedDirectMemory();
} | 3.26 |
hbase_RequestConverter_buildGetOnlineRegionRequest_rdh | /**
* Create a protocol buffer GetOnlineRegionRequest
*
* @return a protocol buffer GetOnlineRegionRequest
*/
public static GetOnlineRegionRequest buildGetOnlineRegionRequest() {
return GetOnlineRegionRequest.newBuilder().build();} | 3.26 |
hbase_RequestConverter_buildBulkLoadHFileRequest_rdh | /**
* Create a protocol buffer bulk load request
*
* @return a bulk load request
*/
public static BulkLoadHFileRequest buildBulkLoadHFileRequest(final List<Pair<byte[], String>> familyPaths, final byte[] regionName, boolean
assignSeqNum, final Token<?> userToken, final String
bulkToken, boolean copyFiles, List<Stri... | 3.26 |
hbase_RequestConverter_buildModifyNamespaceRequest_rdh | /**
* Creates a protocol buffer ModifyNamespaceRequest
*
* @return a ModifyNamespaceRequest
*/
public static ModifyNamespaceRequest buildModifyNamespaceRequest(final NamespaceDescriptor descriptor) {
ModifyNamespaceRequest.Builder builder = ModifyNamespaceRequest.newBuilder();
builder.setNamespaceDescriptor(Protobu... | 3.26 |
hbase_RequestConverter_buildSetSnapshotCleanupRequest_rdh | /**
* Creates SetSnapshotCleanupRequest for turning on/off auto snapshot cleanup
*
* @param enabled
* 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 a SetSnaps... | 3.26 |
hbase_RequestConverter_buildNoDataRegionActions_rdh | /**
* Create a protocol buffer multirequest with NO data for a list of actions (data is carried
* otherwise than via protobuf). This means it just notes attributes, whether to write the WAL,
* etc., and the presence in protobuf serves as place holder for the data which is coming along
* otherwise. Note that Get is ... | 3.26 |
hbase_RequestConverter_buildSetBalancerRunningRequest_rdh | /**
* Creates a protocol buffer SetBalancerRunningRequest
*
* @return a SetBalancerRunningRequest
*/
public static SetBalancerRunningRequest buildSetBalancerRunningRequest(boolean on, boolean synchronous) {
return SetBalancerRunningRequest.newBuilder().setOn(on).setSynchronous(synchronous).build();
} | 3.26 |
hbase_RequestConverter_buildStopServerRequest_rdh | /**
* Create a new StopServerRequest
*
* @param reason
* the reason to stop the server
* @return a StopServerRequest
*/public static StopServerRequest buildStopServerRequest(final String reason) {
StopServerRequest.Builder builder = StopServerRequest.newBuilder();
builder.setReason(reason);
return builder.buil... | 3.26 |
hbase_RequestConverter_buildAssignRegionRequest_rdh | /**
* Create a protocol buffer AssignRegionRequest
*
* @return an AssignRegionRequest
*/
public static AssignRegionRequest buildAssignRegionRequest(final byte[] regionName) {
AssignRegionRequest.Builder builder = AssignRegionRequest.newBuilder();
builder.setRegion(buildRegionSpecifier(RegionSpecifierType.REGION_NAM... | 3.26 |
hbase_RequestConverter_buildDeleteColumnRequest_rdh | /**
* Create a protocol buffer DeleteColumnRequest
*
* @return a DeleteColumnRequest
*/
public static DeleteColumnRequest buildDeleteColumnRequest(final TableName tableName, final byte[] columnName, final long nonceGroup, final
long nonce) {
DeleteColumnRequest.Builder builder
= DeleteColumnRequest.newBuilder();
... | 3.26 |
hbase_RequestConverter_buildGetQuotaStatesRequest_rdh | /**
* Returns a {@link GetQuotaStatesRequest} object.
*/
public static GetQuotaStatesRequest buildGetQuotaStatesRequest() {
return GetQuotaStatesRequest.getDefaultInstance();
} | 3.26 |
hbase_RequestConverter_buildWarmupRegionRequest_rdh | /**
* Create a WarmupRegionRequest for a given region name
*
* @param regionInfo
* Region we are warming up
*/
public static WarmupRegionRequest buildWarmupRegionRequest(final RegionInfo regionInfo) {
WarmupRegionRequest.Builder builder = WarmupRegionRequest.newBuilder();
builder.setRegionInfo(ProtobufUtil.toRe... | 3.26 |
hbase_RequestConverter_buildSetTableStateInMetaRequest_rdh | /**
* Creates a protocol buffer SetTableStateInMetaRequest
*
* @param state
* table state to update in Meta
* @return a SetTableStateInMetaRequest
*/
public static SetTableStateInMetaRequest buildSetTableStateInMetaRequest(final TableState state) {
return SetTableStateInMetaRequest.newBuilder().setTableState(... | 3.26 |
hbase_RequestConverter_buildIsSplitOrMergeEnabledRequest_rdh | /**
* Creates a protocol buffer IsSplitOrMergeEnabledRequest
*
* @param switchType
* see {@link org.apache.hadoop.hbase.client.MasterSwitchType}
* @return a IsSplitOrMergeEnabledRequest
*/
public static IsSplitOrMergeEnabledRequest buildIsSplitOrMergeEnabledRequest(MasterSwitchType switchType) {
IsSplitOrMergeE... | 3.26 |
hbase_RequestConverter_buildTruncateTableRequest_rdh | /**
* Creates a protocol buffer TruncateTableRequest
*
* @param tableName
* name of table to truncate
* @param preserveSplits
* True if the splits should be preserved
* @return a TruncateTableRequest
*/public static TruncateTableRequest buildTruncateTableRequest(final TableName tableName, final boolean pres... | 3.26 |
hbase_RequestConverter_buildCatalogScanRequest_rdh | /**
* Creates a request for running a catalog scan
*
* @return A {@link RunCatalogScanRequest}
*/
public static RunCatalogScanRequest buildCatalogScanRequest() {
return RunCatalogScanRequest.getDefaultInstance();
} | 3.26 |
hbase_RequestConverter_buildCompactRegionRequest_rdh | /**
* Create a CompactRegionRequest for a given region name
*
* @param regionName
* the name of the region to get info
* @param major
* indicator if it is a major compaction
* @return a CompactRegionRequest
*/
public static CompactRegionRequest buildCompactRegionRequest(byte[] regionName,
boolean major, by... | 3.26 |
hbase_RequestConverter_buildMultiRequest_rdh | /**
* Create a protocol buffer MultiRequest for row mutations
*
* @return a multi request
*/
public static MultiRequest buildMultiRequest(final byte[] regionName, final RowMutations rowMutations, long nonceGroup, long nonce) throws IOException {
return buildMultiRequest(regionName, rowMutations, null, nonceGroup, ... | 3.26 |
hbase_RequestConverter_m2_rdh | /**
* Creates a request for querying the master whether the cleaner chore is enabled
*
* @return A {@link IsCleanerChoreEnabledRequest}
*/
public static IsCleanerChoreEnabledRequest m2() {
return IsCleanerChoreEnabledRequest.getDefaultInstance();} | 3.26 |
hbase_RequestConverter_toAssignRegionsRequest_rdh | // HBCK2
public static AssignsRequest toAssignRegionsRequest(List<String> encodedRegionNames, boolean override) {
MasterProtos.AssignsRequest.Builder b = MasterProtos.AssignsRequest.newBuilder();
return b.addAllRegion(toEncodedRegionNameRegionSpecifiers(encodedRegionNames)).setOverride(override).build();
} | 3.26 |
hbase_RequestConverter_buildIsCatalogJanitorEnabledRequest_rdh | /**
* Creates a request for querying the master whether the catalog janitor is enabled
*
* @return A {@link IsCatalogJanitorEnabledRequest}
*/
public static IsCatalogJanitorEnabledRequest buildIsCatalogJanitorEnabledRequest() {
return IsCatalogJanitorEnabledRequest.getDefaultInstance();
} | 3.26 |
hbase_RequestConverter_buildClearSlowLogResponseRequest_rdh | /**
* Create a protocol buffer {@link ClearSlowLogResponseRequest}
*
* @return a protocol buffer ClearSlowLogResponseRequest
*/
public static ClearSlowLogResponseRequest buildClearSlowLogResponseRequest() {
return ClearSlowLogResponseRequest.newBuilder().build();
} | 3.26 |
hbase_RequestConverter_buildDisableTableRequest_rdh | /**
* Creates a protocol buffer DisableTableRequest
*
* @return a DisableTableRequest
*/
public static DisableTableRequest buildDisableTableRequest(final TableName tableName, final long nonceGroup, final long nonce) {
DisableTableRequest.Builder builder = DisableTableRequest.newBuilder();
builder.setTableName(Proto... | 3.26 |
hbase_RequestConverter_buildAddColumnRequest_rdh | /**
* Create a protocol buffer AddColumnRequest
*
* @return an AddColumnRequest
*/
public static AddColumnRequest
buildAddColumnRequest(final TableName tableName, final ColumnFamilyDescriptor column, final long nonceGroup, final long nonce) {
AddColumnRequest.Builder builder
= AddColumnRequest.newBuilder();
builde... | 3.26 |
hbase_RequestConverter_buildSetNormalizerRunningRequest_rdh | /**
* Creates a protocol buffer SetNormalizerRunningRequest
*
* @return a SetNormalizerRunningRequest
*/
public static SetNormalizerRunningRequest buildSetNormalizerRunningRequest(boolean on) {
return SetNormalizerRunningRequest.newBuilder().setOn(on).build();
} | 3.26 |
hbase_RequestConverter_buildIsSnapshotCleanupEnabledRequest_rdh | /**
* Creates IsSnapshotCleanupEnabledRequest to determine if auto snapshot cleanup based on TTL
* expiration is turned on
*/
public static IsSnapshotCleanupEnabledRequest buildIsSnapshotCleanupEnabledRequest() {return IsSnapshotCleanupEnabledRequest.newBuilder().build();
} | 3.26 |
hbase_RequestConverter_buildDeleteTableRequest_rdh | /**
* Creates a protocol buffer DeleteTableRequest
*
* @return a DeleteTableRequest
*/
public static DeleteTableRequest buildDeleteTableRequest(final TableName tableName, final long
nonceGroup, final long nonce) {
DeleteTableRequest.Builder builder = DeleteTableRequest.newBuilder(); builder.setTableName(ProtobufUti... | 3.26 |
hbase_RequestConverter_buildIsBalancerEnabledRequest_rdh | /**
* Creates a protocol buffer IsBalancerEnabledRequest
*
* @return a IsBalancerEnabledRequest
*/
public static IsBalancerEnabledRequest buildIsBalancerEnabledRequest() {
return IsBalancerEnabledRequest.newBuilder().build();
} | 3.26 |
hbase_RequestConverter_buildUnassignRegionRequest_rdh | /**
* Creates a protocol buffer UnassignRegionRequest
*
* @return an UnassignRegionRequest
*/
public static UnassignRegionRequest buildUnassignRegionRequest(final byte[] regionName) {
UnassignRegionRequest.Builder builder = UnassignRegionRequest.newBuilder();
builder.setRegion(buildRegionSpecifier(RegionSpecifierTy... | 3.26 |
hbase_RequestConverter_buildSetRegionStateInMetaRequest_rdh | /**
* Creates a protocol buffer SetRegionStateInMetaRequest
*
* @param nameOrEncodedName2State
* list of regions states to update in Meta
* @return a SetRegionStateInMetaRequest
*/
public static SetRegionStateInMetaRequest buildSetRegionStateInMetaRequest(Map<String, RegionState.State> nameOrEncodedName2State) ... | 3.26 |
hbase_RequestConverter_buildGetRegionInfoRequest_rdh | /**
* Create a protocol buffer GetRegionInfoRequest,
*
* @param regionName
* the name of the region to get info
* @param includeCompactionState
* indicate if the compaction state is requested
* @param includeBestSplitRow
* indicate if the bestSplitRow is requested
* @return protocol buffer GetRegionInfoR... | 3.26 |
hbase_RequestConverter_buildMoveRegionRequest_rdh | /**
* Create a protocol buffer MoveRegionRequest
*
* @return A MoveRegionRequest
*/
public static MoveRegionRequest buildMoveRegionRequest(byte[] encodedRegionName, ServerName destServerName) {MoveRegionRequest.Builder builder = MoveRegionRequest.newBuilder();
builder.setRegion(buildRegionSpecifier(RegionSpecifier... | 3.26 |
hbase_RequestConverter_buildClearRegionBlockCacheRequest_rdh | /**
* Creates a protocol buffer ClearRegionBlockCacheRequest
*
* @return a ClearRegionBlockCacheRequest
*/
public static ClearRegionBlockCacheRequest buildClearRegionBlockCacheRequest(List<RegionInfo> hris) {
ClearRegionBlockCacheRequest.Builder builder = ClearRegionBlockCacheRequest.newBuilder();
hris.forEach(hri ... | 3.26 |
hbase_RequestConverter_buildEnableTableRequest_rdh | /**
* Creates a protocol buffer EnableTableRequest
*
* @return an EnableTableRequest
*/
public static EnableTableRequest buildEnableTableRequest(final TableName tableName, final long nonceGroup, final long nonce) {
EnableTableRequest.Builder v77 = EnableTableRequest.newBuilder();
v77.setTableName(ProtobufUtil.toPro... | 3.26 |
hbase_RequestConverter_buildGetSpaceQuotaSnapshotsRequest_rdh | /**
* Returns a {@link GetSpaceQuotaSnapshotsRequest} object.
*/
public static GetSpaceQuotaSnapshotsRequest buildGetSpaceQuotaSnapshotsRequest() {
return GetSpaceQuotaSnapshotsRequest.getDefaultInstance();
} | 3.26 |
hbase_RequestConverter_buildOpenRegionRequest_rdh | /**
* Create a protocol buffer OpenRegionRequest for a given region
*
* @param server
* the serverName for the RPC
* @param region
* the region to open
* @param favoredNodes
* a list of favored nodes
* @return a protocol buffer OpenRegionRequest
*/
public static OpenRegionRequest buildOpenRegionRequest(... | 3.26 |
hbase_RequestConverter_buildRunCleanerChoreRequest_rdh | /**
* Creates a request for running cleaner chore
*
* @return A {@link RunCleanerChoreRequest}
*/
public static RunCleanerChoreRequest buildRunCleanerChoreRequest() {
return RunCleanerChoreRequest.getDefaultInstance();
} | 3.26 |
hbase_RequestConverter_m1_rdh | /**
* Create a new GetServerInfoRequest
*
* @return a GetServerInfoRequest
*/
public static GetServerInfoRequest m1() {
return GetServerInfoRequest.getDefaultInstance();
} | 3.26 |
hbase_RequestConverter_buildIsNormalizerEnabledRequest_rdh | /**
* Creates a protocol buffer IsNormalizerEnabledRequest
*
* @return a IsNormalizerEnabledRequest
*/
public static IsNormalizerEnabledRequest buildIsNormalizerEnabledRequest() {
return IsNormalizerEnabledRequest.newBuilder().build();
} | 3.26 |
hbase_RequestConverter_buildNormalizeRequest_rdh | /**
* Creates a protocol buffer NormalizeRequest
*
* @return a NormalizeRequest
*/
public static NormalizeRequest buildNormalizeRequest(NormalizeTableFilterParams ntfp) {
final NormalizeRequest.Builder builder = NormalizeRequest.newBuilder();
if (ntfp.getTableNames() != null) {
builder.addAllTableNames(ProtobufU... | 3.26 |
hbase_RequestConverter_buildMutateRequest_rdh | /**
* Create a protocol buffer MutateRequest for a delete
*
* @return a mutate request
*/
public static MutateRequest buildMutateRequest(final byte[] regionName, final Delete delete) throws IOException {
MutateRequest.Builder builder = MutateRequest.newBuilder();
RegionSpecifier region = buildRegionSpecifier(Region... | 3.26 |
hbase_RequestConverter_buildIsMasterRunningRequest_rdh | /**
* Creates a protocol buffer IsMasterRunningRequest
*
* @return a IsMasterRunningRequest
*/
public static IsMasterRunningRequest buildIsMasterRunningRequest() {
return IsMasterRunningRequest.newBuilder().build();
} | 3.26 |
hbase_RequestConverter_buildGetRegionLoadRequest_rdh | /**
* Create a protocol buffer GetRegionLoadRequest for all regions/regions of a table.
*
* @param tableName
* the table for which regionLoad should be obtained from RS
* @return a protocol buffer GetRegionLoadRequest
*/
public static GetRegionLoadRequest buildGetRegionLoadRequest(final TableName tableName) {
G... | 3.26 |
hbase_RequestConverter_buildRegionSpecifier_rdh | // End utilities for Admin
/**
* Convert a byte array to a protocol buffer RegionSpecifier
*
* @param type
* the region specifier type
* @param value
* the region specifier byte array value
* @return a protocol buffer RegionSpecifier
*/
public static RegionSpecifier buildRegionSpecifier(final RegionSpecifie... | 3.26 |
hbase_RequestConverter_buildSlowLogResponseRequest_rdh | /**
* Build RPC request payload for getLogEntries
*
* @param filterParams
* map of filter params
* @param limit
* limit for no of records that server returns
* @param logType
* type of the log records
* @return request payload {@link HBaseProtos.LogRequest}
*/
public static LogRequest buildSlowLogRespon... | 3.26 |
hbase_RequestConverter_buildGetNamespaceDescriptorRequest_rdh | /**
* Creates a protocol buffer GetNamespaceDescriptorRequest
*
* @return a GetNamespaceDescriptorRequest
*/public static GetNamespaceDescriptorRequest buildGetNamespaceDescriptorRequest(final String name) {GetNamespaceDescriptorRequest.Builder builder = GetNamespaceDescriptorRequest.newBuilder();
builder.setNamesp... | 3.26 |
hbase_RequestConverter_buildRegionOpenInfo_rdh | /**
* Create a RegionOpenInfo based on given region info and version of offline node
*/
public static RegionOpenInfo buildRegionOpenInfo(RegionInfo region, List<ServerName> favoredNodes, long openProcId) {
RegionOpenInfo.Builder builder = RegionOpenInfo.newBuilder();builder.setRegion(ProtobufUtil.toRegionInfo(region)... | 3.26 |
hbase_RequestConverter_buildNoDataRegionAction_rdh | /**
* Returns whether or not the rowMutations has a Increment or Append
*/
private static boolean buildNoDataRegionAction(final RowMutations rowMutations, final List<CellScannable> cells,
long nonce, final RegionAction.Builder regionActionBuilder, final ClientProtos.Action.Builder actionBuilder, final MutationProto... | 3.26 |
hbase_RequestConverter_buildSetSplitOrMergeEnabledRequest_rdh | /**
* Creates a protocol buffer SetSplitOrMergeEnabledRequest
*
* @param enabled
* switch is enabled or not
* @param synchronous
* set switch sync?
* @param switchTypes
* see {@link org.apache.hadoop.hbase.client.MasterSwitchType}, it is a list.
* @return a SetSplitOrMergeEnabledRequest
*/
public static... | 3.26 |
hbase_RequestConverter_buildSetCleanerChoreRunningRequest_rdh | /**
* Creates a request for enabling/disabling the cleaner chore
*
* @return A {@link SetCleanerChoreRunningRequest}
*/
public static SetCleanerChoreRunningRequest buildSetCleanerChoreRunningRequest(boolean on) {
return SetCleanerChoreRunningRequest.newBuilder().setOn(on).build();
} | 3.26 |
hbase_RequestConverter_buildGetTableDescriptorsRequest_rdh | /**
* Creates a protocol buffer GetTableDescriptorsRequest for a single table
*
* @param tableName
* the table name
* @return a GetTableDescriptorsRequest
*/
public static GetTableDescriptorsRequest buildGetTableDescriptorsRequest(final TableName tableName) {
return GetTableDescriptorsRequest.newBuilder().addTa... | 3.26 |
hbase_RequestConverter_buildCreateNamespaceRequest_rdh | /**
* Creates a protocol buffer CreateNamespaceRequest
*
* @return a CreateNamespaceRequest
*/
public static CreateNamespaceRequest buildCreateNamespaceRequest(final NamespaceDescriptor descriptor) {
CreateNamespaceRequest.Builder builder = CreateNamespaceRequest.newBuilder();
builder.setNamespaceDescriptor(Protobu... | 3.26 |
hbase_RequestConverter_buildModifyColumnRequest_rdh | /**
* Create a protocol buffer ModifyColumnRequest
*
* @return an ModifyColumnRequest
*/
public static ModifyColumnRequest buildModifyColumnRequest(final TableName tableName, final ColumnFamilyDescriptor column, final long nonceGroup, final long nonce) {ModifyColumnRequest.Builder builder = ModifyColumnRequest.new... | 3.26 |
hbase_RequestConverter_buildCreateTableRequest_rdh | /**
* Creates a protocol buffer CreateTableRequest
*
* @return a CreateTableRequest
*/
public static CreateTableRequest buildCreateTableRequest(final TableDescriptor tableDescriptor, final byte[][] splitKeys, final long nonceGroup, final long nonce) {
CreateTableRequest.Builder builder = CreateTableRequest.newBuil... | 3.26 |
hbase_RequestConverter_buildDeleteNamespaceRequest_rdh | /**
* Creates a protocol buffer DeleteNamespaceRequest
*
* @return a DeleteNamespaceRequest
*/
public static DeleteNamespaceRequest buildDeleteNamespaceRequest(final String name) {
DeleteNamespaceRequest.Builder builder = DeleteNamespaceRequest.newBuilder();
builder.setNamespaceName(name);
return builder.build(... | 3.26 |
hbase_RequestConverter_buildFlushRegionRequest_rdh | /**
* Create a protocol buffer FlushRegionRequest for a given region name
*
* @param regionName
* the name of the region to get info
* @param columnFamily
* column family within a region
* @return a protocol buffer FlushRegionRequest
*/
public static FlushRegionRequest buildFlushRegionRequest(final byte[] r... | 3.26 |
hbase_RequestConverter_buildGetLastFlushedSequenceIdRequest_rdh | /**
* Creates a request for querying the master the last flushed sequence Id for a region
*
* @return A {@link GetLastFlushedSequenceIdRequest}
*/
public static GetLastFlushedSequenceIdRequest buildGetLastFlushedSequenceIdRequest(byte[] regionName) {
return GetLastFlushedSequenceIdRequest.newBuilder().setRegionName... | 3.26 |
hbase_RequestConverter_buildUpdateFavoredNodesRequest_rdh | /**
* Create a protocol buffer UpdateFavoredNodesRequest to update a list of favorednode mappings
*
* @param updateRegionInfos
* a list of favored node mappings
* @return a protocol buffer UpdateFavoredNodesRequest
*/
public static UpdateFavoredNodesRequest buildUpdateFavoredNodesRequest(final List<Pair<RegionI... | 3.26 |
hbase_RequestConverter_buildEnableCatalogJanitorRequest_rdh | /**
* Creates a request for enabling/disabling the catalog janitor
*
* @return A {@link EnableCatalogJanitorRequest}
*/
public static EnableCatalogJanitorRequest buildEnableCatalogJanitorRequest(boolean enable) {
return EnableCatalogJanitorRequest.newBuilder().setEnable(enable).build();
} | 3.26 |
hbase_RequestConverter_buildGetTableNamesRequest_rdh | /**
* Creates a protocol buffer GetTableNamesRequest
*
* @param pattern
* The compiled regular expression to match against
* @param includeSysTables
* False to match only against userspace tables
* @return a GetTableNamesRequest
*/
public static GetTableNamesRequest buildGetTableNamesRequest(final Pattern ... | 3.26 |
hbase_RequestConverter_buildScanRequest_rdh | /**
* Create a protocol buffer ScanRequest for a scanner id
*
* @return a scan request
*/
public static ScanRequest buildScanRequest(long scannerId, int numberOfRows, boolean closeScanner, long nextCallSeq, boolean trackMetrics, boolean renew, int limitOfRows) {
ScanRequest.Builder builder = ScanRequest.newBuilder(... | 3.26 |
hbase_RequestConverter_buildGetRequest_rdh | // Start utilities for Client
/**
* Create a protocol buffer GetRequest for a client Get
*
* @param regionName
* the name of the region to get
* @param get
* the client Get
* @return a protocol buffer GetRequest
*/
public static GetRequest buildGetRequest(final byte[] regionName, final Get get) throws IOEx... | 3.26 |
hbase_MemorySizeUtil_getGlobalMemStoreSize_rdh | /**
* Returns Pair of global memstore size and memory type(ie. on heap or off heap).
*/
public static Pair<Long, MemoryType> getGlobalMemStoreSize(Configuration conf) {
long offheapMSGlobal = conf.getLong(OFFHEAP_MEMSTORE_SIZE_KEY, 0);// Size in MBs
if (offheapMSGlobal > 0) {
// Off heap memstore ... | 3.26 |
hbase_MemorySizeUtil_getOnheapGlobalMemStoreSize_rdh | /**
* Returns the onheap global memstore limit based on the config
* 'hbase.regionserver.global.memstore.size'.
*
* @return the onheap global memstore limt
*/
public static long getOnheapGlobalMemStoreSize(Configuration conf) {
long max = -1L;
final MemoryUsage usage = safeGetHeapMemoryUsage();
if (usa... | 3.26 |
hbase_MemorySizeUtil_getBlockCacheHeapPercent_rdh | /**
* Retrieve configured size for on heap block cache as percentage of total heap.
*/
public static float getBlockCacheHeapPercent(final Configuration conf) {
// L1 block cache is always on heap
float l1CachePercent = conf.getFloat(HConstants.HFILE_BLOCK_CACHE_SIZE_KEY, HConstants.HFILE_BLOCK_CACHE_SIZE_DEFA... | 3.26 |
hbase_MemorySizeUtil_getGlobalMemStoreHeapLowerMark_rdh | /**
* Retrieve configured size for global memstore lower water mark as fraction of global memstore
* size.
*/
public static float getGlobalMemStoreHeapLowerMark(final Configuration conf, boolean honorOldConfig) {
String lowMarkPercentStr = conf.get(MEMSTORE_SIZE_LOWER_LIMIT_KEY);
if (lowMarkPercentStr != nul... | 3.26 |
hbase_MemorySizeUtil_checkForClusterFreeHeapMemoryLimit_rdh | /**
* Checks whether we have enough heap memory left out after portion for Memstore and Block cache.
* We need atleast 20% of heap left out for other RS functions.
*/
public static void checkForClusterFreeHeapMemoryLimit(Configuration conf) {
if (conf.get(MEMSTORE_SIZE_OLD_KEY) != null) {
LOG.warn((MEMST... | 3.26 |
hbase_HbckTableInfo_getTableDescriptor_rdh | /**
* Returns descriptor common to all regions. null if are none or multiple!
*/
TableDescriptor getTableDescriptor() {
if (htds.size() == 1) {
return ((TableDescriptor) (htds.toArray()[0]));
} else {
LOG.error((("None/Multiple table descriptors found for table '" + tableName) + "' regions: "... | 3.26 |
hbase_HbckTableInfo_sidelineBigOverlaps_rdh | /**
* Sideline some regions in a big overlap group so that it will have fewer regions, and it is
* easier to merge them later on.
*
* @param bigOverlap
* the overlapped group with regions more than maxMerge
*/
void sidelineBigOverlaps(Collection<HbckRegionInfo> bigOverlap) throws IOException {
int overlapsToSid... | 3.26 |
hbase_HbckTableInfo_handleOverlapGroup_rdh | /**
* This takes set of overlapping regions and merges them into a single region. This covers cases
* like degenerate regions, shared start key, general overlaps, duplicate ranges, and partial
* overlapping regions. Cases: - Clean regions that overlap - Only .oldlogs regions (can't find
* start/stop range, or figur... | 3.26 |
hbase_HbckTableInfo_handleHoleInRegionChain_rdh | /**
* There is a hole in the hdfs regions that violates the table integrity rules. Create a new
* empty region that patches the hole.
*/
@Override
public void handleHoleInRegionChain(byte[] holeStartKey, byte[] holeStopKey) throws IOException {
errors.reportError(ERROR_CODE.HOLE_IN_REGION_CHAIN, (((("There is a ho... | 3.26 |
hbase_HbckTableInfo_handleRegionStartKeyNotEmpty_rdh | /**
* This is a special case hole -- when the first region of a table is missing from META, HBase
* doesn't acknowledge the existance of the table.
*/@Override
public void handleRegionStartKeyNotEmpty(HbckRegionInfo next) throws IOException {
errors.reportError(ERROR_CODE.FIRST_REGION_STARTKEY_NOT_EMPTY, "First regi... | 3.26 |
hbase_HbckTableInfo_dump_rdh | /**
* This dumps data in a visually reasonable way for visual debugging
*/
private void dump(SortedSet<byte[]> splits, Multimap<byte[], HbckRegionInfo> regions) {
// we display this way because the last end key should be displayed as well.
StringBuilder sb = new StringBuilder();
for (byte[] k : splits) {
sb.setLength... | 3.26 |
hbase_HbckTableInfo_checkRegionChain_rdh | /**
* Check the region chain (from META) of this table. We are looking for holes, overlaps, and
* cycles.
*
* @return false if there are errors
*/
public boolean checkRegionChain(TableIntegrityErrorHandler handler) throws IOException {
// When table is disabled no need to check for the region chain. Some of the re... | 3.26 |
hbase_PrettyPrinter_humanReadableSizeToBytes_rdh | /**
* Convert a human readable size to bytes. Examples of the human readable size are: 50 GB 20 MB 1
* KB , 25000 B etc. The units of size specified can be in uppercase as well as lowercase. Also,
* if a single number is specified without any time unit, it is assumed to be in bytes.
*
* @param humanReadableSize
*... | 3.26 |
hbase_PrettyPrinter_humanReadableByte_rdh | /**
* Convert a long size to a human readable string. Example: 10763632640 -> 10763632640 B (10GB
* 25MB)
*
* @param size
* the size in bytes
* @return human readable string
*/
private static String humanReadableByte(final long size) {
StringBuilder sb = new StringBuilder();
long tb;
long gb;
... | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.