name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hbase_AbstractWALRoller_walRollFinished_rdh
/** * Returns true if all WAL roll finished */ public boolean walRollFinished() { // TODO add a status field of roll in RollController return wals.values().stream().noneMatch(rc -> rc.needsRoll(EnvironmentEdgeManager.currentTime())) && isWaiting(); }
3.26
hbase_MunkresAssignment_starInRow_rdh
/** * Find a starred zero in a specified row. If there are no starred zeroes in the specified row, * then null will be returned. * * @param r * the index of the row to be searched * @return pair of row and column indices of starred zero or null */ private Pair<Integer, Integer> starInRow(int r) { for (int ...
3.26
hbase_MunkresAssignment_updateMin_rdh
/** * A specified row has become covered, and a specified column has become uncovered. The least * value per row may need to be updated. * * @param row * the index of the row which was just covered * @param col * the index of the column which was just uncovered */ private void updateMin(int row, int col) { ...
3.26
hbase_MunkresAssignment_stepThree_rdh
/** * Corresponds to step 3 of the original algorithm. */ private void stepThree() { // Find the minimum uncovered cost. float min = leastInRow[0]; for (int r = 1; r < rows; r++) {if (leastInRow[r] < min) { min = leastInRow[r]; } } // Add the minimum cost to each of the costs i...
3.26
hbase_MunkresAssignment_findUncoveredZero_rdh
/** * Find a zero cost assignment which is not covered. If there are no zero cost assignments which * are uncovered, then null will be returned. * * @return pair of row and column indices of an uncovered zero or null */ private Pair<Integer, Integer> findUncoveredZero() { for (int r = 0; r < rows; r++) { ...
3.26
hbase_MunkresAssignment_solve_rdh
/** * Get the optimal assignments. The returned array will have the same number of elements as the * number of elements as the number of rows in the input cost matrix. Each element will indicate * which column should be assigned to that row or -1 if no column should be assigned, i.e. ...
3.26
hbase_MunkresAssignment_m0_rdh
/** * Corresponds to the "preliminaries" step of the original algorithm. Guarantees that the matrix * is an equivalent non-negative matrix with at least one zero in each row. */ private void m0() { for (int r = 0; r < rows; r++) { // Find the minimum cost of each row. float min = Flo...
3.26
hbase_MunkresAssignment_starInCol_rdh
/** * Find a starred zero in the specified column. If there are no starred zeroes in the specified * row, then null will be returned. * * @param c * the index of the column to be searched * @return pair of row and column indices of starred zero or null ...
3.26
hbase_MunkresAssignment_testIsDone_rdh
/** * Test whether the algorithm is done, i.e. we have the optimal assignment. This occurs when there * is exactly one starred zero in each row. * * @return true if the algorithm is done */ private boolean testIsDone() { // Cover all columns containing a starred zero. There can be at most one // starred ze...
3.26
hbase_MunkresAssignment_stepTwo_rdh
/** * Corresponds to step 2 of the original algorithm. */ private void stepTwo() { // Construct a path of alternating starred zeroes and primed zeroes, where // each starred zero is in the same column as the previous primed zero, and // each primed zero is in the same row as the previous starred zero. The...
3.26
hbase_MunkresAssignment_stepOne_rdh
/** * Corresponds to step 1 of the original algorithm. * * @return false if all zeroes are covered */ private boolean stepOne() { while (true) { Pair<Integer, Integer> zero = findUncoveredZero(); if (zero == null) { // No uncovered zeroes, need to manipulate the cost matrix in ste...
3.26
hbase_BooleanStateStore_set_rdh
/** * Set the flag on/off. * * @param on * true if the flag should be on, false otherwise * @throws IOException * if the operation fails * @return returns the previous state */ public synchronized boolean set(boolean on) throws IOException { byte[] state = toByteArray(on); setState(state); bool...
3.26
hbase_BooleanStateStore_get_rdh
/** * Returns true if the flag is on, otherwise false */ public boolean get() { return on; }
3.26
hbase_OperationStatus_m0_rdh
/** */ public OperationStatusCode m0() { return code; }
3.26
hbase_OperationStatus_getExceptionMsg_rdh
/** */ public String getExceptionMsg() { return exceptionMsg; }
3.26
hbase_WALSplitter_splitWAL_rdh
/** * WAL splitting implementation, splits one WAL file. * * @param walStatus * should be for an actual WAL file. */ SplitWALResult splitWAL(FileStatus walStatus, CancelableProgressable cancel) throws IOException { Path wal = walStatus.getPath(); Preconditions.checkArgument(walStatus.isFile(), "Not a regular fil...
3.26
hbase_WALSplitter_createOutputSinkAndEntryBuffers_rdh
/** * Setup the output sinks and entry buffers ahead of splitting WAL. */ private void createOutputSinkAndEntryBuffers() { PipelineController controller = new PipelineController(); if (this.hfile) { this.entryBuffers = new BoundedEntryBuffers(controller, this.bufferSize); this.outputSink = new BoundedRecoveredHFilesO...
3.26
hbase_WALSplitter_getReader_rdh
/** * Create a new {@link WALStreamReader} for reading logs to split. * * @return new Reader instance, caller should close */ private WALStreamReader getReader(Path curLogFile, CancelableProgressable reporter) throws IOException { return walFactory.createStreamReader(walFS, curLogFile, reporter); }
3.26
hbase_WALSplitter_getNumOpenWriters_rdh
/** * Get current open writers */ private int getNumOpenWriters() { int result = 0; if (this.outputSink != null) { result += this.outputSink.getNumOpenWriters(); } return result; }
3.26
hbase_WALSplitter_split_rdh
/** * Split a folder of WAL files. Delete the directory when done. Used by tools and unit tests. It * should be package private. It is public only because TestWALObserver is in a different package, * which uses this method to do log splitting. * * @return List of output files created by the split. */ public stati...
3.26
hbase_WALSplitter_splitLogFile_rdh
/** * Splits a WAL file. Used by old {@link org.apache.hadoop.hbase.regionserver.SplitLogWorker} and * tests. Not used by new procedure-based WAL splitter. * * @return false if it is interrupted by the progress-able. */ public static boolean splitLogFile(Path walDir, FileStatus logfile, FileSystem walFS, Configura...
3.26
hbase_WALSplitter_createWriter_rdh
/** * Create a new {@link WALProvider.Writer} for writing log splits. * * @return a new Writer instance, caller should close */ protected Writer createWriter(Path logfile) throws IOException { return walFactory.createRecoveredEditsWriter(walFS, logfile); }
3.26
hbase_WALSplitter_checkForErrors_rdh
/** * Check for errors in the writer threads. If any is found, rethrow it. */ void checkForErrors() throws IOException { Throwable thrown = this.thrown.get(); if (thrown == null) { return; } if (thrown instanceof IOException) { throw new IOException(thrown); } else { throw new ...
3.26
hbase_ThriftHBaseServiceHandler_removeScanner_rdh
/** * Removes the scanner associated with the specified ID from the internal HashMap. * * @param id * of the Scanner to remove */ protected void removeScanner(int id) { scannerMap.invalidate(id); }
3.26
hbase_ThriftHBaseServiceHandler_addScanner_rdh
/** * Assigns a unique ID to the scanner and adds the mapping to an internal HashMap. * * @param scanner * to add * @return Id for this Scanner */ private int addScanner(ResultScanner scanner) { int id = nextScannerId.getAndIncrement(); scannerMap.put(id, scanner);return id; }
3.26
hbase_ThriftHBaseServiceHandler_getScanner_rdh
/** * Returns the Scanner associated with the specified Id. * * @param id * of the Scanner to get * @return a Scanner, or null if the Id is invalid */ private ResultScanner getScanner(int id) { return scannerMap.getIfPresent(id); }
3.26
hbase_RawByte_m0_rdh
/** * Write instance {@code val} into buffer {@code buff}. */ public int m0(byte[] buff, int offset, byte val) { return Bytes.putByte(buff, offset, val); }
3.26
hbase_RawByte_decodeByte_rdh
/** * Read a {@code byte} value from the buffer {@code buff}. */ public byte decodeByte(byte[] buff, int offset) { return buff[offset]; }
3.26
hbase_ClusterMetricsBuilder_toOption_rdh
/** * Convert ClusterMetrics.Option to ClusterStatusProtos.Option * * @param option * a ClusterMetrics.Option * @return converted ClusterStatusProtos.Option */ public static Option toOption(ClusterMetrics.Option option) { switch (option) { case HBASE_VERSION : return Option.HBASE_VERSION; case L...
3.26
hbase_ClusterMetricsBuilder_toOptions_rdh
/** * Convert an enum set of ClusterMetrics.Option to a list of ClusterStatusProtos.Option * * @param options * the ClusterMetrics options * @return a list of ClusterStatusProtos.Option */ public static List<ClusterStatusProtos.Option> toOptions(EnumSet<ClusterMetrics.Option> options) { return options.stream()....
3.26
hbase_Strings_domainNamePointerToHostName_rdh
/** * Given a PTR string generated via reverse DNS lookup, return everything except the trailing * period. Example for host.example.com., return host.example.com * * @param dnPtr * a domain name pointer (PTR) string. * @return Sanitized hostname with last period stripped off. */ public static String domainName...
3.26
hbase_Strings_appendKeyValue_rdh
/** * Append to a StringBuilder a key/value. Uses default separators. * * @param sb * StringBuilder to use * @param key * Key to append. * @param value * Value to append. * @param separator * Value to use between key and value. * @param keyValueSeparator * Value to use between key/value sets. * @...
3.26
hbase_Strings_padFront_rdh
/** * Push the input string to the right by appending a character before it, usually a space. * * @param input * the string to pad * @param padding * the character to repeat to the left of the input string * @param length * the desired total length including the padding * @return padding characters + inp...
3.26
hbase_MoveWithAck_isSuccessfulScan_rdh
/** * Tries to scan a row from passed region */ private void isSuccessfulScan(RegionInfo region) throws IOException { Scan scan = new Scan().withStartRow(region.getStartKey()).setRaw(true).setOneRowLimit().setMaxResultSize(1L).setCaching(1).setFilter(new FirstKeyOnlyFilter()).setCacheBlocks(false); try (Table table =...
3.26
hbase_MoveWithAck_isSameServer_rdh
/** * Returns true if passed region is still on serverName when we look at hbase:meta. * * @return true if region is hosted on serverName otherwise false */ private boolean isSameServer(RegionInfo region, ServerName serverName) throws IOException { ServerName serverForRegion = getServerNameForRegion(region, admin, ...
3.26
hbase_MoveWithAck_getServerNameForRegion_rdh
/** * Get servername that is up in hbase:meta hosting the given region. this is hostname + port + * startcode comma-delimited. Can return null * * @return regionServer hosting the given region */ static ServerName getServerNameForRegion(RegionInfo region, Admin admin, Connection conn) throws IOException { if (!a...
3.26
hbase_PersistentIOEngine_getFileSize_rdh
/** * Using Linux command du to get file's real size * * @param filePath * the file * @return file's real size * @throws IOException * something happened like file not exists */ private static long getFileSize(String filePath) throws IOException { DU.setExecCommand(filePath); DU.execute(); Strin...
3.26
hbase_PersistentIOEngine_calculateChecksum_rdh
/** * Using an encryption algorithm to calculate a checksum, the default encryption algorithm is MD5 * * @return the checksum which is convert to HexString * @throws IOException * something happened like file not exists * @throws NoSuchAlgorithmException * no such algorithm */ protected byte[] calculateChec...
3.26
hbase_PersistentIOEngine_verifyFileIntegrity_rdh
/** * Verify cache files's integrity * * @param algorithm * the backingMap persistence path */ protected void verifyFileIntegrity(byte[] persistentChecksum, String algorithm) throws IOException { byte[] calculateChecksum = calculateChecksum(algorithm); if (!Bytes.equals(persistentChecksum, calculateCheck...
3.26
hbase_RingBufferEnvelope_load_rdh
/** * Load the Envelope with {@link RpcCall} * * @param namedQueuePayload * all details of rpc call that would be useful for ring buffer consumers */ public void load(NamedQueuePayload namedQueuePayload) { this.namedQueuePayload = namedQueuePayload; }
3.26
hbase_RingBufferEnvelope_getPayload_rdh
/** * Retrieve current namedQueue payload {@link NamedQueuePayload} available on Envelope and free up * the Envelope * * @return Retrieve rpc log details */ public NamedQueuePayload getPayload() { final NamedQueuePayload v0 = this.namedQueuePayload; this.namedQueuePayload = null; return v0; }
3.26
hbase_MetricsConnection_updateTableMetric_rdh
/** * Report table rpc context to metrics system. */ private void updateTableMetric(String methodName, TableName tableName, CallStats stats, Throwable e) { if (tableMetricsEnabled) { if (methodName != null) { String table = ((tableName != null) && StringUtils.isNotEmpty(tableName.getNameAsString())) ? tableName.getN...
3.26
hbase_MetricsConnection_decrConnectionCount_rdh
/** * Decrement the connection count of the metrics within a scope */ private void decrConnectionCount() { connectionCount.dec(); }
3.26
hbase_MetricsConnection_updateRpc_rdh
/** * Report RPC context to metrics system. */ public void updateRpc(MethodDescriptor method, TableName tableName, Message param, CallStats stats, Throwable e) { int callsPerServer = stats.getConcurrentCallsPerServer(); if (callsPerServer > 0) { concurrentCallsPerServerHi...
3.26
hbase_MetricsConnection_getMetricScope_rdh
/** * scope of the metrics object */ public String getMetricScope() { return scope; }
3.26
hbase_MetricsConnection_getRpcHistograms_rdh
/** * rpcHistograms metric */ public ConcurrentMap<String, Histogram> getRpcHistograms() { return rpcHistograms;}
3.26
hbase_MetricsConnection_getConnectionCount_rdh
/** * Return the connection count of the metrics within a scope */ public long getConnectionCount() { return connectionCount.getCount(); }
3.26
hbase_MetricsConnection_getNumActionsPerServerHist_rdh
/** * numActionsPerServerHist metric */ public Histogram getNumActionsPerServerHist() { return numActionsPerServerHist; }
3.26
hbase_MetricsConnection_addThreadPools_rdh
/** * Add thread pools of additional connections to the metrics */ private void addThreadPools(Supplier<ThreadPoolExecutor> batchPool, Supplier<ThreadPoolExecutor> metaPool) { batchPools.add(batchPool); metaPools.add(metaPool); }
3.26
hbase_MetricsConnection_getMetric_rdh
/** * Get a metric for {@code key} from {@code map}, or create it with {@code factory}. */ private <T> T getMetric(String key, ConcurrentMap<String, T> map, NewMetric<T> factory) { return computeIfAbsent(map, key, () -> factory.newMetric(getClass(), key, scope)); }
3.26
hbase_MetricsConnection_getScope_rdh
/** * Returns the scope for a MetricsConnection based on the configured {@link #METRICS_SCOPE_KEY} or * by generating a default from the passed clusterId and connectionObj's hashCode. * * @param conf * configuration for the connection * @param clusterId * clusterId for the connection * @param connectionObj ...
3.26
hbase_MetricsConnection_getRunnerStats_rdh
/** * runnerStats metric */ public RunnerStats getRunnerStats() { return runnerStats; }
3.26
hbase_MetricsConnection_getMultiTracker_rdh
/** * multiTracker metric */public CallTracker getMultiTracker() { return multiTracker; }
3.26
hbase_MetricsConnection_incrNormalRunners_rdh
/** * Increment the number of normal runner counts. */ public void incrNormalRunners() { this.runnerStats.incrNormalRunners(); }
3.26
hbase_MetricsConnection_getRpcTimers_rdh
/** * rpcTimers metric */ public ConcurrentMap<String, Timer> getRpcTimers() { return rpcTimers; }
3.26
hbase_MetricsConnection_getRpcCounters_rdh
/** * rpcCounters metric */ public ConcurrentMap<String, Counter> getRpcCounters() { return rpcCounters; }
3.26
hbase_MetricsConnection_getPutTracker_rdh
/** * putTracker metric */ public CallTracker getPutTracker() { return putTracker; }
3.26
hbase_MetricsConnection_getScanTracker_rdh
/** * scanTracker metric */ public CallTracker getScanTracker() { return scanTracker; }
3.26
hbase_MetricsConnection_getGetTracker_rdh
/** * getTracker metric */ public CallTracker getGetTracker() { return getTracker; }
3.26
hbase_MetricsConnection_getAppendTracker_rdh
/** * appendTracker metric */ public CallTracker getAppendTracker() { return appendTracker;}
3.26
hbase_MetricsConnection_incrementServerOverloadedBackoffTime_rdh
/** * Update the overloaded backoff time * */ public void incrementServerOverloadedBackoffTime(long time, TimeUnit timeUnit) { overloadedBackoffTimer.update(time, timeUnit); }
3.26
hbase_MetricsConnection_getMetaCacheNumClearRegion_rdh
/** * metaCacheNumClearRegion metric */ public Counter getMetaCacheNumClearRegion() { return metaCacheNumClearRegion; }
3.26
hbase_MetricsConnection_newCallStats_rdh
/** * Produce an instance of {@link CallStats} for clients to attach to RPCs. */ public static CallStats newCallStats() { // TODO: instance pool to reduce GC? return new CallStats(); }
3.26
hbase_MetricsConnection_updateRpcGeneric_rdh
/** * Update call stats for non-critical-path methods */ private void updateRpcGeneric(String methodName, CallStats stats) { getMetric(DRTN_BASE + methodName, rpcTimers, timerFactory).update(stats.getCallTimeMs(), TimeUnit.MILLISECONDS); getMetric(REQ_BASE + methodName, rpcHistograms, histogramFactory).update...
3.26
hbase_MetricsConnection_incrMetaCacheMiss_rdh
/** * Increment the number of meta cache misses. */ public void incrMetaCacheMiss() { metaCacheMisses.inc(); }
3.26
hbase_MetricsConnection_getServerStats_rdh
/** * serverStats metric */ public ConcurrentHashMap<ServerName, ConcurrentMap<byte[], RegionStats>> getServerStats() { return serverStats; }
3.26
hbase_MetricsConnection_incrDelayRunnersAndUpdateDelayInterval_rdh
/** * Increment the number of delay runner counts and update delay interval of delay runner. */ public void incrDelayRunnersAndUpdateDelayInterval(long interval) {this.runnerStats.m0(); this.runnerStats.updateDelayInterval(interval); }
3.26
hbase_MetricsConnection_incrMetaCacheNumClearServer_rdh
/** * Increment the number of meta cache drops requested for entire RegionServer. */ public void incrMetaCacheNumClearServer() { metaCacheNumClearServer.inc(); }
3.26
hbase_MetricsConnection_incrHedgedReadOps_rdh
/** * Increment the number of hedged read that have occurred. */ public void incrHedgedReadOps() { hedgedReadOps.inc(); }
3.26
hbase_MetricsConnection_incrHedgedReadWin_rdh
/** * Increment the number of hedged read returned faster than the original read. */ public void incrHedgedReadWin() { hedgedReadWin.inc(); }
3.26
hbase_MetricsConnection_getHedgedReadWin_rdh
/** * hedgedReadWin metric */ public Counter getHedgedReadWin() { return hedgedReadWin; }
3.26
hbase_MetricsConnection_getHedgedReadOps_rdh
/** * hedgedReadOps metric */ public Counter getHedgedReadOps() { return hedgedReadOps; }
3.26
hbase_MetricsConnection_incrConnectionCount_rdh
/** * Increment the connection count of the metrics within a scope */ private void incrConnectionCount() { connectionCount.inc(); }
3.26
hbase_MetricsConnection_getMetaCacheNumClearServer_rdh
/** * metaCacheNumClearServer metric */ public Counter getMetaCacheNumClearServer() { return metaCacheNumClearServer; }
3.26
hbase_MetricsConnection_incrMetaCacheHit_rdh
/** * Increment the number of meta cache hits. */ public void incrMetaCacheHit() { metaCacheHits.inc(); }
3.26
hbase_MetricsConnection_getIncrementTracker_rdh
/** * incrementTracker metric */ public CallTracker getIncrementTracker() { return incrementTracker; }
3.26
hbase_MetricsConnection_getDeleteTracker_rdh
/** * deleteTracker metric */ public CallTracker getDeleteTracker() { return deleteTracker; }
3.26
hbase_MetricsConnection_incrMetaCacheNumClearRegion_rdh
/** * Increment the number of meta cache drops requested for individual region. */ public void incrMetaCacheNumClearRegion(int count) { metaCacheNumClearRegion.inc(count); }
3.26
hbase_ConnectionRegistryFactory_getRegistry_rdh
/** * Returns The connection registry implementation to use. */ static ConnectionRegistry getRegistry(Configuration conf) {Class<? extends ConnectionRegistry> clazz = conf.getClass(CLIENT_CONNECTION_REGISTRY_IMPL_CONF_KEY, RpcConnectionRegistry.class, ConnectionRegistry.class); return ReflectionUtils.newInstanc...
3.26
hbase_TestingHBaseCluster_create_rdh
/** * Create a {@link TestingHBaseCluster}. You need to call {@link #start()} of the returned * {@link TestingHBaseCluster} to actually start the mini testing cluster. */ static TestingHBaseCluster create(TestingHBaseClusterOption option) { return new TestingHBaseClusterImpl(option); }
3.26
hbase_SaslServerAuthenticationProviders_addProviderIfNotExists_rdh
/** * Adds the given provider into the map of providers if a mapping for the auth code does not * already exist in the map. */ static void addProviderIfNotExists(SaslServerAuthenticationProvider provider, HashMap<Byte, SaslServerAuthenticationProvider> providers) { final byte newProviderAuthCode = provider.getSa...
3.26
hbase_SaslServerAuthenticationProviders_createProviders_rdh
/** * Loads server authentication providers from the classpath and configuration, and then creates * the SaslServerAuthenticationProviders instance. */ static SaslServerAuthenticationProviders createProviders(Configuration conf) { ServiceLoader<SaslServerAuthenticationProvider> loader = ServiceLoader.load(SaslSe...
3.26
hbase_SaslServerAuthenticationProviders_getNumRegisteredProviders_rdh
/** * Returns the number of registered providers. */ public int getNumRegisteredProviders() { return providers.size(); }
3.26
hbase_SaslServerAuthenticationProviders_addExtraProviders_rdh
/** * Adds any providers defined in the configuration. */ static void addExtraProviders(Configuration conf, HashMap<Byte, SaslServerAuthenticationProvider> providers) { for (String implName : conf.getStringCollection(EXTRA_PROVIDERS_KEY)) { Class<?> clz; try { ...
3.26
hbase_SaslServerAuthenticationProviders_getInstance_rdh
/** * Returns a singleton instance of {@link SaslServerAuthenticationProviders}. */ public static SaslServerAuthenticationProviders getInstance(Configuration conf) { SaslServerAuthenticationProviders providers = holder.get(); if (null == providers) { synchronized(holder) { // Someone else ...
3.26
hbase_SaslServerAuthenticationProviders_selectProvider_rdh
/** * Selects the appropriate SaslServerAuthenticationProvider from those available. If there is no * matching provider for the given {@code authByte}, this method will return null. */ public SaslServerAuthenticationProvider selectProvider(byte authByte) { return providers.get(Byte.valueOf(authByte)); }
3.26
hbase_SaslServerAuthenticationProviders_m0_rdh
/** * Removes the cached singleton instance of {@link SaslServerAuthenticationProviders}. */ public static void m0() { synchronized(holder) { holder.set(null); } }
3.26
hbase_SaslServerAuthenticationProviders_getSimpleProvider_rdh
/** * Extracts the SIMPLE authentication provider. */ public SaslServerAuthenticationProvider getSimpleProvider() { Optional<SaslServerAuthenticationProvider> opt = providers.values().stream().filter(p -> p instanceof SimpleSaslServerAuthenticationProvider).findFirst(); if (!opt.isPresent()) { throw new RuntimeEx...
3.26
hbase_RSGroupBasedLoadBalancer_updateClusterMetrics_rdh
// must be called after calling initialize @Override public synchronized void updateClusterMetrics(ClusterMetrics sm) { assert internalBalancer != null; internalBalancer.updateClusterMetrics(sm); }
3.26
hbase_RSGroupBasedLoadBalancer_balanceCluster_rdh
/** * Balance by RSGroup. */ @Override public synchronized List<RegionPlan> balanceCluster(Map<TableName, Map<ServerName, List<RegionInfo>>> loadOfAllTable) throws IOException { if (!isOnline()) { throw new ConstraintException(RSGroupInfoManager.class.getSimpleName() + " is not online, unable to...
3.26
hbase_RSGroupBasedLoadBalancer_filterServers_rdh
/** * Filter servers based on the online servers. * <p/> * servers is actually a TreeSet (see {@link org.apache.hadoop.hbase.rsgroup.RSGroupInfo}), having * its contains()'s time complexity as O(logn), which is good enough. * <p/> * TODO: consider using HashSet to pursue O(1) for contains() throughout the calling...
3.26
hbase_SpaceLimitingException_getViolationPolicy_rdh
/** * Returns the violation policy in effect. * * @return The violation policy in effect. */ public String getViolationPolicy() { return this.policyName; }
3.26
hbase_Get_m1_rdh
/* Accessors */ /** * Set whether blocks should be cached for this Get. * <p> * This is true by default. When true, default settings of the table and family are used (this * will never override caching blocks if the block cache is disabled for that family or entirely). * * @param cacheBlocks * if false, defaul...
3.26
hbase_Get_getMaxResultsPerColumnFamily_rdh
/** * Method for retrieving the get's maximum number of values to return per Column Family * * @return the maximum number of values to fetch per CF */ public int getMaxResultsPerColumnFamily() { return this.storeLimit; }
3.26
hbase_Get_getRow_rdh
/** * Method for retrieving the get's row */ @Override public byte[] getRow() { return this.row; }
3.26
hbase_Get_readVersions_rdh
/** * Get up to the specified number of versions of each column. * * @param versions * specified number of versions for each column * @throws IOException * if invalid number of versions * @return this for invocation chaining */public Get readVersions(int versions) throws IOException { if (versions <= 0)...
3.26
hbase_Get_getMaxVersions_rdh
/** * Method for retrieving the get's maximum number of version * * @return the maximum number of version to fetch for this get */public int getMaxVersions() { return this.maxVersions; }
3.26
hbase_Get_setMaxResultsPerColumnFamily_rdh
/** * Set the maximum number of values to return per row per Column Family * * @param limit * the maximum number of values returned / row / CF * @return this for invocation chaining */public Get setMaxResultsPerColumnFamily(int limit) { this.storeLimit = limit; return this; }
3.26
hbase_Get_numFamilies_rdh
/** * Method for retrieving the number of families to get from * * @return number of families */ public int numFamilies() { return this.familyMap.size(); }
3.26
hbase_Get_hasFamilies_rdh
/** * Method for checking if any families have been inserted into this Get * * @return true if familyMap is non empty false otherwise */ public boolean hasFamilies() { return !this.familyMap.isEmpty(); }
3.26