name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hbase_StorageClusterStatusModel_setMaxHeapSizeMB_rdh
/** * * @param maxHeapSizeMB * the maximum heap size, in MB */ public void setMaxHeapSizeMB(int maxHeapSizeMB) { this.maxHeapSizeMB = maxHeapSizeMB; }
3.26
hbase_StorageClusterStatusModel_setWriteRequestsCount_rdh
/** * * @param writeRequestsCount * The current total write requests made to region */ public void setWriteRequestsCount(long writeRequestsCount) { this.writeRequestsCount = writeRequestsCount; }
3.26
hbase_StorageClusterStatusModel_getAverageLoad_rdh
/** * Returns the average load of the region servers in the cluster */ @XmlAttribute public double getAverageLoad() { return averageLoad;}
3.26
hbase_StorageClusterStatusModel_getRequests_rdh
/** * Returns the number of requests per second processed by the region server */ @XmlAttribute public long getRequests() { return requests; }
3.26
hbase_StorageClusterStatusModel_setCpRequestsCount_rdh
/** * * @param cpRequestsCount * The current total read requests made to region */ public void setCpRequestsCount(long cpRequestsCount) { this.cpRequestsCount = cpRequestsCount; }
3.26
hbase_StorageClusterStatusModel_m3_rdh
/** * Returns the list of live nodes */ // workaround https://github.com/FasterXML/jackson-dataformat-xml/issues/192 @XmlElement(name = "Node") @XmlElementWrapper(name = "LiveNodes") @JsonProperty("LiveNodes") public List<Node> m3() { return liveNodes; }
3.26
hbase_StorageClusterStatusModel_setDeadNodes_rdh
/** * * @param nodes * the list of dead node names */ public void setDeadNodes(List<String> nodes) { this.deadNodes = nodes; }
3.26
hbase_StorageClusterStatusModel_setStorefiles_rdh
/** * * @param storefiles * the number of store files */ public void setStorefiles(int storefiles) { this.storefiles = storefiles; }
3.26
hbase_StorageClusterStatusModel_setTotalStaticBloomSizeKB_rdh
/** * * @param totalStaticBloomSizeKB * The total size of all Bloom filter blocks, not just loaded * into the block cache, in KB. */ public void setTotalStaticBloomSizeKB(int totalStaticBloomSizeKB) { this.totalStaticBloomSizeKB = totalStaticBloomSizeKB; }
3.26
hbase_StorageClusterStatusModel_getTotalCompactingKVs_rdh
/** * Returns The total number of compacting key-values */ @XmlAttribute public long getTotalCompactingKVs() { return totalCompactingKVs; }
3.26
hbase_StorageClusterStatusModel_getStartCode_rdh
/** * Returns the region server's start code */ @XmlAttribute public long getStartCode() { return startCode; }
3.26
hbase_StorageClusterStatusModel_getCpRequestsCount_rdh
/** * Returns the current total read requests made to region */ @XmlAttribute public long getCpRequestsCount() { return cpRequestsCount; }
3.26
hbase_StorageClusterStatusModel_getMemStoreSizeMB_rdh
/** * Returns memstore size, in MB */ @XmlAttribute public int getMemStoreSizeMB() { return memstoreSizeMB; }
3.26
hbase_StorageClusterStatusModel_addLiveNode_rdh
/** * Add a live node to the cluster representation. * * @param name * the region server name * @param startCode * the region server's start code * @param heapSizeMB * the current heap size, in MB * @param maxHeapSizeMB * the maximum heap size, in MB */ public Node addLiveNode(String name, long start...
3.26
hbase_StorageClusterStatusModel_setName_rdh
/** * * @param name * the region server's hostname */ public void setName(String name) { this.name = name; }
3.26
hbase_StorageClusterStatusModel_getStorefileSizeMB_rdh
/** * Returns the total size of store files, in MB */ @XmlAttribute public int getStorefileSizeMB() { return storefileSizeMB; }
3.26
hbase_AbstractHBaseSaslRpcClient_m0_rdh
/** * Release resources used by wrapped saslClient */ public void m0() { SaslUtil.safeDispose(saslClient); }
3.26
hbase_AbstractHBaseSaslRpcClient_getInitialResponse_rdh
/** * Computes the initial response a client sends to a server to begin the SASL challenge/response * handshake. If the client's SASL mechanism does not have an initial response, an empty token * will be returned without querying the evaluateChallenge method, as an authentication processing * must be started by cli...
3.26
hbase_CompoundConfiguration_size_rdh
// TODO: This method overestimates the number of configuration settings -- if a value is masked // by an overriding config or map, it will be counted multiple times. @Override public int size() { int ret = 0; if (mutableConf != null) { ret += mutableConf.size(); } for (ImmutableConfi...
3.26
hbase_CompoundConfiguration_m2_rdh
/** * Add String map to config list. This map is generally created by HTableDescriptor or * HColumnDescriptor, but can be abstractly used. The added configuration overrides the previous * ones if there are name collisions. * * @return this, for builder pattern */ public CompoundConfiguration m2(final Map<String, ...
3.26
hbase_CompoundConfiguration_freezeMutableConf_rdh
/** * If set has been called, it will create a mutableConf. This converts the mutableConf to an * immutable one and resets it to allow a new mutable conf. This is used when a new map or conf is * added to the compound configuration to preserve proper override semantics. */ void freezeMutableConf() { if (mutable...
3.26
hbase_CompoundConfiguration_addBytesMap_rdh
/** * Add Bytes map to config list. This map is generally created by HTableDescriptor or * HColumnDescriptor, but can be abstractly used. The added configuration overrides the previous * ones if there are name collisions. Bytes map * * @return this, for builder pattern */public Compoun...
3.26
hbase_CompoundConfiguration_get_rdh
/** * Get the value of the <code>name</code>. If the key is deprecated, it returns the value of the * first key which replaces the deprecated key and is not null. If no such property exists, then * <code>defaultValue</code> is returned. The CompooundConfiguration does not do property * substitution. To do so we nee...
3.26
hbase_CompoundConfiguration_clear_rdh
/** * ********************************************************************************************* * These methods are unsupported, and no code using CompoundConfiguration depend upon them. * Quickly abort upon any attempts to use them. * ****************************************************************************...
3.26
hbase_CompoundConfiguration_m1_rdh
/** * Add Hadoop Configuration object to config list. The added configuration overrides the previous * ones if there are name collisions. * * @param conf * configuration object * @return this, for builder pattern */ public CompoundConfiguration m1(final Configuration conf) { freezeMutableConf(); if (co...
3.26
hbase_TableOutputFormat_write_rdh
/** * Writes a key/value pair into the table. * * @param key * The key. * @param value * The value. * @throws IOException * When writing fails. * @see RecordWriter#write(Object, Object) */ @Override public void write(KEY key, Mutation value) throws IOException { if ((!(value instanceof Put)) && (!(...
3.26
hbase_TableOutputFormat_getOutputCommitter_rdh
/** * Returns the output committer. * * @param context * The current context. * @return The committer. * @throws IOException * When creating the committer fails. * @throws InterruptedException * When the job is aborted. * @see OutputFormat#getOutputCommitter(TaskAttemptContext) */ @Override public Outp...
3.26
hbase_TableOutputFormat_getRecordWriter_rdh
/** * Creates a new record writer. Be aware that the baseline javadoc gives the impression that there * is a single {@link RecordWriter} per job but in HBase, it is more natural if we give you a new * RecordWriter per call of this method. You must close the returned RecordWriter when done. * Failure to do so will d...
3.26
hbase_TableOutputFormat_checkOutputSpecs_rdh
/** * Checks if the output table exists and is enabled. * * @param context * The current context. * @throws IOException * When the check fails. * @throws InterruptedException * When the job is aborted. * @see OutputFormat#checkOutputSpecs(JobContext) */ @Override public void checkOutputSpecs(JobContext ...
3.26
hbase_TableOutputFormat_close_rdh
/** * Closes the writer, in this case flush table commits. * * @param context * The context. * @throws IOException * When closing the writer fails. * @see RecordWriter#close(TaskAttemptContext) */@Override public void close(TaskAttemptContext context) throws IOException { try { if (mutator != nu...
3.26
hbase_CompressionUtil_roundInt2_rdh
/** * Round up to the next power of two, unless the value would become negative (ints are signed), in * which case just return Integer.MAX_VALUE. */public static int roundInt2(int v) { v = Integer.highestOneBit(v) << 1; if (v < 0) { return Integer.MAX_VALUE; } return v; }
3.26
hbase_CompressionUtil_compressionOverhead_rdh
/** * Most compression algorithms can be presented with pathological input that causes an expansion * rather than a compression. Hadoop's compression API requires that we calculate additional * buffer space required for the worst case. There is a formula developed for gzip that applies as * a ballpark to all LZ var...
3.26
hbase_TableScanResource_getIterator_rdh
// jackson needs an iterator for streaming @JsonProperty("Row") public Iterator<RowModel> getIterator() { return Row.iterator(); }
3.26
hbase_PendingWatcher_prepare_rdh
/** * Associates the substantial watcher of processing events. This method should be called once, and * {@code watcher} should be non-null. This method is expected to call as soon as possible because * the event processing, being invoked by the ZooKeeper event thread, is uninterruptibly blocked * until this method ...
3.26
hbase_RefCountingMap_remove_rdh
/** * Decrements the ref count of k, and removes from map if ref count == 0. * * @param k * the key to remove * @return the value associated with the specified key or null if key is removed from map. */ V remove(K k) { Payload<V> p = map.computeIfPresent(k, (k1, v) -> (--v.refCount) <= 0 ? null : v);...
3.26
hbase_ColumnSchemaModel_addAttribute_rdh
/** * Add an attribute to the column family schema * * @param name * the attribute name * @param value * the attribute value */ @JsonAnySetter public void addAttribute(String name, Object value) {attrs.put(new QName(name), value); }
3.26
hbase_ColumnSchemaModel___getTTL_rdh
/** * Returns the value of the TTL attribute or its default if it is unset */ public int __getTTL() { Object o = attrs.get(TTL); return o != null ? Integer.parseInt(o.toString()) : ColumnFamilyDescriptorBuilder.DEFAULT_TTL; }
3.26
hbase_ColumnSchemaModel___setVersions_rdh
/** * * @param value * the desired value of the VERSIONS attribute */ public void __setVersions(int value) { attrs.put(VERSIONS, Integer.toString(value)); }
3.26
hbase_ColumnSchemaModel___setBlocksize_rdh
/** * * @param value * the desired value of the BLOCKSIZE attribute */ public void __setBlocksize(int value) { attrs.put(BLOCKSIZE, Integer.toString(value)); }
3.26
hbase_ColumnSchemaModel___getBlockcache_rdh
// getters and setters for common schema attributes // cannot be standard bean type getters and setters, otherwise this would // confuse JAXB /** * Returns true if the BLOCKCACHE attribute is present and true */ public boolean __getBlockcache() { Object o = attrs.get(BLOCKCACHE); return o != null ? Boolean.pa...
3.26
hbase_ColumnSchemaModel___setCompression_rdh
/** * * @param value * the desired value of the COMPRESSION attribute */ public void __setCompression(String value) { attrs.put(COMPRESSION, value); }
3.26
hbase_ColumnSchemaModel___getBloomfilter_rdh
/** * Returns the value of the BLOOMFILTER attribute or its default if unset */ public String __getBloomfilter() { Object o = attrs.get(BLOOMFILTER); return o != null ? o.toString() : ColumnFamilyDescriptorBuilder.DEFAULT_BLOOMFILTER.name(); }
3.26
hbase_ColumnSchemaModel___getInMemory_rdh
/** * Returns true if the IN_MEMORY attribute is present and true */ public boolean __getInMemory() { Object o = attrs.get(IN_MEMORY); return o != null ? Boolean.parseBoolean(o.toString()) : ColumnFamilyDescriptorBuilder.DEFAULT_IN_MEMORY; }
3.26
hbase_ColumnSchemaModel_getAny_rdh
/** * Returns the map for holding unspecified (user) attributes */ @XmlAnyAttribute @JsonAnyGetter public Map<QName, Object> getAny() { return attrs; }
3.26
hbase_ColumnSchemaModel_toString_rdh
/* (non-Javadoc) @see java.lang.Object#toString() */ @Override public String toString() {StringBuilder sb = new StringBuilder(); sb.append("{ NAME => '"); sb.append(name); sb.append('\''); for (Map.Entry<QName, Object> e : attrs.entrySet()) { sb.append(", "); sb.append(e.getKey().ge...
3.26
hbase_ColumnSchemaModel___setTTL_rdh
/** * * @param value * the desired value of the TTL attribute */ public void __setTTL(int value) { attrs.put(TTL, Integer.toString(value)); }
3.26
hbase_ColumnSchemaModel_getAttribute_rdh
/** * * @param name * the attribute name * @return the attribute value */ public String getAttribute(String name) { Object v0 = attrs.get(new QName(name)); return v0 != null ? v0.toString() : null; }
3.26
hbase_ColumnSchemaModel_getName_rdh
/** * Returns the column name */ @XmlAttribute public String getName() { return name; }
3.26
hbase_ColumnSchemaModel___getVersions_rdh
/** * Returns the value of the VERSIONS attribute or its default if it is unset */public int __getVersions() { Object o = attrs.get(VERSIONS); return o != null ? Integer.parseInt(o.toString()) : ColumnFamilyDescriptorBuilder.DEFAULT_MAX_VERSIONS; }
3.26
hbase_ColumnSchemaModel___setBlockcache_rdh
/** * * @param value * the desired value of the BLOCKCACHE attribute */ public void __setBlockcache(boolean value) { attrs.put(BLOCKCACHE, Boolean.toString(value)); }
3.26
hbase_ColumnSchemaModel___getCompression_rdh
/** * Returns the value of the COMPRESSION attribute or its default if unset */public String __getCompression() { Object o = attrs.get(COMPRESSION); return o != null ? o.toString() : ColumnFamilyDescriptorBuilder.DEFAULT_COMPRESSION.name(); }
3.26
hbase_ColumnSchemaModel_setName_rdh
/** * * @param name * the table name */ public void setName(String name) { this.name = name; }
3.26
hbase_ColumnSchemaModel___setInMemory_rdh
/** * * @param value * the desired value of the IN_MEMORY attribute */ public void __setInMemory(boolean value) { attrs.put(IN_MEMORY, Boolean.toString(value)); }
3.26
hbase_Union3_decodeC_rdh
/** * Read an instance of the third type parameter from buffer {@code src}. */ public C decodeC(PositionedByteRange src) { return ((C) (decode(src))); }
3.26
hbase_HFileArchiver_getFileSystem_rdh
/** * Returns the {@link FileSystem} on which this file resides */ public FileSystem getFileSystem() { return this.fs; }
3.26
hbase_HFileArchiver_deleteRegionWithoutArchiving_rdh
/** * Without regard for backup, delete a region. Should be used with caution. * * @param regionDir * {@link Path} to the region to be deleted. * @param fs * FileSystem from which to delete the region * @return <tt>true</tt> on successful deletion, <tt>false</tt> otherwise * @throws IOException * on file...
3.26
hbase_HFileArchiver_archiveStoreFile_rdh
/** * Archive the store file * * @param fs * the filesystem where the store files live * @param regionInfo * region hosting the store files * @param conf * {@link Configuration} to examine to determine the archive directory * @param tableDir * {@link Path} to where the table is being stored (for build...
3.26
hbase_HFileArchiver_getThreadFactory_rdh
// We need this method instead of Threads.getNamedThreadFactory() to pass some tests. // The difference from Threads.getNamedThreadFactory() is that it doesn't fix ThreadGroup for // new threads. If we use Threads.getNamedThreadFactory(), we will face ThreadGroup related // issues in some tests. private static ThreadFa...
3.26
hbase_HFileArchiver_deleteStoreFilesWithoutArchiving_rdh
/** * Just do a simple delete of the given store files * <p> * A best effort is made to delete each of the files, rather than bailing on the first failure. * <p> * * @param compactedFiles * store files to delete from the file system. * @throws IOException * if a file cannot be deleted. All files will be at...
3.26
hbase_HFileArchiver_exists_rdh
/** * Returns True if the Region exits in the filesystem. */public static boolean exists(Configuration conf, FileSystem fs, RegionInfo info) throws IOException { Path rootDir = CommonFSUtils.getRootDir(conf); Path regionDir = FSUtils.getRegionDirFromRootDir(rootDir, info); return fs.exists(regionDir); }
3.26
hbase_HFileArchiver_archiveRegions_rdh
/** * Archive the specified regions in parallel. * * @param conf * the configuration to use * @param fs * {@link FileSystem} from which to remove the region * @param rootDir * {@link Path} to the root directory where hbase files are stored (for * building the archive path) * @param tableDir * {@lin...
3.26
hbase_HFileArchiver_archiveFamilyByFamilyDir_rdh
/** * Removes from the specified region the store files of the specified column family, either by * archiving them or outright deletion * * @param fs * the filesystem where the store files live * @param conf * {@link Configuration} to examine to determine the archive directory * @param parent * Parent re...
3.26
hbase_HFileArchiver_archiveFamily_rdh
/** * Remove from the specified region the store files of the specified column family, either by * archiving them or outright deletion * * @param fs * the filesystem where the store files live * @param conf * {@link Configuration} to examine to determine the archive directory * @param parent * Parent reg...
3.26
hbase_HFileArchiver_moveAndClose_rdh
/** * Move the file to the given destination * * @return <tt>true</tt> on success */ public boolean moveAndClose(Path dest) throws IOException { this.m2(); Path p = this.getPath(); return CommonFSUtils.renameAndSetModifyTime(fs, p, dest); }
3.26
hbase_HFileArchiver_archiveRegion_rdh
/** * Cleans up all the files for a HRegion by archiving the HFiles to the archive directory * * @param conf * the configuration to use * @param fs * the file system object * @param info * RegionInfo for region to be deleted */ public static void archiveRegion(Configuration conf, FileSystem fs, RegionInf...
3.26
hbase_HFileArchiver_archiveStoreFiles_rdh
/** * Remove the store files, either by archiving them or outright deletion * * @param conf * {@link Configuration} to examine to determine the archive directory * @param fs * the filesystem where the store files live * @param regionInfo * {@link RegionInfo} of the region hosting the store files * @param...
3.26
hbase_ExecutorService_dumpTo_rdh
/** * Dump a textual representation of the executor's status to the given writer. * * @param out * the stream to write to * @param indent * a string prefix for each line, used for indentation */ public void dumpTo(Writer out, String indent) throws IOException {out.write(((indent + "Status for executor: ") + ...
3.26
hbase_ExecutorService_m1_rdh
/** * Submit the event to the queue for handling. */ void m1(final EventHandler event) { // If there is a listener for this type, make sure we call the before // and after process methods. this.threadPoolExecutor.execute(event); }
3.26
hbase_ExecutorService_delayedSubmit_rdh
// Submit the handler after the given delay. Used for retrying. public void delayedSubmit(EventHandler eh, long delay, TimeUnit unit) { ListenableFuture<?> future = delayedSubmitTimer.schedule(() -> submit(eh), delay, unit); future.addListener(() -> { try { future.get(); } catch (Exception e) ...
3.26
hbase_ExecutorService_getExecutorLazily_rdh
/** * Initialize the executor lazily, Note if an executor need to be initialized lazily, then all * paths should use this method to get the executor, should not start executor by using * {@link ExecutorService#startExecutorService(ExecutorConfig)} */ public ThreadPoolExecutor getExecutorLazily(ExecutorConfig confi...
3.26
hbase_ExecutorService_startExecutorService_rdh
/** * Start an executor service with a given name. If there was a service already started with the * same name, this throws a RuntimeException. * * @param config * Configuration to use for the executor. */ public void startExecutorService(final ExecutorConfig config) { final String name = config.getName(); ...
3.26
hbase_ExecutorService_setAllowCoreThreadTimeout_rdh
/** * Allows timing out of core threads. Good to set this for non-critical thread pools for release * of unused resources. Refer to {@link ThreadPoolExecutor#allowCoreThreadTimeOut} for * additional details. */public ExecutorConfig setAllowCoreThreadTimeout(boolean allowCoreThreadTimeout) { this.allowCoreThread...
3.26
hbase_IOEngine_usesSharedMemory_rdh
/** * IOEngine uses shared memory means, when reading Cacheable from it, those refers to the same * memory area as used by the Engine for caching it. * * @return true when IOEngine using shared memory. */ default boolean usesSharedMemory() { return false;}
3.26
hbase_ForeignException_serialize_rdh
/** * Converts a ForeignException to an array of bytes. * * @param source * the name of the external exception source * @param t * the "local" external exception (local) * @return protobuf serialized version of ForeignException */ public static byte[] serialize(String source, Throwable t) { GenericExc...
3.26
hbase_ForeignException_isRemote_rdh
/** * The cause of a ForeignException can be an exception that was generated on a local in process * thread, or a thread from a 'remote' separate process. If the cause is a ProxyThrowable, we know * it came from deserialization which usually means it came from not only another thread, but also * from a remote threa...
3.26
hbase_ForeignException_deserialize_rdh
/** * Takes a series of bytes and tries to generate an ForeignException instance for it. * * @return the ForeignExcpetion instance * @throws InvalidProtocolBufferException * if there was deserialization problem this is thrown. */ public static ForeignException deserialize(byte[] bytes) throws IOException { ...
3.26
hbase_ForeignException_toStackTraceElementMessages_rdh
/** * Convert a stack trace to list of {@link StackTraceElement}. * * @param trace * the stack trace to convert to protobuf message * @return <tt>null</tt> if the passed stack is <tt>null</tt>. */ private static List<StackTraceElementMessage> toStackTraceElementMessages(StackTraceElement[] trace) { // if th...
3.26
hbase_BinaryPrefixComparator_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 BinaryPrefix...
3.26
hbase_BinaryPrefixComparator_toByteArray_rdh
/** * Returns The comparator serialized using pb */ @Override public byte[] toByteArray() { ComparatorProtos.BinaryPrefixComparator.Builder builder = ComparatorProtos.BinaryPrefixComparator.newBuilder(); builder.setComparable(ProtobufUtil.toByteArrayComparable(this.value)); return builder.build().toBy...
3.26
hbase_BinaryPrefixComparator_parseFrom_rdh
/** * Parse a serialized representation of {@link BinaryPrefixComparator} * * @param pbBytes * A pb serialized {@link BinaryPrefixComparator} instance * @return An instance of {@link BinaryPrefixComparator} made from <code>bytes</code> * @throws DeserializationException * if an error occurred * @see #toByte...
3.26
hbase_RegionMover_filename_rdh
/** * Path of file where regions will be written to during unloading/read from during loading * * @return RegionMoverBuilder object */ public RegionMoverBuilder filename(String filename) { this.filename = filename; return this; }
3.26
hbase_RegionMover_rackManager_rdh
/** * Set specific rackManager implementation. This setter method is for testing purpose only. * * @param rackManager * rackManager impl * @return RegionMoverBuilder object */@InterfaceAudience.Private public RegionMoverBuilder rackManager(RackManager rackManager) { this.rackManager = rackManager; retur...
3.26
hbase_RegionMover_readServersFromFile_rdh
/** * * @param filename * The file should have 'host:port' per line * @return List of servers from the file in format 'hostname:port'. */ private List<String> readServersFromFile(String filename) throws IOException { List<String> servers = new ArrayList<>(); if (filename != null) { try { Files.readAllLines(Path...
3.26
hbase_RegionMover_designatedFile_rdh
/** * Set the designated file. Designated file contains hostnames where region moves. Designated * file should have 'host:port' per line. Port is mandatory here as we can have many RS running * on a single host. * * @param designatedFile * The designated file * @return RegionMoverBuilder object */ public Regi...
3.26
hbase_RegionMover_ack_rdh
/** * Set ack/noAck mode. * <p> * In ack mode regions are acknowledged before and after moving and the move is retried * hbase.move.retries.max times, if unsuccessful we quit with exit code 1.No Ack mode is a best * effort mode,each region movement is tried once.This can be used during graceful shutdown as * even...
3.26
hbase_RegionMover_unloadFromRack_rdh
/** * Unload regions from given {@link #hostname} using ack/noAck mode and {@link #maxthreads}.In * noAck mode we do not make sure that region is successfully online on the target region * server,hence it is best effort.We do not unload regions to hostnames given in * {@link #excludeFile}. If designatedFile is pres...
3.26
hbase_RegionMover_unload_rdh
/** * Unload regions from given {@link #hostname} using ack/noAck mode and {@link #maxthreads}.In * noAck mode we do not make sure that region is successfully online on the target region * server,hence it is best effort.We do not unload regions to hostnames given in * {@link #excludeFile}. If designatedFile is pres...
3.26
hbase_RegionMover_stripServer_rdh
/** * Remove the servername whose hostname and port portion matches from the passed array of servers. * Returns as side-effect the servername removed. * * @return server removed from list of Region Servers */ private ServerName stripServer(List<ServerName> regionServers, String hostname, int port) { for (Iterator<...
3.26
hbase_RegionMover_isolateRegions_rdh
/** * Isolated regions specified in {@link #isolateRegionIdArray} on {@link #hostname} in ack Mode * and Unload regions from given {@link #hostname} using ack/noAck mode and {@link #maxthreads}. * In noAck mode we do not make sure that region is successfully online on the target region * server,hence it is the best...
3.26
hbase_RegionMover_writeFile_rdh
/** * Write the number of regions moved in the first line followed by regions moved in subsequent * lines */ private void writeFile(String filename, List<RegionInfo> movedRegions) throws IOException { try (DataOutputStream dos = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(filename)))) { dos....
3.26
hbase_RegionMover_includeExcludeRegionServers_rdh
/** * Designates or excludes the servername whose hostname and port portion matches the list given in * the file. Example:<br> * If you want to designated RSs, suppose designatedFile has RS1, regionServers has RS1, RS2 and * RS3. When we call includeExcludeRegionServers(designatedFile, regionServers, true), RS2 and...
3.26
hbase_RegionMover_isolateRegionIdArray_rdh
/** * Set the region ID to isolate on the region server. */ public RegionMoverBuilder isolateRegionIdArray(List<String> isolateRegionIdArray) { this.isolateRegionIdArray = isolateRegionIdArray; return this; }
3.26
hbase_RegionMover_stripMaster_rdh
/** * Exclude master from list of RSs to move regions to */ private void stripMaster(List<ServerName> regionServers) throws IOException { ServerName master = admin.getClusterMetrics(EnumSet.of(Option.MASTER)).getMasterName(); stripServer(regionServers, master.getHostname(), master.getPort()); }
3.26
hbase_RegionMover_timeout_rdh
/** * Set the timeout for Load/Unload operation in seconds.This is a global timeout,threadpool for * movers also have a separate time which is hbase.move.wait.max * number of regions to * load/unload * * @param timeout * in seconds * @return RegionMoverBuilder object */ public RegionMoverBuilder timeout(int t...
3.26
hbase_RegionMover_load_rdh
/** * Loads the specified {@link #hostname} with regions listed in the {@link #filename} RegionMover * Object has to be created using {@link #RegionMover(RegionMoverBuilder)} * * @return true if loading succeeded, false otherwise */ public boolean load() throws ExecutionException, InterruptedException, TimeoutExce...
3.26
hbase_RegionMover_build_rdh
/** * This method builds the appropriate RegionMover object which can then be used to load/unload * using load and unload methods * * @return RegionMover object */ public RegionMover build() throws IOException { return new RegionMover(this); }
3.26
hbase_ZKProcedureCoordinator_abort_rdh
/** * Receive a notification and propagate it to the local coordinator * * @param abortNode * full znode path to the failed procedure information */ protected void abort(String abortNode) { String procName = ZKUtil.getNodeName(abortNode); ForeignException ee = null; try { byte[] data = ZKUtil.getData(zkPro...
3.26
hbase_ZKProcedureCoordinator_getZkProcedureUtil_rdh
/** * Used in testing */ final ZKProcedureUtil getZkProcedureUtil() { return zkProc; }
3.26
hbase_ZKProcedureCoordinator_sendGlobalBarrierAcquire_rdh
/** * The "acquire" phase. The coordinator creates a new procType/acquired/ znode dir. If znodes * appear, first acquire to relevant listener or sets watch waiting for notification of the * acquire node * * @param proc * the Procedure * @param info * data to be stored in the acquire node * @param nodeNames...
3.26
hbase_ZKProcedureCoordinator_sendAbortToMembers_rdh
/** * This is the abort message being sent by the coordinator to member TODO this code isn't actually * used but can be used to issue a cancellation from the coordinator. */ @Override public final void sendAbortToMembers(Procedure proc, ForeignException ee) { String procName = proc.getName(); LOG.debug(("Abo...
3.26