name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hbase_EncodedDataBlock_getEncodedData_rdh | /**
* Returns encoded data with header
*/
private byte[] getEncodedData()
{
if (cachedEncodedData != null) {
return cachedEncodedData;
}
cachedEncodedData = encodeData();
return cachedEncodedData;
} | 3.26 |
hbase_EncodedDataBlock_getSize_rdh | /**
* Find the size of minimal buffer that could store compressed data.
*
* @return Size in bytes of compressed data.
*/
public int getSize() {
return getEncodedData().length;
} | 3.26 |
hbase_ReplicationProtobufUtil_buildReplicateWALEntryRequest_rdh | /**
* Create a new ReplicateWALEntryRequest from a list of WAL entries
*
* @param entries
* the WAL entries to be replicated
* @param encodedRegionName
* alternative region name to use if not null
* @param replicationClusterId
* Id which will uniquely identify source cluster FS client
* configurations ... | 3.26 |
hbase_ReplicationProtobufUtil_getCellScanner_rdh | /**
* Returns <code>cells</code> packaged as a CellScanner
*/
static CellScanner getCellScanner(final List<List<? extends Cell>> cells, final int size) {
return new SizedCellScanner() {
private final Iterator<List<? extends Cell>> entries = cells.iterator();
private Iterator<? extends Cell>
... | 3.26 |
hbase_ReplicationProtobufUtil_replicateWALEntry_rdh | /**
* A helper to replicate a list of WAL entries using region server admin
*
* @param admin
* the region server admin
* @param entries
* Array of WAL entries to be replicated
* @param replicationClusterId
* Id which will uniquely identify source cluster FS client
* configurations in the replication co... | 3.26 |
hbase_JobUtil_getStagingDir_rdh | /**
* Initializes the staging directory and returns the path.
*
* @param conf
* system configuration
* @return staging directory path
* @throws IOException
* if the ownership on the staging directory is not as expected
* @throws InterruptedException
* if the thread getting the staging directory is interr... | 3.26 |
hbase_JobUtil_getQualifiedStagingDir_rdh | /**
* Initializes the staging directory and returns the qualified path.
*
* @param conf
* conf system configuration
* @return qualified staging directory path
* @throws IOException
* if the ownership on the staging directory is not as expected
* @throws InterruptedExcepti... | 3.26 |
hbase_ConfigurationUtil_setKeyValues_rdh | /**
* Store a collection of Map.Entry's in conf, with each entry separated by ',' and key values
* delimited by delimiter.
*
* @param conf
* configuration to store the collection in
* @param key
* overall key to store keyValues under
* @param keyValues
* kvps to be stored under key in conf
* @param deli... | 3.26 |
hbase_ConfigurationUtil_getKeyValues_rdh | /**
* Retrieve a list of key value pairs from configuration, stored under the provided key
*
* @param conf
* configuration to retrieve kvps from
* @param key
* key under which the key values are stored
* @param delimiter
* character used to separate each kvp
* @return the list of kvps stored under key in... | 3.26 |
hbase_ConfigurationUtil_m0_rdh | /**
* Store a collection of Map.Entry's in conf, with each entry separated by ',' and key values
* delimited by {@link #KVP_DELIMITER}
*
* @param conf
* configuration to store the collection in
* @param key
* overall key to store keyValues under
* @param keyValues
* kvps to be stored under key in conf
*... | 3.26 |
hbase_GsonUtil_createGson_rdh | /**
* Create a builder which is used to create a Gson instance.
* <p/>
* Will set some common configs for the builder.
*/
public static GsonBuilder createGson() {
return new GsonBuilder().setLongSerializationPolicy(LongSerializationPolicy.STRING).registerTypeAdapter(LongAdder.class, new TypeAdapter<LongAdder>(... | 3.26 |
hbase_ThriftHttpServlet_doKerberosAuth_rdh | /**
* Do the GSS-API kerberos authentication. We already have a logged in subject in the form of
* httpUGI, which GSS-API will extract information from.
*/
private RemoteUserIdentity doKerberosAuth(HttpServletRequest request) throws HttpAuthenticationException {
HttpKerberosServerAction action = new HttpKerberosServ... | 3.26 |
hbase_ThriftHttpServlet_getAuthHeader_rdh | /**
* Returns the base64 encoded auth header payload
*
* @throws HttpAuthenticationException
* if a remote or network exception occurs
*/
private String getAuthHeader(HttpServletRequest request) throws HttpAuthenticationException {
String authHeader =
request.getHeader(HttpHeaders.AUTHORIZATION);
// ... | 3.26 |
hbase_RegionServerFlushTableProcedureManager_buildSubprocedure_rdh | /**
* If in a running state, creates the specified subprocedure to flush table regions. Because this
* gets the local list of regions to flush and not the set the master had, there is a possibility
* of a race where regions may be missed.
*
* @return Subprocedure to submit to the ProcedureMember.
*/
public Subpro... | 3.26 |
hbase_RegionServerFlushTableProcedureManager_stop_rdh | /**
* Gracefully shutdown the thread pool. An ongoing HRegion.flush() should not be interrupted
* (see HBASE-13877)
*/
void stop() {
if (this.stopped)
return;
this.stopped = true;
this.executor.shutdown();
} | 3.26 |
hbase_RegionServerFlushTableProcedureManager_submitTask_rdh | /**
* Submit a task to the pool. NOTE: all must be submitted before you can safely
* {@link #waitForOutstandingTasks()}.
*/
void submitTask(final Callable<Void> task) {
Future<Void> f =
this.taskPool.submit(task);
f0.add(f);
} | 3.26 |
hbase_RegionServerFlushTableProcedureManager_getRegionsToFlush_rdh | /**
* Get the list of regions to flush for the table on this server It is possible that if a region
* moves somewhere between the calls we'll miss the region.
*
* @return the list of online regions. Empty list is returned if no regions.
*/
private List<HRegion> getRegionsToFlush(String table) throws IOException {
... | 3.26 |
hbase_RegionServerFlushTableProcedureManager_cancelTasks_rdh | /**
* This attempts to cancel out all pending and in progress tasks. Does not interrupt the running
* tasks itself. An ongoing HRegion.flush() should not be interrupted (see HBASE-13877).
*/void cancelTasks() throws InterruptedException {
Collection<Future<Void>> tasks = f0;
LOG.debug((("cancelling " + tas... | 3.26 |
hbase_RegionServerFlushTableProcedureManager_initialize_rdh | /**
* Initialize this region server flush procedure manager Uses a zookeeper based member controller.
*
* @param rss
* region server
* @throws KeeperException
* if the zookeeper cannot be reached
*/
@Overridepublic void initialize(RegionServerServices rss) throws KeeperException {
this.rss = rss;
ZK... | 3.26 |
hbase_RegionServerFlushTableProcedureManager_start_rdh | /**
* Start accepting flush table requests.
*/
@Override
public void start() {
LOG.debug("Start region server flush procedure manager " + rss.getServerName().toString());
this.memberRpcs.start(rss.getServerName().toString(), member);
} | 3.26 |
hbase_RegionServerFlushTableProcedureManager_waitForOutstandingTasks_rdh | /**
* Wait for all of the currently outstanding tasks submitted via {@link #submitTask(Callable)}.
* This *must* be called after all tasks are submitted via submitTask.
*
* @return <tt>true</tt> on success, <tt>false</tt> otherwise
*/
boolean waitForOutstandingTasks() throws ForeignException, InterruptedException ... | 3.26 |
hbase_TraceUtil_tracedRunnable_rdh | /**
* Wrap the provided {@code runnable} in a {@link Runnable} that is traced.
*/
public static Runnable tracedRunnable(final Runnable runnable, final Supplier<Span> spanSupplier) {
// N.B. This method name follows the convention of this class, i.e., tracedFuture, rather than
// the convention of the OpenTele... | 3.26 |
hbase_TraceUtil_trace_rdh | /**
* Trace the execution of {@code runnable}.
*/
public static <T extends Throwable> void trace(final ThrowingRunnable<T> runnable, final Supplier<Span> spanSupplier) throws T {
Span span = spanSupplier.get();
try (Scope ignored = span.makeCurrent()) {runnable.run();
span.setStatus(StatusCode.OK);
... | 3.26 |
hbase_TraceUtil_createSpan_rdh | /**
* Create a span with the given {@code kind}. Notice that, OpenTelemetry only expects one
* {@link SpanKind#CLIENT} span and one {@link SpanKind#SERVER} span for a traced request, so use
* this with caution when you want to create spans with kind other than {@link SpanKind#INTERNAL}.
*/
private static Span creat... | 3.26 |
hbase_TraceUtil_tracedFuture_rdh | /**
* Trace an asynchronous operation.
*/
public static <T> CompletableFuture<T> tracedFuture(Supplier<CompletableFuture<T>> action, String
spanName) {
Span span
= createSpan(spanName);
try (Scope ignored = span.makeCurrent()) {
CompletableFuture<T> future = action.get();endSpan(future, span);
return future... | 3.26 |
hbase_TraceUtil_createClientSpan_rdh | /**
* Create a span with {@link SpanKind#CLIENT}.
*/
public static Span createClientSpan(String name) {
return createSpan(name, SpanKind.CLIENT);
} | 3.26 |
hbase_TraceUtil_endSpan_rdh | /**
* Finish the {@code span} when the given {@code future} is completed.
*/
private static void endSpan(CompletableFuture<?> future, Span span) {
FutureUtils.addListener(future, (resp, error) -> {
if (error != null) {
setError(span, error);
} else {
span.setStatus(StatusCode.OK);
}
span.end... | 3.26 |
hbase_TraceUtil_tracedFutures_rdh | /**
* Trace an asynchronous operation, and finish the create {@link Span} when all the given
* {@code futures} are completed.
*/
public static <T> List<CompletableFuture<T>> tracedFutures(Supplier<List<CompletableFuture<T>>> action, Supplier<Span> spanSupplier) {
Span span = spanSupplier.get();
try (Scope ignored ... | 3.26 |
hbase_TraceUtil_createRemoteSpan_rdh | /**
* Create a span which parent is from remote, i.e, passed through rpc.
* </p>
* We will set the kind of the returned span to {@link SpanKind#SERVER}, as this should be the top
* most span at server side.
*/
public static Span createRemoteSpan(String name, Context ctx) {
return getGlobalTracer().spanBuilder(name... | 3.26 |
hbase_DateTieredCompactionPolicy_getCompactionBoundariesForMinor_rdh | /**
* Returns a list of boundaries for multiple compaction output from minTimestamp to maxTimestamp.
*/
private static List<Long> getCompactionBoundariesForMinor(CompactionWindow window, boolean singleOutput) {
List<Long> boundaries = new ArrayList<>();
boundaries.add(Long.MIN_VALUE);
if (!singleOutput) {... | 3.26 |
hbase_DateTieredCompactionPolicy_selectMinorCompaction_rdh | /**
* We receive store files sorted in ascending order by seqId then scan the list of files. If the
* current file has a maxTimestamp older than last known maximum, treat this file as it carries
* the last known maximum. This way both seqId and timestamp are in the same order. If files carry
* the same maxTimestamp... | 3.26 |
hbase_DateTieredCompactionPolicy_needsCompaction_rdh | /**
* Heuristics for guessing whether we need minor compaction.
*/
@Override
@InterfaceAudience.Private
public boolean needsCompaction(Collection<HStoreFile> storeFiles, List<HStoreFile> filesCompacting) {
ArrayList<HStoreFile> candidates
= new ArrayList<>(storeFiles);
try {
return !selectMinorCom... | 3.26 |
hbase_DateTieredCompactionPolicy_getCompactBoundariesForMajor_rdh | /**
* Return a list of boundaries for multiple compaction output in ascending order.
*/
private List<Long> getCompactBoundariesForMajor(Collection<HStoreFile> filesToCompact, long now) {
long minTimestamp = filesToCompact.stream().mapToLong(f -> f.getMinimumTimestamp().orElse(Long.MAX_VALUE)).min().orElse(Long.MA... | 3.26 |
hbase_RestoreTool_getTableArchivePath_rdh | /**
* return value represent path for:
* ".../user/biadmin/backup1/default/t1_dn/backup_1396650096738/archive/data/default/t1_dn"
*
* @param tableName
* table name
* @return path to table archive
* @throws IOException
* exception
*/
Path
getTableArchivePath(TableName tableName) throws IOException {
Pat... | 3.26 |
hbase_RestoreTool_getRegionList_rdh | /**
* Gets region list
*
* @param tableArchivePath
* table archive path
* @return RegionList region list
* @throws IOException
* exception
*/
ArrayList<Path> getRegionList(Path tableArchivePath) throws IOException {
ArrayList<Path> regionDirList = new ArrayList<>();
FileStatus[] v46 = fs.listStatus(... | 3.26 |
hbase_RestoreTool_getTableInfoPath_rdh | /**
* Returns value represent path for:
* ""/$USER/SBACKUP_ROOT/backup_id/namespace/table/.hbase-snapshot/
* snapshot_1396650097621_namespace_table" this path contains .snapshotinfo, .tabledesc (0.96 and
* 0.98) this path contains .snapshotinfo, .data.manifest (trunk)
*
* @param tableName
* table name
* @retu... | 3.26 |
hbase_RestoreTool_incrementalRestoreTable_rdh | /**
* During incremental backup operation. Call WalPlayer to replay WAL in backup image Currently
* tableNames and newTablesNames only contain single table, will be expanded to multiple tables in
* the future
*
* @param conn
* HBase connection
* @param tableBackupPath
* backup path
* @param logDirs
* : ... | 3.26 |
hbase_RestoreTool_getTableDesc_rdh | /**
* Get table descriptor
*
* @param tableName
* is the table backed up
* @return {@link TableDescriptor} saved in backup image of the table
*/
TableDescriptor getTableDesc(TableName tableName) throws
IOException {
Path tableInfoPath = this.getTableInfoPath(tableName);
SnapshotDescription desc = Snapsh... | 3.26 |
hbase_RestoreTool_generateBoundaryKeys_rdh | /**
* Calculate region boundaries and add all the column families to the table descriptor
*
* @param regionDirList
* region dir list
* @return a set of keys to store the boundaries
*/
byte[][] generateBoundaryKeys(ArrayList<Path> regionDirList) throws IOException {
TreeMa... | 3.26 |
hbase_RestoreTool_checkAndCreateTable_rdh | /**
* Prepare the table for bulkload, most codes copied from {@code createTable} method in
* {@code BulkLoadHFilesTool}.
*
* @param conn
* connection
* @param targetTableName
* target table name
* @param regionDirList
* region directory list
* @param htd
* table descriptor
* @param truncateIfExists
... | 3.26 |
hbase_HandlerUtil_getRetryCounter_rdh | /**
* Get an exponential backoff retry counter. The base unit is 100 milliseconds, and the max
* backoff time is 30 seconds.
*/
public static RetryCounter getRetryCounter() {
return new RetryCounterFactory(new RetryCounter.RetryConfig().setBackoffPolicy(new RetryCounter.ExponentialBackoffPolicy()).setSleepInterv... | 3.26 |
hbase_Union2_decodeA_rdh | /**
* Read an instance of the first type parameter from buffer {@code src}.
*/
public A decodeA(PositionedByteRange src) {
return ((A) (decode(src)));
} | 3.26 |
hbase_Union2_decodeB_rdh | /**
* Read an instance of the second type parameter from buffer {@code src}.
*/
public B decodeB(PositionedByteRange src) {
return ((B) (decode(src)));
} | 3.26 |
hbase_RowCounter_createSubmittableJob_rdh | /**
* Returns the JobConf
*/
public JobConf createSubmittableJob(String[] args) throws IOException {
JobConf c = new JobConf(getConf(), getClass());
c.setJobName(NAME);
// Columns are space delimited
StringBuilder sb = new StringBuilder();
final int columnoffset = 2;
for (int i = columnoffset;... | 3.26 |
hbase_SpaceLimitSettings_buildProtoAddQuota_rdh | /**
* Builds a {@link SpaceQuota} protobuf object given the arguments.
*
* @param sizeLimit
* The size limit of the quota.
* @param violationPolicy
* The action to take when the quota is exceeded.
* @return The protobuf SpaceQuota representation.
*/private SpaceLimitRequest buildProtoAddQuota(long sizeLimit... | 3.26 |
hbase_SpaceLimitSettings_validateProtoArguments_rdh | /**
* Validates that the provided protobuf SpaceQuota has the necessary information to construct a
* {@link SpaceLimitSettings}.
*
* @param proto
* The protobuf message to validate.
*/
static void validateProtoArguments(final QuotaProtos.SpaceQuota proto) {
if (!Objects.requireNonNull(proto).hasSoftLimit())... | 3.26 |
hbase_SpaceLimitSettings_validateSizeLimit_rdh | // Helper function to validate sizeLimit
private void validateSizeLimit(long sizeLimit) {
if (sizeLimit <
0L) {
throw new IllegalArgumentException("Size limit must be a non-negative value.");
}
} | 3.26 |
hbase_SpaceLimitSettings_buildProtoRemoveQuota_rdh | /**
* Builds a {@link SpaceQuota} protobuf object to remove a quota.
*
* @return The protobuf SpaceQuota representation.
*/private SpaceLimitRequest buildProtoRemoveQuota() {
return SpaceLimitRequest.newBuilder().setQuota(SpaceQuota.newBuilder().setRemove(true).build()).build();
} | 3.26 |
hbase_SpaceLimitSettings_getProto_rdh | /**
* Returns a copy of the internal state of <code>this</code>
*/
SpaceLimitRequest getProto() {
return proto.toBuilder().build();
} | 3.26 |
hbase_SpaceLimitSettings_fromSpaceQuota_rdh | /**
* Constructs a {@link SpaceLimitSettings} from the provided protobuf message and namespace.
*
* @param namespace
* The target namespace for the limit.
* @param proto
* The protobuf representation.
* @return A QuotaSettings.
*/
static SpaceLimitSettings fromSpaceQuota(final String namespace, final QuotaP... | 3.26 |
hbase_SpaceLimitSettings_buildProtoFromQuota_rdh | /**
* Build a {@link SpaceLimitRequest} protobuf object from the given {@link SpaceQuota}.
*
* @param protoQuota
* The preconstructed SpaceQuota protobuf
* @return A protobuf request to change a space limit quota
*/
private SpaceLimitRequest buildProtoFromQuota(SpaceQuota protoQuota) {
return SpaceLimitRequ... | 3.26 |
hbase_HFileOutputFormat2_createFamilyBloomParamMap_rdh | /**
* Runs inside the task to deserialize column family to bloom filter param map from the
* configuration.
*
* @param conf
* to read the serialized values from
* @return a map from column family to the the configured bloom filter param
*/
@InterfaceAudience.Private
static Map<byte[], String> createFamilyBloom... | 3.26 |
hbase_HFileOutputFormat2_createFamilyBlockSizeMap_rdh | /**
* Runs inside the task to deserialize column family to block size map from the configuration.
*
* @param conf
* to read the serialized values from
* @return a map from column family to the configured block size
*/
@InterfaceAudience.Private
static Map<byte[], Integer> createFamilyBlockSizeMap(Configuration ... | 3.26 |
hbase_HFileOutputFormat2_createFamilyBloomTypeMap_rdh | /**
* Runs inside the task to deserialize column family to bloom filter type map from the
* configuration.
*
* @param conf
* to read the serialized values from
* @return a map from column family to the the configured bloom filter type
*/
@InterfaceAudience.Privatestatic Map<byte[], BloomType> createFamilyBloom... | 3.26 |
hbase_HFileOutputFormat2_m0_rdh | /**
* Configure HBase cluster key for remote cluster to load region location for locality-sensitive
* if it's enabled. It's not necessary to call this method explicitly when the cluster key for
* HBase cluster to be used to load region location is configured in the job configuration. Call
* this method when another... | 3.26 |
hbase_HFileOutputFormat2_createFamilyCompressionMap_rdh | /**
* Runs inside the task to deserialize column family to compression algorithm map from the
* configuration.
*
* @param conf
* to read the serialized values from
* @return a map from column family to the configured compression algorithm
*/
@InterfaceAudience.Privatestatic Map<byte[], Algorithm> createFamily... | 3.26 |
hbase_HFileOutputFormat2_getNewWriter_rdh | /* Create a new StoreFile.Writer.
@return A WriterLength, containing a new StoreFile.Writer.
*/
@SuppressWarnings(value = "BX_UNBOXING_IMMEDIATELY_REBOXED", justification = "Not important")
private WriterLength getNewWriter(byte[] tableName, byte[] family, Configuration conf,
InetSocketAddress... | 3.26 |
hbase_HFileOutputFormat2_createFamilyConfValueMap_rdh | /**
* Run inside the task to deserialize column family to given conf value map.
*
* @param conf
* to read the serialized values from
* @param confName
* conf key to read from the configuration
* @return a map of column family to the given configuration value
*/
private static Map<byte[], String> createFam... | 3.26 |
hbase_HFileOutputFormat2_configureStoragePolicy_rdh | /**
* Configure block storage policy for CF after the directory is created.
*/
static void configureStoragePolicy(final Configuration conf, final FileSystem fs, byte[] tableAndFamily, Path cfPath) {
if ((((null == conf) || (null == fs)) || (null
== tableAndFamily)) || (null == cfPath)) {
return;}
String policy = ... | 3.26 |
hbase_HFileOutputFormat2_configurePartitioner_rdh | /**
* Configure <code>job</code> with a TotalOrderPartitioner, partitioning against
* <code>splitPoints</code>. Cleans up the partitions file after job exists.
*/
static void configurePartitioner(Job job, List<ImmutableBytesWritable> splitPoints, boolean writeMultipleTables) throws IOException {
Configuration conf ... | 3.26 |
hbase_HFileOutputFormat2_writePartitions_rdh | /**
* Write out a {@link SequenceFile} that can be read by {@link TotalOrderPartitioner} that
* contains the split points in startKeys.
*/
@SuppressWarnings("deprecation")
private static void writePartitions(Configuration conf, Path partitionsPath, List<ImmutableBytesWritable> startKeys, boolean writeMultipleTables... | 3.26 |
hbase_HFileOutputFormat2_getRegionStartKeys_rdh | /**
* Return the start keys of all of the regions in this table, as a list of ImmutableBytesWritable.
*/private static List<ImmutableBytesWritable> getRegionStartKeys(List<RegionLocator> regionLocators, boolean writeMultipleTables) throws IOException {
ArrayList<ImmutableBytesWritable> v56 = new ArrayList<>();
for (... | 3.26 |
hbase_HFileOutputFormat2_configureIncrementalLoad_rdh | /**
* Configure a MapReduce Job to perform an incremental load into the given table. This
* <ul>
* <li>Inspects the table to configure a total order partitioner</li>
* <li>Uploads the partitions file to the cluster and adds it to the DistributedCache</li>
* <li>Sets the number of reduce tasks to match the current ... | 3.26 |
hbase_RegionLocations_mergeLocations_rdh | /**
* Merges this RegionLocations list with the given list assuming same range, and keeping the most
* up to date version of the HRegionLocation entries from either list according to seqNum. If
* seqNums are equal, the location from the argument (other) is taken.
*
* @param other
* the locations to merge with
... | 3.26 |
hbase_RegionLocations_numNonNullElements_rdh | /**
* Returns the size of not-null locations
*
* @return the size of not-null locations
*/
public int numNonNullElements() {
return numNonNullElements;
} | 3.26 |
hbase_RegionLocations_size_rdh | /**
* Returns the size of the list even if some of the elements might be null.
*
* @return the size of the list (corresponding to the max replicaId)
*/
public int size()
{
return locations.length;
} | 3.26 |
hbase_RegionLocations_removeElementsWithNullLocation_rdh | /**
* Set the element to null if its getServerName method returns null. Returns null if all the
* elements are removed.
*/
public RegionLocations removeElementsWithNullLocation() {
HRegionLocation[] newLocations = new HRegionLocation[locations.length];
boolean hasNonNullElement = false;
for (int i = 0; i <
locations... | 3.26 |
hbase_RegionLocations_getRegionLocation_rdh | /**
* Returns the first not-null region location in the list
*/
public HRegionLocation getRegionLocation() {
for (HRegionLocation loc : locations) {
if (loc != null) {
return loc;
}
}
return null;
} | 3.26 |
hbase_RegionLocations_isEmpty_rdh | /**
* Returns whether there are non-null elements in the list
*
* @return whether there are non-null elements in the list
*/
public boolean isEmpty() {
return numNonNullElements == 0;
} | 3.26 |
hbase_RegionLocations_getRegionLocationByRegionName_rdh | /**
* Returns the region location from the list for matching regionName, which can be regionName or
* encodedRegionName
*
* @param regionName
* regionName or encodedRegionName
* @return HRegionLocation found or null
*/
public HRegionLocation getRegionLocationByRegionName(byte[] regionName) {
for (HRegionLoc... | 3.26 |
hbase_BalanceAction_undoAction_rdh | /**
* Returns an Action which would undo this action
*/
BalanceAction
undoAction() {
return this;
} | 3.26 |
hbase_HFileLink_build_rdh | /**
* Create an HFileLink instance from table/region/family/hfile location
*
* @param conf
* {@link Configuration} from which to extract specific archive locations
* @param table
* Table name
* @param region
* Region Name
* @param family
* Family Name
* @param hfile
* HFile Name
* @return Link to... | 3.26 |
hbase_HFileLink_m0_rdh | /**
* Returns the path of the mob hfiles.
*/
public Path m0() {
return this.f0;
} | 3.26 |
hbase_HFileLink_getArchivePath_rdh | /**
* Returns the path of the archived hfile.
*/
public Path getArchivePath() {
return this.archivePath;
} | 3.26 |
hbase_HFileLink_buildFromHFileLinkPattern_rdh | /**
*
* @param rootDir
* Path to the root directory where hbase files are stored
* @param archiveDir
* Path to the hbase archive directory
* @param hFileLinkPattern
* The path of the HFile Link.
*/
public static final HFileLink buildFromHFileLinkPattern(final Path r... | 3.26 |
hbase_HFileLink_m1_rdh | /**
* Get the Region name of the referenced link
*
* @param fileName
* HFileLink file name
* @return the name of the referenced Region
*/
public static String m1(final String fileName) {
Matcher m = REF_OR_HFILE_LINK_PATTERN.matcher(fileName);
if (!m.matches()) {
throw new IllegalArgumentException(fileName + " ... | 3.26 |
hbase_HFileLink_isHFileLink_rdh | /**
*
* @param fileName
* File name to check.
* @return True if the path is a HFileLink.
*/
public static boolean isHFileLink(String fileName) {
Matcher m = LINK_NAME_PATTERN.matcher(fileName);
if (!m.matches()) {
return false;
}
return (((m.groupCount() > 2) && (m.group(4) != null)) && (... | 3.26 |
hbase_HFileLink_createPath_rdh | /**
* Create an HFileLink relative path for the table/region/family/hfile location
*
* @param table
* Table name
* @param region
* Region Name
* @param family
* Family Name
* @param hfile
* HFile Name
* @return the relative Path to open the specified table/region/family/hfile link
*/
public static P... | 3.26 |
hbase_HFileLink_createBackReferenceName_rdh | /**
* Create the back reference name
*/
// package-private for testing
static String createBackReferenceName(final String tableNameStr, final String regionName) {
return (regionName + ".") + tableNameStr.replace(TableName.NAMESPACE_DELIM, '=');
} | 3.26 |
hbase_HFileLink_getHFileLinkPatternRelativePath_rdh | /**
* Convert a HFileLink path to a table relative path. e.g. the link:
* /hbase/test/0123/cf/testtb=4567-abcd becomes: /hbase/testtb/4567/cf/abcd
*
* @param path
* HFileLink path
* @return Relative table path
* @throws IOException
* on unexpected error.
*/
private static Path getHFileLinkPatternRelativePa... | 3.26 |
hbase_HFileLink_getHFileFromBackReference_rdh | /**
* Get the full path of the HFile referenced by the back reference
*
* @param conf
* {@link Configuration} to read for the archive directory name
* @param linkRefPath
* Link Back Reference path
* @return full path of the referenced hfile
* @throws IOException
* on unexpected error.
*/public static
Pa... | 3.26 |
hbase_HFileLink_create_rdh | /**
* Create a new HFileLink
* <p>
* It also adds a back-reference to the hfile back-reference directory to simplify the
* reference-count and the cleaning process.
*
* @param conf
* {@link Configuration} to read for the archive directory name
* @param fs
* {@link FileSystem} on which to write the HFileLin... | 3.26 |
hbase_HFileLink_getReferencedTableName_rdh | /**
* Get the Table name of the referenced link
*
* @param fileName
* HFileLink file name
* @return the name of the referenced Table
*/
public static TableName getReferencedTableName(final String fileName) {
Matcher m = REF_OR_HFILE_LINK_PATTERN.matcher(fileName);
if (!m.matches()) {
throw new IllegalArgumentEx... | 3.26 |
hbase_HFileLink_getOriginPath_rdh | /**
* Returns the origin path of the hfile.
*/
public Path getOriginPath() {
return this.originPath;
} | 3.26 |
hbase_HFileLink_getReferencedHFileName_rdh | /**
* Get the HFile name of the referenced link
*
* @param fileName
* HFileLink file name
* @return the name of the referenced HFile
*/
public static String getReferencedHFileName(final String fileName) {
Matcher m = REF_OR_HFILE_LINK_PATTERN.matcher(fileName);
if (!m.matches()) {
throw new IllegalArgumentExcep... | 3.26 |
hbase_MasterCoprocessorHost_preTruncateRegion_rdh | /**
* Invoked just before calling the truncate region procedure
*
* @param regionInfo
* region being truncated
*/
public void preTruncateRegion(RegionInfo regionInfo) throws IOException {
execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {
@Override
public void call(MasterObser... | 3.26 |
hbase_MasterCoprocessorHost_postCompletedMergeRegionsAction_rdh | /**
* Invoked after completing merge regions operation
*
* @param regionsToMerge
* the regions to merge
* @param mergedRegion
* the new merged region
* @param user
* the user
*/
public void postCompletedMergeRegionsAction(final RegionInfo[] regionsToMerge, final RegionInfo mergedRegion, final User use... | 3.26 |
hbase_MasterCoprocessorHost_preCreateTableRegionsInfos_rdh | /* Implementation of hooks for invoking MasterObservers */
public TableDescriptor preCreateTableRegionsInfos(TableDescriptor desc) throws IOException {
if (coprocEnvironments.isEmpty()) {
return desc;
}
return execOperationWithResult(new ObserverOperationWithResult<MasterObserver, TableDescriptor>(masterObserverGetter,... | 3.26 |
hbase_MasterCoprocessorHost_preMergeRegionsCommit_rdh | /**
* Invoked before merge regions operation writes the new region to hbase:meta
*
* @param regionsToMerge
* the regions to merge
* @param metaEntries
* the meta entry
* @param user
* the user
*/
public void preMergeRegionsCommit(final RegionInfo[] regionsToMerge, @MetaMutationAnnotation
final List<Mutat... | 3.26 |
hbase_MasterCoprocessorHost_preSplitBeforeMETAAction_rdh | /**
* This will be called before update META step as part of split table region procedure.
*
* @param user
* the user
*/
public void preSplitBeforeMETAAction(final byte[] splitKey, final List<Mutation> metaEntries, final User user) throws IOException {
execOperation(coprocEnvironments.isEmpty() ? null : new Ma... | 3.26 |
hbase_MasterCoprocessorHost_preSplitRegionAction_rdh | /**
* Invoked just before a split
*
* @param tableName
* the table where the region belongs to
* @param splitRow
* the split point
* @param user
* the user
*/
public void preSplitRegionAction(final TableName tableName, final byte[] splitRow, final User user) throws IOException {
execOperation(coprocEnvir... | 3.26 |
hbase_MasterCoprocessorHost_preCreateNamespace_rdh | // MasterObserver operations
// ////////////////////////////////////////////////////////////////////////////////////////////////
public void preCreateNamespace(final NamespaceDescriptor ns) throws IOException {
execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {
@Override
public void m... | 3.26 |
hbase_MasterCoprocessorHost_postCompletedSplitRegionAction_rdh | /**
* Invoked just after a split
*
* @param regionInfoA
* the new left-hand daughter region
* @param regionInfoB
* the new right-hand daughter region
* @param user
* the user
*/
public void postCompletedSplitRegionAction(final RegionInfo regionInfoA, final RegionInfo regionInfoB, final User user) throws... | 3.26 |
hbase_MasterCoprocessorHost_postTruncateRegion_rdh | /**
* Invoked after calling the truncate region procedure
*
* @param regionInfo
* region being truncated
*/
public void postTruncateRegion(RegionInfo regionInfo) throws IOException {
execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation() {
@Override
public void call(MasterObserver obse... | 3.26 |
hbase_MasterCoprocessorHost_m4_rdh | /**
* Invoked just before calling the truncate region procedure
*
* @param region
* Region to be truncated
* @param user
* The user
*/
public void m4(final RegionInfo region, User user) throws IOException {
execOperation(coprocEnvironments.isEmpty() ? null : new MasterObserverOperation(user) {@Override
pu... | 3.26 |
hbase_MasterCoprocessorHost_postRollBackSplitRegionAction_rdh | /**
* Invoked just after the rollback of a failed split
*
* @param user
* the user
*/
public void postRollBackSplitRegionAction(final User user) throws IOException {
execOperation(coprocEnvironments.isEmpty() ? null
: new MasterObserverOperation(user) {
@Override
public void call(MasterObserver observer) throw... | 3.26 |
hbase_MasterCoprocessorHost_preMergeRegionsAction_rdh | /**
* Invoked just before a merge
*
* @param regionsToMerge
* the regions to merge
* @param user
* the user
*/
public void preMergeRegionsAction(final
RegionInfo[] regionsToMerge, final User user) throws IOException {
execOperation(coprocEnvironments.isEmpty() ? null : new
MasterObserverOperation(user) {
@Ov... | 3.26 |
hbase_MasterCoprocessorHost_preSplitAfterMETAAction_rdh | /**
* This will be called after update META step as part of split table region procedure.
*
* @param user
* the user
*/
public void preSplitAfterMETAAction(final User user) throws IOException {
execOperation(coprocEnvironments.isEmpty()
? null : new MasterObserverOperation(user) {
@Override
public void call(Mas... | 3.26 |
hbase_MasterCoprocessorHost_postMergeRegionsCommit_rdh | /**
* Invoked after merge regions operation writes the new region to hbase:meta
*
* @param regionsToMerge
* the regions to merge
* @param mergedRegion
* the new merged region
* @param user
* the user
*/public void
postMergeRegionsCommit(final RegionInfo[] regionsToMerge, final RegionInfo mergedRegion, f... | 3.26 |
hbase_MasterCoprocessorHost_preSplitRegion_rdh | /**
* Invoked just before calling the split region procedure
*
* @param tableName
* the table where the region belongs to
* @param splitRow
* the split point
*/
public void preSplitRegion(final TableName tableName, final byte[] splitRow) throws IOException {
execOperation(coprocEnvironments.isEmpty() ? null ... | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.