name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hbase_HDFSBlocksDistribution_getBlocksLocalWithSsdWeight_rdh
/** * Get the blocks local weight with ssd for a given host * * @param host * the host name * @return the blocks local with ssd weight of the given host */ public long getBlocksLocalWithSsdWeight(String host) { return getBlocksLocalityWeightInternal(host, HostAndWeight::getWeightForSsd); }
3.26
hbase_HDFSBlocksDistribution_getBlockLocalityIndexForSsd_rdh
/** * Get the block locality index for a ssd for a given host * * @param host * the host name * @return the locality index with ssd of the given host */ public float getBlockLocalityIndexForSsd(String host) {if (uniqueBlocksTotalWeight == 0) { return 0.0F; } else { return ((float) (getBlocksLocalit...
3.26
hbase_HDFSBlocksDistribution_add_rdh
/** * This will add the distribution from input to this object * * @param otherBlocksDistribution * the other hdfs blocks distribution */ public void add(HDFSBlocksDistribution otherBlocksDistribution) { Map<String, HostAndWeight> otherHostAndWeights = otherBlocksDistribution.getHostAndWeights(); for (Map.Entry...
3.26
hbase_HDFSBlocksDistribution_getWeightForSsd_rdh
/** * Returns the weight for ssd */ public long getWeightForSsd() { return weightForSsd; }
3.26
hbase_HDFSBlocksDistribution_m0_rdh
/** * Return the sorted list of hosts in terms of their weights */ public List<String> m0() { HostAndWeight[] hostAndWeights = getTopHostsWithWeights(); List<String> topHosts = new ArrayList<>(hostAndWeights.length); for (HostAndWeight haw : hostAndWeights) { topHosts.add(haw.getHost()); } return topHosts; }
3.26
hbase_HDFSBlocksDistribution_getWeight_rdh
/** * return the weight for a specific host, that will be the total bytes of all blocks on the host * * @param host * the host name * @return the weight of the given host */ public long getWeight(String host) { long weight = 0; if (host != null) { HostAndW...
3.26
hbase_HDFSBlocksDistribution_addUniqueWeight_rdh
/** * add some weight to the total unique weight * * @param weight * the weight */ private void addUniqueWeight(long weight) { uniqueBlocksTotalWeight += weight; }
3.26
hbase_HDFSBlocksDistribution_addWeight_rdh
/** * add weight * * @param weight * the weight * @param weightForSsd * the weight for ssd */ public void addWeight(long weight, long weightForSsd) { this.weight += weight; this.weightForSsd += weightForSsd; }
3.26
hbase_HDFSBlocksDistribution_getBlocksLocalWeight_rdh
/** * Get the blocks local weight for a given host * * @param host * the host name * @return the blocks local weight of the given host */ public long getBlocksLocalWeight(String host) {return getBlocksLocalityWeightInternal(host, HostAndWeight::getWeight); }
3.26
hbase_HDFSBlocksDistribution_getUniqueBlocksTotalWeight_rdh
/** * Returns the sum of all unique blocks' weight */ public long getUniqueBlocksTotalWeight() { return uniqueBlocksTotalWeight; }
3.26
hbase_HDFSBlocksDistribution_getHostAndWeights_rdh
/** * Returns the hosts and their weights */ public Map<String, HostAndWeight> getHostAndWeights() { return this.hostAndWeights; }
3.26
hbase_HDFSBlocksDistribution_getTopHostsWithWeights_rdh
/** * Return the sorted list of hosts in terms of their weights */ public HostAndWeight[] getTopHostsWithWeights() { NavigableSet<HostAndWeight> orderedHosts = new TreeSet<>(new HostAndWeight.WeightComparator()); orderedHosts.addAll(this.hostAndWeights.values()); return orderedHosts.descendingSet().toArray(new HostAn...
3.26
hbase_HDFSBlocksDistribution_addHostsAndBlockWeight_rdh
/** * add some weight to a list of hosts, update the value of unique block weight * * @param hosts * the list of the host * @param weight * the weight */ public void addHostsAndBlockWeight(String[] hosts, long weight, StorageType[] storageTypes) {if ((hosts == null) || (hosts.length == 0)) { // erron...
3.26
hbase_RingBufferTruck_m0_rdh
/** * Unload the truck of its {@link SyncFuture} payload. The internal reference is released. */ SyncFuture m0() { SyncFuture sync = this.sync; this.sync = null; this.type = Type.EMPTY; return sync; }
3.26
hbase_RingBufferTruck_load_rdh
/** * Load the truck with a {@link SyncFuture}. */ void load(final SyncFuture syncFuture) { this.sync = syncFuture; this.type = Type.SYNC; }
3.26
hbase_RingBufferTruck_unloadAppend_rdh
/** * Unload the truck of its {@link FSWALEntry} payload. The internal reference is released. */ FSWALEntry unloadAppend() { FSWALEntry entry = this.entry; this.entry = null; this.type = Type.EMPTY; return entry; }
3.26
hbase_RingBufferTruck_type_rdh
/** * Returns the type of this truck's payload. */ Type type() { return type; }
3.26
hbase_RandomRowFilter_parseFrom_rdh
/** * Parse a serialized representation of {@link RandomRowFilter} * * @param pbBytes * A pb serialized {@link RandomRowFilter} instance * @return An instance of {@link RandomRowFilter} made from <code>bytes</code> * @throws DeserializationException * if an error occurred * @see #toByteArray */ public stat...
3.26
hbase_RandomRowFilter_getChance_rdh
/** * Returns The chance that a row gets included. */ public float getChance() { return chance; }
3.26
hbase_RandomRowFilter_toByteArray_rdh
/** * Returns The filter serialized using pb */@Overridepublic byte[] toByteArray() { FilterProtos.RandomRowFilter.Builder builder = FilterProtos.RandomRowFilter.newBuilder(); builder.setChance(this.chance); return builder.build().toByteArray(); }
3.26
hbase_RandomRowFilter_areSerializedFieldsEqual_rdh
/** * Returns true if and only if the fields of the filter that are serialized are equal to the * corresponding fields in other. Used for testing. */ @Override boolean areSerializedFieldsEqual(Filter o) { if (o == this) { return true; } if (!(o instanceof RandomRowFilter)) { return false;...
3.26
hbase_RandomRowFilter_setChance_rdh
/** * Set the chance that a row is included. */ public void setChance(float chance) { this.chance = chance; }
3.26
hbase_GlobalQuotaSettingsImpl_toQuotas_rdh
/** * Constructs a new {@link Quotas} message from {@code this}. */ protected Quotas toQuotas() { QuotaProtos.Quotas.Builder builder = QuotaProtos.Quotas.newBuilder(); if (getThrottleProto() != null) { builder.setThrottle(getThrottleProto()); } if (getBypassGlobals(...
3.26
hbase_ConnectionOverAsyncConnection_toString_rdh
/** * An identifier that will remain the same for a given connection. */ @Override public String toString() {return "connection-over-async-connection-0x" + Integer.toHexString(hashCode()); }
3.26
hbase_ConnectionOverAsyncConnection_createThreadPool_rdh
// only used for executing coprocessor calls, as users may reference the methods in the // BlockingInterface of the protobuf stub so we have to execute the call in a separated thread... // Will be removed in 4.0.0 along with the deprecated coprocessor methods in Table and Admin // interface. private ThreadPoolExecutor ...
3.26
hbase_ConnectionOverAsyncConnection_closePool_rdh
// will be called from AsyncConnection, to avoid infinite loop as in the above method we will call // AsyncConnection.close. synchronized void closePool() { ExecutorService batchPool = this.batchPool; if (batchPool != null) { ConnectionUtils.shutdownPool(batchPool); this.batchPool = null; } }
3.26
hbase_ConnectionOverAsyncConnection_getBatchPool_rdh
// only used for executing coprocessor calls, as users may reference the methods in the // BlockingInterface of the protobuf stub so we have to execute the call in a separated thread... // Will be removed in 4.0.0 along with the deprecated coprocessor methods in Table and Admin // interface. private ExecutorService get...
3.26
hbase_ColumnFamilyDescriptorBuilder_setVersionsWithTimeToLive_rdh
/** * Retain all versions for a given TTL(retentionInterval), and then only a specific number of * versions(versionAfterInterval) after that interval elapses. * * @param retentionInterval * Retain all versions for this interval * @param versionAfterInterval * Retain no of versions to retain after retentionIn...
3.26
hbase_ColumnFamilyDescriptorBuilder_setCacheIndexesOnWrite_rdh
/** * Set the setCacheIndexesOnWrite flag * * @param value * true if we should cache index blocks on write * @return this (for chained invocation) */ public ModifyableColumnFamilyDescriptor setCacheIndexesOnWrite(boolean value) { return setValue(CACHE_INDEX_ON_WRITE_BYTES, Boolean.toString(value)); }
3.26
hbase_ColumnFamilyDescriptorBuilder_setCompressionType_rdh
/** * Compression types supported in hbase. LZO is not bundled as part of the hbase distribution. * See See <a href="http://hbase.apache.org/book.html#lzo.compression">LZO Compression</a> for * how to enable it. ...
3.26
hbase_ColumnFamilyDescriptorBuilder_setCompressTags_rdh
/** * Set whether the tags should be compressed along with DataBlockEncoding. When no * DataBlockEncoding is been used, this is having no effect. * * @return this (for chained invocation) */ public ModifyableColumnFamilyDescriptor setCompressTags(boolean compressTags) { return setValue(COMPRESS_TAGS_BYTES, Str...
3.26
hbase_ColumnFamilyDescriptorBuilder_setCacheBloomsOnWrite_rdh
/** * Set the setCacheBloomsOnWrite flag. * * @param value * true if we should cache bloomfilter blocks on write * @return this (for chained invocation) */ public ModifyableColumnFamilyDescriptor setCacheBloomsOnWrite(boolean value) { return setValue(CACHE_BLOOMS_ON_WRITE_BYTES, Boolean.toString(value)); ...
3.26
hbase_ColumnFamilyDescriptorBuilder_setDFSReplication_rdh
/** * Set the replication factor to hfile(s) belonging to this family * * @param replication * number of replicas the blocks(s) belonging to this CF should have, or * {@link #DEFAULT_DFS_REPLICATION} for the default replication factor set in * the filesystem * @return this (for chained invocation) */ publ...
3.26
hbase_ColumnFamilyDescriptorBuilder_setIndexBlockEncoding_rdh
/** * Set index block encoding algorithm used in block cache. * * @param type * What kind of index block encoding will be used. * @return this (for chained invocation) */ public ModifyableColumnFamilyDescriptor setIndexBlockEncoding(IndexBlockEncoding type) { return setValue(INDEX_BLOCK_ENCODING_BYTES, type...
3.26
hbase_ColumnFamilyDescriptorBuilder_setTimeToLive_rdh
/** * Set the time to live * * @param timeToLive * Time-to-live of cell contents, in seconds. * @return this (for chained invocation) * @throws org.apache.hadoop.hbase.exceptions.HBaseException * exception */ public ModifyableColumnFamilyDescriptor setTimeToLive(String timeToLive) throws HBaseException { ...
3.26
hbase_ColumnFamilyDescriptorBuilder_removeConfiguration_rdh
/** * Remove a configuration setting represented by the key from the {@link #configuration} map. * * @return this (for chained invocation) */ public ModifyableColumnFamilyDescriptor removeConfiguration(final String key) { return setConfiguration(key, null); }
3.26
hbase_ColumnFamilyDescriptorBuilder_setVersions_rdh
/** * Set minimum and maximum versions to keep. * * @param minVersions * minimal number of versions * @param maxVersions ...
3.26
hbase_ColumnFamilyDescriptorBuilder_m2_rdh
/** * Set minimum versions to retain. * * @param minVersions * The minimum number of versions to keep. (used when timeToLive is set) * @return this (for chained invocation) */ public ModifyableColumnFamilyDescriptor m2(int minVersions) { return setValue(MIN_VERSIONS_BYTES, Integer.toString(minVersions)); }
3.26
hbase_ColumnFamilyDescriptorBuilder_isLegalColumnFamilyName_rdh
/** * Check if the column family name is legal. * * @param b * Family name. * @return <code>b</code> * @throws IllegalArgumentException * If not null and not a legitimate family name: i.e. 'printable' * and ends in a ':' (Null passes are allowed because * <code>b</code> can be null when deserializing)....
3.26
hbase_ColumnFamilyDescriptorBuilder_setCompactionCompressionType_rdh
/** * Compression types supported in hbase. LZO is not bundled as part of the hbase distribution. * See See <a href="http://hbase.apache.org/book.html#lzo.compression">LZO Compression</a> for * how to enable it. * * @param type * Compression type setting. * @return this (for chained invocation) */ public Modi...
3.26
hbase_ColumnFamilyDescriptorBuilder_setStoragePolicy_rdh
/** * Set the storage policy for use with this family * * @param policy * the policy to set, valid setting includes: <i>"LAZY_PERSIST"</i>, * <i>"ALL_SSD"</i>, <i>"ONE_SSD"</i>, <i>"HOT"</i>, <i>"WARM"</i>, <i>"COLD"</i> * @return this (for chained invocation) */ public ModifyableColumnFamilyDescriptor setS...
3.26
hbase_ColumnFamilyDescriptorBuilder_setPrefetchBlocksOnOpen_rdh
/** * Set the setPrefetchBlocksOnOpen flag * * @param value * true if we should prefetch blocks into the blockcache on open * @return this (for chained invocation) */ public ModifyableColumnFamilyDescriptor setPrefetchBlocksOnOpen(boolean value) { return setValue(PREFETCH_BLOCKS_ON_OPEN_BYTES, Boolean.toStr...
3.26
hbase_ColumnFamilyDescriptorBuilder_setConfiguration_rdh
/** * Setter for storing a configuration setting in {@link #configuration} map. * * @param key * Config key. Same as XML config key e.g. hbase.something.or.other. ...
3.26
hbase_ColumnFamilyDescriptorBuilder_isNewVersionBehavior_rdh
/** * By default, HBase only consider timestamp in versions. So a previous Delete with higher ts * will mask a later Put with lower ts. Set this to true to enable new semantics of versions. We * will also consider mvcc in versions. See HBASE-15968 for details. */ @Override public boolean isNewVersionBehavior() { ...
3.26
hbase_ColumnFamilyDescriptorBuilder_m4_rdh
/** * Sets the mob threshold of the family. * * @param threshold * The mob threshold. * @return this (for chained invocation) */ public ModifyableColumnFamilyDescriptor m4(long threshold) { return setValue(MOB_THRESHOLD_BYTES, String.valueOf(threshold)); }
3.26
hbase_ColumnFamilyDescriptorBuilder_setDataBlockEncoding_rdh
/** * Set data block encoding algorithm used in block cache. * * @param type * What kind of data block encoding will be used. * @return this (for chained invocation) */ public ModifyableColumnFamilyDescriptor setDataBlockEncoding(DataBlockEncoding type) { return setValue(DATA_BLOCK_ENCODING_BYTES, type == n...
3.26
hbase_ColumnFamilyDescriptorBuilder_setInMemory_rdh
/** * Set the inMemory flag * * @param inMemory * True if we are to favor keeping all values for this column family in the * HRegionServer cache * @return this (for chained invocation) */ public ModifyableColumnFamilyDescriptor setInMemory(boolean inMemory) { return setValue(IN_MEMORY_BYTES, Boolean.to...
3.26
hbase_ColumnFamilyDescriptorBuilder_setMobCompactPartitionPolicy_rdh
/** * Set the mob compact partition policy for the family. * * @param policy * policy type * @return this (for chained invocation) */ public ModifyableColumnFamilyDescriptor setMobCompactPartitionPolicy(MobCompactPartitionPolicy policy) { return setValue(MOB_COMPACT_PARTITION_POLICY_BYTES, policy.name()); }
3.26
hbase_ColumnFamilyDescriptorBuilder_setCacheDataOnWrite_rdh
/** * Set the setCacheDataOnWrite flag * * @param value * true if we should cache data blocks on write * @return this (for chained invocation) */ public ModifyableColumnFamilyDescriptor setCacheDataOnWrite(boolean value) { return setValue(CACHE_DATA_ON_WRITE_BYTES, Boolean.toString(value)); }
3.26
hbase_ColumnFamilyDescriptorBuilder_toByteArray_rdh
/** * Returns This instance serialized with pb with pb magic prefix */ private byte[] toByteArray() { return ProtobufUtil.prependPBMagic(ProtobufUtil.toColumnFamilySchema(this).toByteArray()); }
3.26
hbase_ColumnFamilyDescriptorBuilder_setMobEnabled_rdh
/** * Enables the mob for the family. * * @param isMobEnabled * Whether to enable the mob for the family. * @return this (for chained invocation) */ public ModifyableColumnFamilyDescriptor setMobEnabled(boolean isMobEnabled) { return setValue(IS_MOB_BYTES, String.valueOf(isMobEnabled)); }
3.26
hbase_ColumnFamilyDescriptorBuilder_setEncryptionKey_rdh
/** * Set the raw crypto key attribute for the family * * @return this (for chained invocation) */ public ModifyableColumnFamilyDescriptor setEncryptionKey(byte[] keyBytes) { return setValue(ENCRYPTION_KEY_BYTES, new Bytes(keyBytes)); }
3.26
hbase_ColumnFamilyDescriptorBuilder_setMaxVersions_rdh
/** * Set the maximum number of versions to retain. * * @param maxVersions * maximum number of versions * @return this (for chained invocation) */ public ModifyableColumnFamilyDescriptor setMaxVersions(int maxVersions) { if (maxVersions <= 0) { // TODO: Allow maxVersion of 0 to be the way you say "Keep ...
3.26
hbase_ColumnFamilyDescriptorBuilder_setBlockCacheEnabled_rdh
/** * Set the blockCacheEnabled flag * * @param blockCacheEnabled * True if hfile DATA type blocks should be cached (We always cache * INDEX and BLOOM blocks; you cannot turn this off). * @return this (for chained invocation) */ public ModifyableColumnFamilyDescriptor setBlockCacheEnabled(boolean blockCacheE...
3.26
hbase_ColumnFamilyDescriptorBuilder_setEncryptionType_rdh
/** * Set the encryption algorithm for use with this family * * @return this (for chained invocation) */ public ModifyableColumnFamilyDescriptor setEncryptionType(String algorithm) {return setValue(ENCRYPTION_BYTES, algorithm); }
3.26
hbase_ColumnFamilyDescriptorBuilder_parseFrom_rdh
/** * Parse the serialized representation of a {@link ModifyableColumnFamilyDescriptor} * * @param bytes * A pb serialized {@link ModifyableColumnFamilyDescriptor} instance with pb magic * prefix * @return An instance of {@link ModifyableColumnFamilyDescriptor} made from <code>bytes</code> * @see #toByteArra...
3.26
hbase_ClientZKSyncer_start_rdh
/** * Starts the syncer * * @throws KeeperException * if error occurs when trying to create base nodes on client ZK */ public void start() throws KeeperException { LOG.debug("Starting " + getClass().getSimpleName()); this.watcher.registerListener(this); // create base znode on remote ZK ZKUtil.createWithParents...
3.26
hbase_ClientZKSyncer_setDataForClientZkUntilSuccess_rdh
/** * Set data for client ZK and retry until succeed. Be very careful to prevent dead loop when * modifying this method * * @param node * the znode to set on client ZK * @param data * the data to set to client ZK * @throws InterruptedException * if the thread is interrupted during process */ private voi...
3.26
hbase_ClientZKSyncer_upsertQueue_rdh
/** * Update the value of the single element in queue if any, or else insert. * <p/> * We only need to synchronize the latest znode value to client ZK rather than synchronize each * time * * @param data * the data to write to queue */private void upsertQueue(String node, byte[] data) { ZKData zkData = queues...
3.26
hbase_NoOpIndexBlockEncoder_writeRoot_rdh
/** * Writes this chunk into the given output stream in the root block index format. This format is * similar to the {@link HFile} version 1 block index format, except that we store on-disk size of * the block instead of its uncompressed size. * * @param out * the data output stream to write the block index to....
3.26
hbase_NoOpIndexBlockEncoder_writeNonRoot_rdh
/** * Writes the block index chunk in the non-root index block format. This format contains the * number of entries, an index of integer offsets for quick binary search on variable-length * records, and tuples of block offset, on-disk block size, and the first key for each entry. */ private void writeNonRoot(Bloc...
3.26
hbase_InclusiveStopFilter_toByteArray_rdh
/** * Returns The filter serialized using pb */ @Override public byte[] toByteArray() { FilterProtos.InclusiveStopFilter.Builder builder = FilterProtos.InclusiveStopFilter.newBuilder(); if (this.stopRowKey != null) builder.setStopRowKey(UnsafeByteOperations.unsafeWrap(this.stopRowKey)); return bu...
3.26
hbase_InclusiveStopFilter_areSerializedFieldsEqual_rdh
/** * Returns true if and only if the fields of the filter that are serialized are equal to the * corresponding fields in other. Used for testing. */ @Override boolean areSerializedFieldsEqual(Filter o) { if (o == this) { return true; } if (!(o instanceof InclusiveStopFilter)) { return fa...
3.26
hbase_InclusiveStopFilter_parseFrom_rdh
/** * Parse a serialized representation of {@link InclusiveStopFilter} * * @param pbBytes * A pb serialized {@link InclusiveStopFilter} instance * @return An instance of {@link InclusiveStopFilter} made from <code>bytes</code> * @throws DeserializationException * if an error occurred * @see #toByteArray */...
3.26
hbase_CopyOnWriteArrayMap_comparator_rdh
/* Un synchronized read operations. No locking. No waiting No copying. These should all be FAST. */ @Override public Comparator<? super K> comparator() { return keyComparator; }
3.26
hbase_CompactionContext_forceSelect_rdh
/** * Forces external selection to be applied for this compaction. * * @param request * The pre-cooked request with selection and other settings. */ public void forceSelect(CompactionRequestImpl request) { this.request = request; }
3.26
hbase_CellBlockBuilder_createCellScanner_rdh
/** * Create a cell scanner. * * @param codec * to use for cellblock * @param cellBlock * to encode * @return CellScanner to work against the content of <code>cellBlock</code> * @throws IOException * if encoding fails */ public CellScanner createCellScanner(final Codec codec, final CompressionCodec comp...
3.26
hbase_CloneSnapshotProcedure_preCloneSnapshot_rdh
/** * Action before cloning from snapshot. * * @param env * MasterProcedureEnv */ private void preCloneSnapshot(final MasterProcedureEnv env) throws IOException, InterruptedException { if (!getTableName().isSystemTable()) { // Check and update namespace quota final MasterFileSystem mfs = env...
3.26
hbase_CloneSnapshotProcedure_createFilesystemLayout_rdh
/** * Create regions in file system. * * @param env * MasterProcedureEnv */ private List<RegionInfo> createFilesystemLayout(final MasterProcedureEnv env, final TableDescriptor tableDescriptor, final List<RegionInfo> newRegions) throws IOException { return createFsLayout(env, tableDescriptor, newRegions, new ...
3.26
hbase_CloneSnapshotProcedure_createFsLayout_rdh
/** * Create region layout in file system. * * @param env * MasterProcedureEnv */ private List<RegionInfo> createFsLayout(final MasterProcedureEnv env, final TableDescriptor tableDescriptor, List<RegionInfo> newRegions, final CreateHdfsRegions hdfsRegionHandler) throws IOException { final MasterFileSystem m...
3.26
hbase_CloneSnapshotProcedure_postCloneSnapshot_rdh
/** * Action after cloning from snapshot. * * @param env * MasterProcedureEnv */ private void postCloneSnapshot(final MasterProcedureEnv env) throws IOException, InterruptedException { final MasterCoprocessorHost cpHost = env.getMasterCoprocessorHost(); if (cpHost != null) { final RegionInfo[] re...
3.26
hbase_CloneSnapshotProcedure_getRestoreAcl_rdh
/** * Exposed for Testing: HBASE-26462 */ @RestrictedApi(explanation = "Should only be called in tests", link = "", allowedOnPath = ".*/src/test/.*") public boolean getRestoreAcl() { return restoreAcl; }
3.26
hbase_CloneSnapshotProcedure_addRegionsToMeta_rdh
/** * Add regions to hbase:meta table. * * @param env * MasterProcedureEnv */ private void addRegionsToMeta(final MasterProcedureEnv env) throws IOException { newRegions = CreateTableProcedure.addTableToMeta(env, tableDescriptor, newRegions); // TODO: parentsToChildrenPairMap is always empty, which makes...
3.26
hbase_CloneSnapshotProcedure_getMonitorStatus_rdh
/** * Set up monitor status if it is not created. */ private MonitoredTask getMonitorStatus() { if (monitorStatus == null) { monitorStatus = TaskMonitor.get().createStatus((("Cloning snapshot '" + snapshot.getName()) + "' to table ") + getTableName()); } return monitorStatus; }
3.26
hbase_CloneSnapshotProcedure_prepareClone_rdh
/** * Action before any real action of cloning from snapshot. * * @param env * MasterProcedureEnv */ private void prepareClone(final MasterProcedureEnv env) throws IOException {final TableName tableName = getTableName(); if (env.getMasterServices().getTableDescriptors().exists(tableName)) { throw ...
3.26
hbase_ClusterStatusTracker_setClusterDown_rdh
/** * Sets the cluster as down by deleting the znode. * * @throws KeeperException * unexpected zk exception */ public void setClusterDown() throws KeeperException { try { ZKUtil.deleteNode(watcher, watcher.getZNodePaths().clusterStateZNode); } catch (KeeperException.NoNodeException nne) {LOG.warn...
3.26
hbase_ClusterStatusTracker_setClusterUp_rdh
/** * Sets the cluster as up. * * @throws KeeperException * unexpected zk exception */ public void setClusterUp() throws KeeperException { byte[] upData = toByteArray(); try {ZKUtil.createAndWatch(watcher, watcher.getZNodePaths().clusterStateZNode, upData); } catch (KeeperException.NodeExistsExce...
3.26
hbase_TableSchemaModel_getName_rdh
/** * Returns the table name */ @XmlAttribute public String getName() { return name; }
3.26
hbase_TableSchemaModel_getColumns_rdh
/** * Returns the columns */ @XmlElement(name = "ColumnSchema") public List<ColumnSchemaModel> getColumns() { return columns; }
3.26
hbase_TableSchemaModel_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().get...
3.26
hbase_TableSchemaModel___getIsMeta_rdh
// getters and setters for common schema attributes // cannot be standard bean type getters and setters, otherwise this would // confuse JAXB /** * Returns true if IS_META attribute exists and is truel */ public boolean __getIsMeta() { Object o = attrs.get(IS_META); return (o != null) && Boolean.parseBoolean(...
3.26
hbase_TableSchemaModel_setColumns_rdh
/** * * @param columns * the columns to set */ public void setColumns(List<ColumnSchemaModel> columns) { this.columns = columns;}
3.26
hbase_TableSchemaModel_addAttribute_rdh
/** * Add an attribute to the table descriptor * * @param name * attribute name * @param value * attribute value */ @JsonAnySetter public void addAttribute(String name, Object value) { attrs.put(new QName(name), value); }
3.26
hbase_TableSchemaModel_setName_rdh
/** * * @param name * the table name */ public void setName(String name) { this.name = name;}
3.26
hbase_TableSchemaModel___getReadOnly_rdh
/** * Returns true if READONLY attribute exists and is truel */ public boolean __getReadOnly() { Object o = attrs.get(READONLY); return o != null ? Boolean.parseBoolean(o.toString()) : TableDescriptorBuilder.DEFAULT_READONLY; }
3.26
hbase_TableSchemaModel_addColumnFamily_rdh
/** * Add a column family to the table descriptor * * @param family * the column family model */ public void addColumnFamily(ColumnSchemaModel family) { columns.add(family); }
3.26
hbase_TableSchemaModel___setIsMeta_rdh
/** * * @param value * desired value of IS_META attribute */ public void __setIsMeta(boolean value) { attrs.put(IS_META, Boolean.toString(value)); }
3.26
hbase_TableSchemaModel_m0_rdh
/** * Returns true if IS_ROOT attribute exists and is truel */ public boolean m0() { Object o = attrs.get(IS_ROOT); return (o != null) && Boolean.parseBoolean(o.toString()); }
3.26
hbase_TableSchemaModel_getAny_rdh
/** * Returns the map for holding unspecified (user) attributes */ @XmlAnyAttribute @JsonAnyGetter public Map<QName, Object> getAny() { return attrs; }
3.26
hbase_TableSchemaModel_getColumnFamily_rdh
/** * Retrieve the column family at the given index from the table descriptor * * @param index * the index * @return the column family model */ public ColumnSchemaModel getColumnFamily(int index) { return columns.get(index); }
3.26
hbase_TableSchemaModel_getTableDescriptor_rdh
/** * Returns a table descriptor */ @JsonIgnore public TableDescriptor getTableDescriptor() { TableDescriptorBuilder tableDescriptorBuilder = TableDescriptorBuilder.newBuilder(TableName.valueOf(getName())); for (Map.Entry<QName, Object> e : getAny().entrySet()) { tableDescriptorBuilder.setValue(e.ge...
3.26
hbase_TableSchemaModel___setIsRoot_rdh
/** * * @param value * desired value of IS_ROOT attribute */ public void __setIsRoot(boolean value) { attrs.put(IS_ROOT, Boolean.toString(value)); }
3.26
hbase_TableSchemaModel_getAttribute_rdh
/** * Return a table descriptor value as a string. Calls toString() on the object stored in the * descriptor value map. * * @param name * the attribute name * @return the attribute value */ public String getAttribute(String name) { Object o = attrs.get(new QName(name)); return o != null ? o.toString() ...
3.26
hbase_TableSchemaModel___setReadOnly_rdh
/** * * @param value * desired value of READONLY attribute */ public void __setReadOnly(boolean value) { attrs.put(READONLY, Boolean.toString(value)); }
3.26
hbase_TBoundedThreadPoolServer_shutdownServer_rdh
/** * Loop until {@link ExecutorService#awaitTermination} finally does return without an interrupted * exception. If we don't do this, then we'll shut down prematurely. We want to let the executor * service clear its task queue, closing client sockets appropriately. */ private void shutdownServer() { executorSe...
3.26
hbase_TBoundedThreadPoolServer_run_rdh
/** * Loops on processing a client forever */ @Override public void run() { TProcessor processor = null; TTransport inputTransport = null; TTransport outputTransport = null; TProtocol inputProtocol = null; TProtocol outputProtocol = null; try { processor = proce...
3.26
hbase_CheckAndMutateResult_isSuccess_rdh
/** * Returns Whether the CheckAndMutate operation is successful or not */ public boolean isSuccess() { return success; }
3.26
hbase_CheckAndMutateResult_getResult_rdh
/** * Returns It is used only for CheckAndMutate operations with Increment/Append. Otherwise null */ public Result getResult() { return result; }
3.26
hbase_ConnectionSpanBuilder_populateConnectionAttributes_rdh
/** * Static utility method that performs the primary logic of this builder. It is visible to other * classes in this package so that other builders can use this functionality as a mix-in. * * @param attributes * the attributes map to be populated. * @param connectionStringSupplier * the source of the {@code...
3.26
hbase_CreateNamespaceProcedure_prepareCreate_rdh
/** * Action before any real action of creating namespace. * * @param env * MasterProcedureEnv */private boolean prepareCreate(final MasterProcedureEnv env) throws IOException { if (getTableNamespaceManager(env).doesNamespaceExist(nsDescriptor.getName())) { setFailure("master-create-namespace", new NamespaceExis...
3.26