name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hbase_JVMClusterUtil_startup_rdh
/** * Start the cluster. Waits until there is a primary master initialized and returns its address. * * @return Address to use contacting primary master. */ public static String startup(final List<JVMClusterUtil.MasterThread> masters, final List<JVMClusterUtil.RegionServerThread> regionservers) throws IOException...
3.26
hbase_JVMClusterUtil_waitForEvent_rdh
/** * Utility method to wait some time for an event to occur, and then return control to the caller. * * @param millis * How long to wait, in milliseconds. * @param action * The action that we are waiting for. Will be used in log message if the event does * not occur. * @param check * A Supplier that w...
3.26
hbase_JVMClusterUtil_getMaster_rdh
/** * Returns the master */ public HMaster getMaster() { return this.master;}
3.26
hbase_Compression_createPlainCompressionStream_rdh
/** * Creates a compression stream without any additional wrapping into buffering streams. */public CompressionOutputStream createPlainCompressionStream(OutputStream downStream, Compressor compressor) throws IOException { CompressionCodec codec = getCodec(conf); ((Configurable) (codec)).getConf().setInt("io.f...
3.26
hbase_Compression_getClassLoaderForCodec_rdh
/** * Returns the classloader to load the Codec class from. */ private static ClassLoader getClassLoaderForCodec() { ClassLoader cl = Thread.currentThread().getContextClassLoader(); if (cl == null) { cl = Compression.class.getClassLoader(); } if (cl == null) {cl = ClassLoader.getSystemClassLo...
3.26
hbase_Compression_buildCodec_rdh
/** * Load a codec implementation for an algorithm using the supplied configuration. * * @param conf * the configuration to use * @param algo * the algorithm to implement */ private static CompressionCodec buildCodec(final Configuration conf, final Algorithm algo) { try { String codec...
3.26
hbase_AvlUtil_remove_rdh
/** * Remove a node from the tree * * @param head * the head of the linked list * @param node * the node to remove from the list * @return the new head of the list */ public static <TNode extends AvlLinkedNode> TNode remove(TNode head, TNode node) { assert isLinked(node) : node + " is not linked"; ...
3.26
hbase_AvlUtil_visit_rdh
/** * Visit each node of the tree * * @param root * the current root of the tree * @param visitor * the AvlNodeVisitor instance */ public static <TNode extends AvlNode> void visit(final TNode root, final AvlNodeVisitor<TNode> visitor) { if (root == null) return; final AvlTreeIterator<TNode> ...
3.26
hbase_AvlUtil_isLinked_rdh
/** * Return true if the node is linked to a list, false otherwise */ public static <TNode extends AvlLinkedNode> boolean isLinked(TNode node) { return (node.iterPrev != null) && (node.iterNext != null); }
3.26
hbase_AvlUtil_readPrev_rdh
/** * Return the predecessor of the current node * * @param node * the current node * @return the predecessor of the current node */ public static <TNode extends AvlLinkedNode> TNode readPrev(TNode node) { return ((TNode) (node.iterPrev)); }
3.26
hbase_AvlUtil_seekTo_rdh
/** * Reset the iterator, and seeks to the specified key * * @param root * the current root of the tree * @param key * the key for the node we are trying to find * @param keyComparator * the comparator to use to match node and key */public void seekTo(final TNode root, final Object key, final AvlKeyCo...
3.26
hbase_AvlUtil_get_rdh
/** * Return the node that matches the specified key or null in case of node not found. * * @param root * the current root of the tree * @param key * the key for the node we are trying to find * @param keyComparator * the comparator to use to match node and key * @return the node that matches the specifi...
3.26
hbase_AvlUtil_prepend_rdh
/** * Prepend a node to the tree before a specific node * * @param head * the head of the linked list * @param base * the node which we want to add the {@code node} before it * @param node * the node which we want to add it before the {@code base} node */ public static <TNode extends AvlLinkedNode> TNode...
3.26
hbase_AvlUtil_getLast_rdh
/** * Return the last node of the tree. * * @param root * the current root of the tree * @return the last (max) node of the tree */ public static <TNode extends AvlNode> TNode getLast(TNode root) { if (root != null) { while (root.avlRight != null) { root = ((TNode) (root.avlRight));...
3.26
hbase_AvlUtil_m0_rdh
/** * Return the first node of the tree. * * @param root * the current root of the tree * @return the first (min) node of the tree */ public static <TNode extends AvlNode> TNode m0(TNode root) { if (root != null) { while (root.avlLeft != null) { root = ((TNode) (root.avlLeft)); ...
3.26
hbase_AvlUtil_insert_rdh
/** * Insert a node into the tree. This is useful when you want to create a new node or replace the * content depending if the node already exists or not. Using AvlInsertOrReplace class you can * return the node to add/replace. * * @param root * the current root of the tree * @param key * the key for the no...
3.26
hbase_AvlUtil_m1_rdh
/** * Reset the iterator, and seeks to the first (min) node of the tree * * @param root * the current root of the tree */ public void m1(final TNode root) { current = root; height = 0; if (root != null) { while (current.avlLeft != null) { stack[height++] = current; cu...
3.26
hbase_AvlUtil_appendList_rdh
/** * Append a list of nodes to the tree * * @param head * the head of the current linked list * @param otherHead * the head of the list to append to the current list * @return the new head of the current list */ public static <TNode extends AvlLinkedNode> TNode appendList(TNode head, TNode otherHead) { ...
3.26
hbase_AvlUtil_readNext_rdh
/** * Return the successor of the current node * * @param node * the current node * @return the successor of the current node */ public static <TNode extends AvlLinkedNode> TNode readNext(TNode node) { return ((TNode) (node.iterNext)); }
3.26
hbase_AvlUtil_append_rdh
/** * Append a node to the tree * * @param head * the head of the linked list * @param node * the node to add to the tail of the list * @return the new head of the list */ public static <TNode extends AvlLinkedNode> TNode append(TNode head, TNode node) { assert !isLinked(node) : node + " is already link...
3.26
hbase_CompactionRequestImpl_getPriority_rdh
/** * Gets the priority for the request */@Override public int getPriority() { return priority; }
3.26
hbase_CompactionRequestImpl_getSize_rdh
/** * Gets the total size of all StoreFiles in compaction */ @Override public long getSize() { return totalSize; }
3.26
hbase_CompactionRequestImpl_setPriority_rdh
/** * Sets the priority for the request */ public void setPriority(int p) { this.priority = p; }
3.26
hbase_CompactionRequestImpl_m1_rdh
/** * Sets the region/store name, for logging. */ public void m1(String regionName, String storeName) { this.regionName = regionName; this.storeName = storeName; }
3.26
hbase_CompactionRequestImpl_recalculateSize_rdh
/** * Recalculate the size of the compaction based on current files. */ private void recalculateSize() { this.totalSize = filesToCompact.stream().map(HStoreFile::getReader).mapToLong(r -> r != null ? r.length() : 0L).sum(); }
3.26
hbase_ZKMainServer_hasServer_rdh
/** * * @param args * the arguments to check * @return True if argument strings have a '-server' in them. */ private static boolean hasServer(final String[] args) { return (args.length > 0) && args[0].equals(SERVER_ARG); }
3.26
hbase_ZKMainServer_runCmdLine_rdh
/** * Run the command-line args passed. Calls System.exit when done. * * @throws IOException * in case of a network failure * @throws InterruptedException * if the ZooKeeper client closes * @throws CliException * if the ZooKeeper exception happens in cli command */ void runCmdLine() throws IOException,...
3.26
hbase_ZKMainServer_hasCommandLineArguments_rdh
/** * * @param args * the arguments to check for command-line arguments * @return True if command-line arguments were passed. */ private static boolean hasCommandLineArguments(final String[] args) { if (hasServer(args)) { if (args.length < 2) { throw new IllegalStateException("-server par...
3.26
hbase_ZKMainServer_main_rdh
/** * Run the tool. * * @param args * Command line arguments. First arg is path to zookeepers file. */ public static void main(String[] args) throws Exception { String[] newArgs = args; if (!hasServer(args)) { // Add the zk ensemble from configuration if none passed on command-line. ...
3.26
hbase_Permission_getVersion_rdh
/** * Returns the object version number */ @Override public byte getVersion() { return VERSION; }
3.26
hbase_Permission_newBuilder_rdh
/** * Build a table permission * * @param tableName * the specific table name * @return table permission builder */ public static Builder newBuilder(TableName tableName) { return new Builder(tableName); }
3.26
hbase_Permission_implies_rdh
/** * check if given action is granted * * @param action * action to be checked * @return true if granted, false otherwise */ public boolean implies(Action action) { return actions.contains(action); }
3.26
hbase_Permission_equalsExceptActions_rdh
/** * Check if two permission equals regardless of actions. It is useful when merging a new * permission with an existed permission which needs to check two permissions's fields. * * @param obj * instance * @return true if equals, false otherwise */ public boolean equalsExceptActions(Object obj) { return ...
3.26
hbase_ReplicationSourceShipper_shipEdits_rdh
/** * Do the shipping logic */ private void shipEdits(WALEntryBatch entryBatch) { List<Entry> entries = entryBatch.getWalEntries(); int sleepMultiplier = 0; if (entries.isEmpty()) { updateLogPosition(entryBatch); return; } int currentSize = ((int) (entryBatch.getHeapSize()));...
3.26
hbase_ReplicationSourceShipper_clearWALEntryBatch_rdh
/** * Attempts to properly update <code>ReplicationSourceManager.totalBufferUser</code>, in case * there were unprocessed entries batched by the reader to the shipper, but the shipper didn't * manage to ship those because the replication source is being terminated. In that case, it * iterates through the batched en...
3.26
hbase_RollingStatCalculator_fillWithZeros_rdh
/** * Returns an array of given size initialized with zeros */ private long[] fillWithZeros(int size) { long[] zeros = new long[size]; for (int i = 0; i < size; i++) { zeros[i] = 0L; } return zeros; }
3.26
hbase_RollingStatCalculator_removeData_rdh
/** * Update the statistics after removing the given data value */ private void removeData(long data) { currentSum = currentSum - ((double) (data)); currentSqrSum = currentSqrSum - (((double) (data)) * data); numberOfDataValues--; }
3.26
hbase_RollingStatCalculator_insertDataValue_rdh
/** * Inserts given data value to array of data values to be considered for statistics calculation */ public void insertDataValue(long data) { // if current number of data points already equals rolling period and rolling period is // non-zero then remove one data and update the statistics if (...
3.26
hbase_RollingStatCalculator_getDeviation_rdh
/** * Returns deviation of the data values that are in the current list of data values */ public double getDeviation() { double variance = (currentSqrSum - ((currentSum * currentSum) / ((double) (numberOfDataValues)))) / numberOfDataValues; return Math.sqrt(variance); }
3.26
hbase_RotateFile_delete_rdh
/** * Deletes the two files used for rotating data. If any of the files cannot be deleted, an * IOException is thrown. * * @throws IOException * if there is an error deleting either file */ public void delete() throws IOException { Path next = files[nextFile]; // delete next file first, and then the cur...
3.26
hbase_RotateFile_write_rdh
/** * Writes the given data to the next file in the rotation, with a timestamp calculated based on * the previous timestamp and the current time to make sure it is greater than the previous * timestamp. The method also deletes the previous file, which is no longer needed. * <p/> * Notice that, for a newly created ...
3.26
hbase_Tag_getValueAsByte_rdh
/** * Converts the value bytes of the given tag into a byte value * * @param tag * The Tag * @return value as byte */ public static byte getValueAsByte(Tag tag) { if (tag.hasArray()) { return tag.getValueArray()[tag.getValueOffset()]; } return ByteBufferUtils.toByte(tag.getValueByt...
3.26
hbase_Tag_cloneValue_rdh
/** * Returns tag value in a new byte array. Primarily for use client-side. If server-side, use * {@link Tag#getValueArray()} with appropriate {@link Tag#getValueOffset()} and * {@link Tag#getValueLength()} instead to save on allocations. * * @param tag * The Tag whose value to be returned * @return tag value ...
3.26
hbase_Tag_getValueAsLong_rdh
/** * Converts the value bytes of the given tag into a long value * * @param tag * The Tag * @return value as long */ public static long getValueAsLong(Tag tag) { if (tag.hasArray()) { return Bytes.toLong(tag.getValueArray(), tag.getValueOffset(), tag.getValueLength()); } return ByteBufferUt...
3.26
hbase_Tag_getValueAsString_rdh
/** * Converts the value bytes of the given tag into a String value * * @param tag * The Tag * @return value as String */ public static String getValueAsString(Tag tag) { if (tag.hasArray()) { return Bytes.toString(tag.getValueArray(), tag.getValueOffset(), tag.getValueLength()); } return B...
3.26
hbase_MapReduceHFileSplitterJob_usage_rdh
/** * Print usage * * @param errorMsg * Error message. Can be null. */ private void usage(final String errorMsg) { if ((errorMsg != null) && (errorMsg.length() > 0)) { System.err.println("ERROR: " + errorMsg); } System.err.println(("Usage: " + NAME) + " [options] <HFile inputdir(s)> <table>...
3.26
hbase_MapReduceHFileSplitterJob_main_rdh
/** * Main entry point. * * @param args * The command line parameters. * @throws Exception * When running the job fails. */ public static void main(String[] args) throws Exception { int ret = ToolRunner.run(new MapReduceHFileSplitterJob(HBaseConfiguration.create()), args); System.exit(ret); }
3.26
hbase_MapReduceHFileSplitterJob_createSubmittableJob_rdh
/** * Sets up the actual job. * * @param args * The command line parameters. * @return The newly created job. * @throws IOException * When setting up the job fails. */ public Job createSubmittableJob(String[] args) throws IOException { Configuration conf = getConf(); String inputDirs = args[0]; ...
3.26
hbase_MapReduceHFileSplitterJob_map_rdh
/** * A mapper that just writes out cells. This one can be used together with {@link CellSortReducer} */static class HFileCellMapper extends Mapper<NullWritable, Cell, ImmutableBytesWritable, Cell> { @Override public void map(NullWritable key, Cell value, Context context) throws IOException, InterruptedExc...
3.26
hbase_MultiTableOutputFormat_write_rdh
/** * Writes an action (Put or Delete) to the specified table. the table being updated. the update, * either a put or a delete. if the action is not a put or a delete. */ @Override public void write(ImmutableBytesWritable tableName, Mutation action) throws IOException { BufferedMutator mutator = getBufferedMuta...
3.26
hbase_MultiTableOutputFormat_getBufferedMutator_rdh
/** * the name of the table, as a string * * @return the named mutator if there is a problem opening a table */ BufferedMutator getBufferedMutator(ImmutableBytesWritable tableName) throws IOException { if (this.connection == null) { this.connection = ConnectionFactory.createConnection(conf); ...
3.26
hbase_MasterServices_m1_rdh
/** * Returns return null if current is zk-based WAL splitting */ default SplitWALManager m1() { return null; }
3.26
hbase_MasterServices_modifyTable_rdh
/** * Modify the descriptor of an existing table * * @param tableName * The table name * @param descriptor * The updated table descriptor */ default long modifyTable(final TableName tableName, final TableDescriptor descriptor, final long nonceGroup, final long nonce) throws IOException { return modifyT...
3.26
hbase_StaticUserWebFilter_m1_rdh
/** * Retrieve the static username from the configuration. */ static String m1(Configuration conf) { String oldStyleUgi = conf.get(DEPRECATED_UGI_KEY); if (oldStyleUgi != null) { // We can't use the normal configuration deprecation mechanism here // since we need to split out the username fr...
3.26
hbase_RegexStringComparator_toByteArray_rdh
/** * Returns The comparator serialized using pb */ @Override public byte[] toByteArray() { return engine.toByteArray(); }
3.26
hbase_RegexStringComparator_m0_rdh
/** * Specifies the {@link Charset} to use to convert the row key to a String. * <p> * The row key needs to be converted to a String in order to be matched against the regular * expression. This method controls which charset is used to do this conversion. * <p> * If the row key is made of arbitrary bytes, the cha...
3.26
hbase_RegexStringComparator_areSerializedFieldsEqual_rdh
/** * Returns true if and only if the fields of the comparator that are serialized are equal to the * corresponding fields in other. Used for testing. */ @Override boolean areSerializedFieldsEqual(ByteArrayComparable other) { if (other == this) { return true; }if (!(other instanceof RegexStringComp...
3.26
hbase_RegexStringComparator_m1_rdh
/** * Parse a serialized representation of {@link RegexStringComparator} * * @param pbBytes * A pb serialized {@link RegexStringComparator} instance * @return An instance of {@link RegexStringComparator} made from <code>bytes</code> * @throws DeserializationException * if an error occurred * @see #toByteArr...
3.26
hbase_RestoreTablesClient_restore_rdh
/** * Restore operation. Stage 2: resolved Backup Image dependency * * @param backupManifestMap * : tableName, Manifest * @param sTableArray * The array of tables to be restored * @param tTableArray * The array of mapping tables to restore to * @throws IOException * exception */ private void restore...
3.26
hbase_RestoreTablesClient_checkTargetTables_rdh
/** * Validate target tables. * * @param tTableArray * target tables * @param isOverwrite * overwrite existing table * @throws IOException * exception */ private void checkTargetTables(TableName[] tTableArray, boolean isOverwrite) throws IOException { ArrayList<TableName> existTableList = new Arr...
3.26
hbase_RestoreTablesClient_restoreImages_rdh
/** * Restore operation handle each backupImage in array. * * @param images * array BackupImage * @param sTable * table to be restored * @param tTable * table to be restored to * @param truncateIfExists * truncate table * @throws IOException * exception */ private void restoreImages(BackupImag...
3.26
hbase_MasterProcedureManager_execProcedure_rdh
/** * Execute a distributed procedure on cluster * * @param desc * Procedure description */ public void execProcedure(ProcedureDescription desc) throws IOException { }
3.26
hbase_MasterProcedureManager_execProcedureWithRet_rdh
/** * Execute a distributed procedure on cluster with return data. * * @param desc * Procedure description * @return data returned from the procedure execution, null if no data */ public byte[] execProcedureWithRet(ProcedureDescription desc) throws IOException { return null; }
3.26
hbase_UncompressedBlockSizePredicator_updateLatestBlockSizes_rdh
/** * Empty implementation. Does nothing. * * @param uncompressed * the uncompressed size of last block written. * @param compressed * the compressed size of last block written. */ @Override public void updateLatestBlockSizes(HFileContext context, int uncompressed, int compressed) { }
3.26
hbase_UncompressedBlockSizePredicator_shouldFinishBlock_rdh
/** * Dummy implementation that always returns true. This means, we will be only considering the * block uncompressed size for deciding when to finish a block. * * @param uncompressed * true if the block should be finished. */ @Override public boolean shouldFinishBlock(int uncompressed) { return true;}
3.26
hbase_KeyValueScanner_getScannerOrder_rdh
/** * Get the order of this KeyValueScanner. This is only relevant for StoreFileScanners. This is * required for comparing multiple files to find out which one has the latest data. * StoreFileScanners are ordered from 0 (oldest) to newest in increasing order. */ default long getScannerOrder...
3.26
hbase_BloomFilterFactory_getMaxFold_rdh
/** * Returns the value for Bloom filter max fold in the given configuration */ public static int getMaxFold(Configuration conf) { return conf.getInt(IO_STOREFILE_BLOOM_MAX_FOLD, MAX_ALLOWED_FOLD_FACTOR); }
3.26
hbase_BloomFilterFactory_getMaxKeys_rdh
/** * Returns max key for the Bloom filter from the configuration */ public static int getMaxKeys(Configuration conf) {return conf.getInt(IO_STOREFILE_BLOOM_MAX_KEYS, (128 * 1000) * 1000); } /** * Creates a new general (Row or RowCol) Bloom filter at the time of * {@link org.apache.hadoop.hbase.regionserver.HStoreF...
3.26
hbase_BloomFilterFactory_createFromMeta_rdh
/** * Instantiates the correct Bloom filter class based on the version provided in the meta block * data. * * @param meta * the byte array holding the Bloom filter's metadata, including version information * @param reader * the {@link HFile} reader to use to lazily load Bloom filter blocks * @return an inst...
3.26
hbase_BloomFilterFactory_isGeneralBloomEnabled_rdh
/** * Returns true if general Bloom (Row or RowCol) filters are enabled in the given configuration */ public static boolean isGeneralBloomEnabled(Configuration conf) {return conf.getBoolean(IO_STOREFILE_BLOOM_ENABLED, true); }
3.26
hbase_BloomFilterFactory_getErrorRate_rdh
/** * Returns the Bloom filter error rate in the given configuration */ public static float getErrorRate(Configuration conf) { return conf.getFloat(IO_STOREFILE_BLOOM_ERROR_RATE, ((float) (0.01))); }
3.26
hbase_BloomFilterFactory_getBloomBlockSize_rdh
/** * Returns the compound Bloom filter block size from the configuration */ public static int getBloomBlockSize(Configuration conf) { return conf.getInt(IO_STOREFILE_BLOOM_BLOCK_SIZE, 128 * 1024); }
3.26
hbase_BloomFilterFactory_isDeleteFamilyBloomEnabled_rdh
/** * Returns true if Delete Family Bloom filters are enabled in the given configuration */ public static boolean isDeleteFamilyBloomEnabled(Configuration conf) { return conf.getBoolean(IO_STOREFILE_DELETEFAMILY_BLOOM_ENABLED, true); }
3.26
hbase_ClusterSchemaServiceImpl_checkIsRunning_rdh
// All below are synchronized so consistent view on whether running or not. private synchronized void checkIsRunning() throws ServiceNotRunningException { if (!isRunning()) { throw new ServiceNotRunningException(); } }
3.26
hbase_SlowLogTableAccessor_getRowKey_rdh
/** * Create rowKey: currentTime APPEND slowLogPayload.hashcode Scan on slowlog table should keep * records with sorted order of time, however records added at the very same time could be in * random order. * * @param slowLogPayload * SlowLogPayload to process * @return rowKey byte[] */ private static byte[] ...
3.26
hbase_SlowLogTableAccessor_addSlowLogRecords_rdh
/** * Add slow/large log records to hbase:slowlog table * * @param slowLogPayloads * List of SlowLogPayload to process * @param connection * connection */ public static void addSlowLogRecords(final List<TooSlowLog.SlowLogPayload> slowLogPayloads, Connection connection) { ...
3.26
hbase_HBaseReplicationEndpoint_getReplicationSink_rdh
/** * Get a randomly-chosen replication sink to replicate to. * * @return a replication sink to replicate to */ protected synchronized SinkPeer getReplicationSink() throws IOException { if (sinkServers.isEmpty()) { LOG.info("Current list of sinks is out of date or empty, updating"); chooseSinks();} if (sink...
3.26
hbase_HBaseReplicationEndpoint_reconnect_rdh
/** * A private method used to re-establish a zookeeper session with a peer cluster. */ private void reconnect(KeeperException ke) { if (((ke instanceof ConnectionLossException) || (ke instanceof SessionExpiredException)) || (ke instanceof AuthFailedException)) { String clu...
3.26
hbase_HBaseReplicationEndpoint_reportSinkSuccess_rdh
/** * Report that a {@code SinkPeer} successfully replicated a chunk of data. The SinkPeer that had a * failed replication attempt on it */ protected synchronized void reportSinkSuccess(SinkPeer sinkPeer) { badReportCounts.remove(sinkPeer.getServerName()); }
3.26
hbase_HBaseReplicationEndpoint_fetchSlavesAddresses_rdh
/** * Get the list of all the region servers from the specified peer * * @return list of region server addresses or an empty list if the slave is unavailable */ protected List<ServerName> fetchSlavesAddresses() { List<String> children = null; try { synchronized(zkwLock) { children = ZKUtil.listChildrenAndWatchF...
3.26
hbase_HBaseReplicationEndpoint_getPeerUUID_rdh
// Synchronize peer cluster connection attempts to avoid races and rate // limit connections when multiple replication sources try to connect to // the peer cluster. If the peer cluster is down we can get out of control // over time. @Override public UUID getPeerUUID() { UUID peerUUID = null; try { synchronized(zkw...
3.26
hbase_HBaseReplicationEndpoint_reportBadSink_rdh
/** * Report a {@code SinkPeer} as being bad (i.e. an attempt to replicate to it failed). If a single * SinkPeer is reported as bad more than replication.bad.sink.threshold times, it will be removed * from the pool of potential replication targets. * * @param sinkPeer * The SinkPeer that had a failed replicatio...
3.26
hbase_HBaseReplicationEndpoint_reloadZkWatcher_rdh
/** * Closes the current ZKW (if not null) and creates a new one * * @throws IOException * If anything goes wrong connecting */ private void reloadZkWatcher() throws IOException { synchronized(zkwLock) { if (zkw != null) { zkw.close(); } zkw = new ZKWatcher(ctx.getConfiguration(), "connection to cluster: " ...
3.26
hbase_RegionPlan_getSource_rdh
/** * Get the source server for the plan for this region. * * @return server info for source */ public ServerName getSource() { return source; }
3.26
hbase_RegionPlan_compareTo_rdh
/** * Compare the region info. * * @param other * region plan you are comparing against */ @Override public int compareTo(RegionPlan other) { return compareTo(this, other); }
3.26
hbase_RegionPlan_m0_rdh
/** * Get the destination server for the plan for this region. * * @return server info for destination */ public ServerName m0() { return dest; }
3.26
hbase_RegionPlan_getRegionName_rdh
/** * Get the encoded region name for the region this plan is for. * * @return Encoded region name */ public String getRegionName() { return this.hri.getEncodedName(); }
3.26
hbase_RegionPlan_setDestination_rdh
/** * Set the destination server for the plan for this region. */ public void setDestination(ServerName dest) { this.dest = dest; }
3.26
hbase_SnapshotManifest_getRegionManifestsMap_rdh
/** * Get all the Region Manifest from the snapshot. This is an helper to get a map with the region * encoded name */ public Map<String, SnapshotRegionManifest> getRegionManifestsMap() {if ((regionManifests == null) || regionManifests.isEmpty()) return null; HashMap<String, SnapshotRegionManifest> regionsMap = new ...
3.26
hbase_SnapshotManifest_writeDataManifest_rdh
/* Write the SnapshotDataManifest file */ private void writeDataManifest(final SnapshotDataManifest manifest) throws IOException { try (FSDataOutputStream stream = workingDirFs.create(new Path(workingDir, f0))) { manifest.writeTo(stream); } }
3.26
hbase_SnapshotManifest_getTableDescriptor_rdh
/** * Get the table descriptor from the Snapshot */ public TableDescriptor getTableDescriptor() { return this.htd; }
3.26
hbase_SnapshotManifest_getRegionNameFromManifest_rdh
/** * Extract the region encoded name from the region manifest */ static String getRegionNameFromManifest(final SnapshotRegionManifest manifest) { byte[] regionName = RegionInfo.createRegionName(ProtobufUtil.toTableName(manifest.getRegionInfo().getTableName()), manifest.getRegionInfo().getStartKey().toByteArray(), ma...
3.26
hbase_SnapshotManifest_readDataManifest_rdh
/* Read the SnapshotDataManifest file */ private SnapshotDataManifest readDataManifest() throws IOException { try (FSDataInputStream in = workingDirFs.open(new Path(workingDir, f0))) { CodedInputStream cin = CodedInputStream.newInstance(in); cin.setSizeLimit(manifestSizeLimit); return SnapshotDataManifest.parseFrom(cin...
3.26
hbase_SnapshotManifest_getSnapshotFormat_rdh
/* Return the snapshot format */ private static int getSnapshotFormat(final SnapshotDescription desc) { return desc.hasVersion() ? desc.getVersion() : SnapshotManifestV1.DESCRIPTOR_VERSION; }
3.26
hbase_SnapshotManifest_m1_rdh
/** * Load the information in the SnapshotManifest. Called by SnapshotManifest.open() If the format * is v2 and there is no data-manifest, means that we are loading an in-progress snapshot. Since * we support rolling-upgrades, we loook for v1 and v2 regions format. */ ...
3.26
hbase_SnapshotManifest_getSnapshotDescription_rdh
/** * Get the SnapshotDescription */ public SnapshotDescription getSnapshotDescription() { return this.desc;}
3.26
hbase_SnapshotManifest_m0_rdh
/** * Creates a 'manifest' for the specified region, by reading directly from the HRegion object. * This is used by the "online snapshot" when the table is enabled. */ public void m0(final HRegion region) throws IOException { // Get the ManifestBuilder/RegionVisitor RegionVisitor visitor = createRegionVisito...
3.26
hbase_SnapshotManifest_addRegion_rdh
/** * Creates a 'manifest' for the specified region, by reading directly from the disk. This is used * by the "offline snapshot" when the table is disabled. */ public void addRegion(final Path tableDir, final RegionInfo regionInfo) throws IOException { // ...
3.26
hbase_SnapshotManifest_create_rdh
/** * Return a SnapshotManifest instance, used for writing a snapshot. There are two usage pattern: - * The Master will create a manifest, add the descriptor, offline regions and consolidate the * snapshot by writing all the pending stuff on-disk. manifest = SnapshotManifest.create(...) * manifest.addRegion(tableDi...
3.26
hbase_SnapshotManifest_open_rdh
/** * Return a SnapshotManifest instance with the information already loaded in-memory. * SnapshotManifest manifest = SnapshotManifest.open(...) TableDescriptor htd = * manifest.getDescriptor() for (SnapshotRegionManifest regionManifest: * manifest.getRegionManifests()) hri = regionManifest.getRegionInfo() for * (...
3.26