name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hbase_LogRollRegionServerProcedureManager_stop_rdh
/** * Close <tt>this</tt> and all running backup procedure tasks * * @param force * forcefully stop all running tasks * @throws IOException * exception */ @Override public void stop(boolean force) throws IOException { if (!started) { return; } String mode = (force) ? "abruptly" ...
3.26
hbase_TableSnapshotInputFormatImpl_write_rdh
// TODO: We should have ProtobufSerialization in Hadoop, and directly use PB objects instead of // doing this wrapping with Writables. @Override public void write(DataOutput out) throws IOException { TableSnapshotRegionSplit.Builder builder = TableSnapshotRegionSplit.newBuilder().setTable(ProtobufUtil.toTableSchema...
3.26
hbase_TableSnapshotInputFormatImpl_cleanRestoreDir_rdh
/** * clean restore directory after snapshot scan job * * @param job * the snapshot scan job * @param snapshotName * the name of the snapshot to read from * @throws IOException * if an error occurs */ public static void cleanRestoreDir(Job job, String snapshotName) throws IOException { Configuration co...
3.26
hbase_TableSnapshotInputFormatImpl_calculateLocationsForInputSplit_rdh
/** * Compute block locations for snapshot files (which will get the locations for referred hfiles) * only when localityEnabled is true. */ private static List<String> calculateLocationsForInputSplit(Configuration conf, TableDescriptor htd, RegionInfo hri, Path tableDir) throws IOException { return getBestLocations(...
3.26
hbase_TableSnapshotInputFormatImpl_getBestLocations_rdh
/** * This computes the locations to be passed from the InputSplit. MR/Yarn schedulers does not take * weights into account, thus will treat every location passed from the input split as equal. We * do not want to blindly pass all the locations, since we are creating one split per region, and * the region's blocks ...
3.26
hbase_TableSnapshotInputFormatImpl_setInput_rdh
/** * Configures the job to use TableSnapshotInputFormat to read from a snapshot. * * @param conf * the job to configure * @param snapshotName * the name of the snapshot to read from * @param restoreDir * a temporary directory to restore the snapshot into. Current user * should have write permissions t...
3.26
hbase_FilterBase_toString_rdh
/** * Return filter's info for debugging and logging purpose. */ @Override public String toString() { return this.getClass().getSimpleName(); }
3.26
hbase_FilterBase_hasFilterRow_rdh
/** * Filters that never filter by modifying the returned List of Cells can inherit this * implementation that does nothing. {@inheritDoc } */ @Override public boolean hasFilterRow() { return false; }
3.26
hbase_FilterBase_filterRow_rdh
/** * Filters that never filter by rows based on previously gathered state from * {@link #filterCell(Cell)} can inherit this implementation that never filters a row. * {@inheritDoc } */ @Override public boolean filterRow() throws IOException { return false; }
3.26
hbase_FilterBase_transformCell_rdh
/** * By default no transformation takes place {@inheritDoc } */ @Override public Cell transformCell(Cell v) throws IOException { return v; }
3.26
hbase_FilterBase_createFilterFromArguments_rdh
/** * Given the filter's arguments it constructs the filter * <p> * * @param filterArguments * the filter's arguments * @return constructed filter object */ public static Filter createFilterFromArguments(ArrayList<byte[]> filterArguments) { throw new IllegalArgumentException("This method has not been imple...
3.26
hbase_FilterBase_getNextCellHint_rdh
/** * Filters that are not sure which key must be next seeked to, can inherit this implementation * that, by default, returns a null Cell. {@inheritDoc } */ @Override public Cell getNextCellHint(Cell currentCell) throws IOException { return null; }
3.26
hbase_FilterBase_isFamilyEssential_rdh
/** * By default, we require all scan's column families to be present. Our subclasses may be more * precise. {@inheritDoc } */ @Override public boolean isFamilyEssential(byte[] name) throws IOException { return true; }
3.26
hbase_FilterBase_reset_rdh
/** * Filters that are purely stateless and do nothing in their reset() methods can inherit this * null/empty implementation. {@inheritDoc } */ @Override public void reset() throws IOException { }
3.26
hbase_FilterBase_filterRowCells_rdh
/** * Filters that never filter by modifying the returned List of Cells can inherit this * implementation that does nothing. {@inheritDoc } */ @Override public void filterRowCells(List<Cell> ignored) throws IOException { }
3.26
hbase_FilterBase_filterAllRemaining_rdh
/** * Filters that never filter all remaining can inherit this implementation that never stops the * filter early. {@inheritDoc } */ @Override public boolean filterAllRemaining() throws IOException { return false; }
3.26
hbase_ZKSecretWatcher_getKeysParentZNode_rdh
/** * get token keys parent node * * @return token keys parent node */ String getKeysParentZNode() { return keysParentZNode; }
3.26
hbase_ZKSecretWatcher_refreshKeys_rdh
/** * refresh keys */ synchronized void refreshKeys() { try { List<ZKUtil.NodeAndData> nodes = ZKUtil.getChildDataAndWatchForNewChildren(watcher, keysParentZNode); refreshNodes(nodes); } catch (KeeperException ke) { LOG.error(HBaseMarkers.FATAL, "Error reading data from zookeeper", ke); watcher.abort(...
3.26
hbase_SyncReplicationReplayWALRemoteProcedure_truncateWALs_rdh
/** * Only truncate wals one by one when task succeed. The parent procedure will check the first wal * length to know whether this task succeed. */private void truncateWALs(MasterProcedureEnv env) { String firstWal = wals.get(0); try { env.getMasterServices().ge...
3.26
hbase_SchemaLocking_getLocks_rdh
/** * List lock queues. * * @return the locks */ List<LockedResource> getLocks() { List<LockedResource> lockedResources = new ArrayList<>(); addToLockedResources(lockedResources, serverLocks, sn -> sn.getServerName(), LockedResourceType.SERVER);addToLockedResources(lockedResources, namespaceLocks, ...
3.26
hbase_SchemaLocking_clear_rdh
/** * Removes all locks by clearing the maps. Used when procedure executor is stopped for failure and * recovery testing. */ void clear() { serverLocks.clear(); namespaceLocks.clear(); tableLocks.clear(); regionLocks.clear(); peerLocks.clear(); }
3.26
hbase_BlockCacheKey_getHfileName_rdh
// can't avoid this unfortunately /** * Returns The hfileName portion of this cache key */ public String getHfileName() { return hfileName; }
3.26
hbase_RandomQueueBalancer_getQueues_rdh
/** * Exposed for use in tests */ List<BlockingQueue<CallRunner>> getQueues() { return queues; }
3.26
hbase_AtomicUtils_updateMin_rdh
/** * Updates a AtomicLong which is supposed to maintain the minimum values. This method is not * synchronized but is thread-safe. */ public static void updateMin(AtomicLong min, long value) {while (true) { long cur = min.get(); if (value >= cur) { break; }if (min.compareAndSet(...
3.26
hbase_AtomicUtils_updateMax_rdh
/** * Updates a AtomicLong which is supposed to maintain the maximum values. This method is not * synchronized but is thread-safe. */ public static void updateMax(AtomicLong max, long value) { while (true) { long cur = max.get(); if (value <= cur) { break; } if (max.co...
3.26
hbase_Segment_tailSet_rdh
/** * Returns a subset of the segment cell set, which starts with the given cell * * @param firstCell * a cell in the segment * @return a subset of the segment cell set, which starts with the given cell */ protected SortedSet<Cell> tailSet(Cell firstCell) { return getCellSet().tailSet(firstCell); }
3.26
hbase_Segment_getScanner_rdh
/** * Creates the scanner for the given read point * * @return a scanner for the given read point */ protected KeyValueScanner getScanner(long readPoint) { return new SegmentScanner(this, readPoint); }
3.26
hbase_Segment_getCellSet_rdh
/** * Returns a set of all cells in the segment */ protected CellSet getCellSet() { return cellSet.get(); }
3.26
hbase_Segment_maybeCloneWithAllocator_rdh
/** * If the segment has a memory allocator the cell is being cloned to this space, and returned; * otherwise the given cell is returned When a cell's size is too big (bigger than maxAlloc), it * is not allocated on MSLAB. Since the process of flattening to CellChunkMap assumes that all * cells are allocated on MSL...
3.26
hbase_Segment_isEmpty_rdh
/** * Returns whether the segment has any cells */ public boolean isEmpty() { return getCellSet().isEmpty(); }
3.26
hbase_Segment_dump_rdh
// Debug methods /** * Dumps all cells of the segment into the given log */ void dump(Logger log) { for (Cell cell : getCellSet()) { log.debug(Objects.toString(cell)); } }
3.26
hbase_Segment_getCellLength_rdh
/** * Get cell length after serialized in {@link KeyValue} */ static int getCellLength(Cell cell) { return cell.getSerializedSize(); }
3.26
hbase_Segment_setCellSet_rdh
/** * Setting the CellSet of the segment - used only for flat immutable segment for setting immutable * CellSet after its creation in immutable segment constructor * * @return this object */ protected Segment setCellSet(CellSet cellSetOld, CellSet cellSetNew) { this.cellSet.compareAndSet(cellSetOld, cellSetNew...
3.26
hbase_Segment_last_rdh
// *** Methods for SegmentsScanner public Cell last() { return getCellSet().last();}
3.26
hbase_Segment_getComparator_rdh
/** * Returns the Cell comparator used by this segment * * @return the Cell comparator used by this segment */ protected CellComparator getComparator() { return comparator; }
3.26
hbase_Segment_close_rdh
/** * Closing a segment before it is being discarded */ public void close() {if (this.memStoreLAB != null) { this.memStoreLAB.close(); } // do not set MSLab to null as scanners may still be reading the data here and need to decrease // the counter when they finish }
3.26
hbase_ClassSize_sizeOf_rdh
/** * Calculate the memory consumption (in byte) of a byte array, including the array header and the * whole backing byte array. If the whole byte array is occupied (not shared with other objects), * please use this function. If not, please use {@link #sizeOfByteArray(int)} instead. * * @param b * the byte arra...
3.26
hbase_ClassSize_align_rdh
/** * Aligns a number to 8. * * @param num * number to align to 8 * @return smallest number &gt;= input that is a multiple of 8 */ public static long align(long num) { return memoryLayout.align(num); }
3.26
hbase_ClassSize_estimateBaseFromCoefficients_rdh
/** * Estimate the static space taken up by a class instance given the coefficients returned by * getSizeCoefficients. * * @param coeff * the coefficients * @param debug * debug flag * @return the size estimate, in bytes */ private static long estimateBaseFromCoefficients(int[] coeff, boolean debug) { ...
3.26
hbase_ClassSize_oopSize_rdh
/** * Return the size of an "ordinary object pointer". Either 4 or 8, depending on 32/64 bit, and * CompressedOops */ int oopSize() { return is32BitJVM() ? 4 : 8; }
3.26
hbase_ClassSize_sizeOfByteArray_rdh
/** * Calculate the memory consumption (in byte) of a part of a byte array, including the array * header and the part of the backing byte array. This function is used when the byte array backs * multiple objects. For example, in {@link org.apache.hadoop.hbase.KeyValue}, multiple KeyValue * objects share a same back...
3.26
hbase_ClassSize_estimateBase_rdh
/** * Estimate the static space taken up by the fields of a class. This includes the space taken up * by by references (the pointer) but not by the referenced object. So the estimated size of an * array field does not depend on the size of the array. Similarly the size of an object * (reference) field does not depe...
3.26
hbase_ByteBuff_toBytes_rdh
/** * Copy the content from this ByteBuff to a byte[]. */ public byte[] toBytes() { return toBytes(0, this.limit()); }
3.26
hbase_ByteBuff_checkRefCount_rdh
/** * ************************* Methods for reference count ********************************* */ /** * Checks that there are still references to the buffer. This protects against the case where a * ByteBuff method (i.e. slice, get, etc) could be called against a buffer whose backing data may * have been released. ...
3.26
hbase_ByteBuff_readLong_rdh
/** * Read long which was written to fitInBytes bytes and increment position. * * @param fitInBytes * In how many bytes given long is stored. * @return The value of parsed long. */ public static long readLong(ByteBuff in, final int fitInBytes) { long tmpLength = 0;for (int i = 0; i < fitInBytes; ++i) { ...
3.26
hbase_ByteBuff_readCompressedInt_rdh
/** * Read integer from ByteBuff coded in 7 bits and increment position. */ public static int readCompressedInt(ByteBuff buf) { byte b = buf.get(); if ((b & ByteBufferUtils.NEXT_BIT_MASK) != 0) { return (b & ByteBufferUtils.VALUE_MASK) + (readCompressedInt(buf) << ByteBufferUtils.NEXT_BIT_SHIFT); ...
3.26
hbase_ByteBuff_wrap_rdh
// Make this private because we don't want to expose the refCnt related wrap method to upstream. private static ByteBuff wrap(ByteBuffer buffer, RefCnt refCnt) { return new SingleByteBuff(refCnt, buffer); }
3.26
hbase_ByteBuff_read_rdh
// static helper methods public static int read(ReadableByteChannel channel, ByteBuffer buf, long offset, ChannelReader reader) throws IOException { if (buf.remaining() <= NIO_BUFFER_LIMIT) { return reader.read(channel, buf, offset); } int originalLimit = buf.limit(); int initialRemaining = b...
3.26
hbase_ByteBuff_touch_rdh
/** * Calling this method in strategic locations where ByteBuffs are referenced may help diagnose * potential buffer leaks. We pass the buffer itself as a default hint, but one can use * {@link #touch(Object)} to pass their own hint as well. */ @Override public ByteBuff touch() { return touch(this); }
3.26
hbase_CreateTableProcedure_addRegionsToMeta_rdh
/** * Add the specified set of regions to the hbase:meta table. */ private static void addRegionsToMeta(final MasterProcedureEnv env, final TableDescriptor tableDescriptor, final List<RegionInfo> regionInfos) throws IOException { MetaTableAccessor.addRegionsToMeta(env.getMasterServices().getConnection(), regionInfos...
3.26
hbase_WALCoprocessorHost_preWALRoll_rdh
/** * Called before rolling the current WAL * * @param oldPath * the path of the current wal that we are replacing * @param newPath * the path of the wal we are going to create */ public void preWALRoll(Path oldPath, Path newPath) throws IOException { execOperatio...
3.26
hbase_WALCoprocessorHost_postWALRoll_rdh
/** * Called after rolling the current WAL * * @param oldPath * the path of the wal that we replaced * @param newPath * the path of the wal we have created and now is the current */ public void postWALRoll(Path oldPath, Path newPath) throws IOException { execOperation(coprocEnvironments.isEmpty() ? null : ...
3.26
hbase_ReplicationPeers_getAllPeerIds_rdh
/** * Returns the set of peerIds of the clusters that have been connected and have an underlying * ReplicationPeer. * * @return a Set of Strings for peerIds */ public Set<String> getAllPeerIds() { return Collections.unmodifiableSet(peerCache.keySet()); }
3.26
hbase_ReplicationPeers_getPeer_rdh
/** * Returns the ReplicationPeerImpl for the specified cached peer. This ReplicationPeer will * continue to track changes to the Peer's state and config. This method returns null if no peer * has been cached with the given peerId. * * @param peerId * id for the peer * @return ReplicationPeer object */ public...
3.26
hbase_ReplicationPeers_createPeer_rdh
/** * Helper method to connect to a peer * * @param peerId * peer's identifier * @return object representing the peer */ private ReplicationPeerImpl createPeer(String peerId) throws ReplicationException { ReplicationPeerConfig peerConfig = peerStorage.getPeerConfig(peerId); boolean enabled = peerStora...
3.26
hbase_ReplicationPeers_addPeer_rdh
/** * Method called after a peer has been connected. It will create a ReplicationPeer to track the * newly connected cluster. * * @param peerId * a short that identifies the cluster * @return whether a ReplicationPeer was successfully created * @throws ReplicationException ...
3.26
hbase_ProcedureManagerHost_loadUserProcedures_rdh
/** * Load system procedures. Read the class names from configuration. Called by constructor. */ protected void loadUserProcedures(Configuration conf, String confKey) { Class<?> implClass = null; // load default procedures from configure file String[] defaultProcClasses = conf.getStrings(confKey); ...
3.26
hbase_ProcedureManagerHost_register_rdh
// Register a procedure manager object public void register(E obj) { procedures.add(obj);}
3.26
hbase_FastDiffDeltaEncoder_decompressFirstKV_rdh
/** * Copies the first key/value from the given stream, and initializes decompression state based * on it. Assumes that we have already read key and value lengths. Does not set * {@link #qualifierLength} (not used by decompression) or {@link #prevOffset} (set by the calle * afterwards). */ private void decompressF...
3.26
hbase_OrderedFloat64_encodeDouble_rdh
/** * Write instance {@code val} into buffer {@code dst}. * * @param dst * the {@link PositionedByteRange} to write to * @param val * the value to write to {@code dst} * @return the number of bytes written */ public int encodeDouble(PositionedByteRange dst, double val) { return OrderedBytes.encodeFloat6...
3.26
hbase_OrderedFloat64_decodeDouble_rdh
/** * Read a {@code double} value from the buffer {@code src}. * * @param src * the {@link PositionedByteRange} to read the {@code double} from * @return the {@code double} floating-point value with the same bit pattern */ public double decodeDouble(PositionedByteRange src) { return OrderedBytes.decodeFloat...
3.26
hbase_BitSetNode_getBitmapIndex_rdh
// ======================================================================== // Bitmap Helpers // ======================================================================== private int getBitmapIndex(final long procId) { return ((int) (procId - start)); }
3.26
hbase_BitSetNode_getActiveMinProcId_rdh
// ======================================================================== // Min/Max Helpers // ======================================================================== public long getActiveMinProcId() {long minProcId = start; for (int i = 0; i < deleted.length; ++i) { if (deleted[i] == 0) { return minProcId; } if...
3.26
hbase_BitSetNode_m2_rdh
// ======================================================================== // Helpers // ======================================================================== /** * Returns upper boundary (aligned to multiple of BITS_PER_WORD) of bitmap range x belongs to. */ private static long m2(final long x) { return (x + (...
3.26
hbase_BitSetNode_getEnd_rdh
/** * Inclusive. */ public long getEnd() { return (start + (modified.length << ADDRESS_BITS_PER_WORD)) - 1; }
3.26
hbase_BitSetNode_convert_rdh
/** * Convert to * org.apache.hadoop.hbase.protobuf.generated.ProcedureProtos.ProcedureStoreTracker.TrackerNode * protobuf. */ public TrackerNode convert() { ProcedureProtos.ProcedureStoreTracker.TrackerNode.Builder builder = ProcedureStoreTracker.TrackerNode.newBuilder(); builder.setStartId(start); for (int i = ...
3.26
hbase_BitSetNode_canGrow_rdh
// ======================================================================== // Grow/Merge Helpers // ======================================================================== public boolean canGrow(long procId) {if (procId <= start) { return (getEnd() - procId) < MAX_NODE_SIZE; } else { return (procId - start) < MAX_NOD...
3.26
hbase_BitSetNode_isAllModified_rdh
/** * Returns true, if all the procedures has been modified. */ public boolean isAllModified() { // TODO: cache the value for (int i = 0; i < modified.length; ++i) { if ((modified[i] | deleted[i]) != WORD_MASK) { return false; } } return true; }
3.26
hbase_BitSetNode_isEmpty_rdh
/** * Returns true, if there are no active procedures in this BitSetNode, else false. */ public boolean isEmpty() { // TODO: cache the value for (int i = 0; i < deleted.length; ++i) { if (deleted[i] != WORD_MASK) { return false; } } return true; }
3.26
hbase_BitSetNode_getActiveProcIds_rdh
/** * Returns all the active procedure ids in this bit set. */ public long[] getActiveProcIds() { List<Long> procIds = new ArrayList<>(); for (int wordIndex = 0; wordIndex < modified.length; wordIndex++) { if ((deleted[wordIndex] == WORD_MASK) || (modified[wordIndex] == 0)) { // This should be the common case, wh...
3.26
hbase_BitSetNode_alignDown_rdh
/** * Returns lower boundary (aligned to multiple of BITS_PER_WORD) of bitmap range x belongs to. */ private static long alignDown(final long x) { return x & (-BITS_PER_WORD); }
3.26
hbase_CompositeImmutableSegment_incMemStoreSize_rdh
/** * Updates the heap size counter of the segment by the given delta */@Override public long incMemStoreSize(long delta, long heapOverhead, long offHeapOverhead, int cellsCount) { throw new IllegalStateException("Not supported by CompositeImmutableScanner"); }
3.26
hbase_CompositeImmutableSegment_getCellsCount_rdh
/** * Returns number of cells in segment */ @Override public int getCellsCount() { int result = 0; for (ImmutableSegment s : segments) { result += s.getCellsCount(); } return result; }
3.26
hbase_CompositeImmutableSegment_tailSet_rdh
/** * Returns a subset of the segment cell set, which starts with the given cell * * @param firstCell * a cell in the segment * @return a subset of the segment cell set, which starts with the given cell */ @Override protected SortedSet<Cell> tailSet(Cell firstCell) { throw new IllegalStateException("Not sup...
3.26
hbase_CompositeImmutableSegment_close_rdh
/** * Closing a segment before it is being discarded */ @Override public void close() { for (ImmutableSegment s : segments) { s.close(); } }
3.26
hbase_CompositeImmutableSegment_getHeapSize_rdh
/** * Returns The heap size of this segment. */ @Override public long getHeapSize() { long result = 0; for (ImmutableSegment s : segments) { result += s.getHeapSize(); } return result; }
3.26
hbase_CompositeImmutableSegment_getScanner_rdh
/** * Creates the scanner for the given read point * * @return a scanner for the given read point */ @Override public KeyValueScanner getScanner(long readPoint) { throw new IllegalStateException("Not supported by CompositeImmutableScanner"); }
3.26
hbase_CompositeImmutableSegment_maybeCloneWithAllocator_rdh
/** * If the segment has a memory allocator the cell is being cloned to this space, and returned; * otherwise the given cell is returned * * @return either the given cell or its clone */ @Override public Cell maybeCloneWithAllocator(Cell cell, boolean forceCloneOfBigCell) { throw new IllegalStateException("Not...
3.26
hbase_CompositeImmutableSegment_getCellSet_rdh
/** * Returns a set of all cells in the segment */ @Override protected CellSet getCellSet() { throw new IllegalStateException("Not supported by CompositeImmutableScanner");}
3.26
hbase_CompositeImmutableSegment_getDataSize_rdh
/** * Returns Sum of all cell sizes. */ @Override public long getDataSize() { return this.keySize; }
3.26
hbase_CompositeImmutableSegment_last_rdh
// *** Methods for SegmentsScanner @Override public Cell last() { throw new IllegalStateException("Not supported by CompositeImmutableScanner"); }
3.26
hbase_CompositeImmutableSegment_dump_rdh
// Debug methods /** * Dumps all cells of the segment into the given log */ @Override void dump(Logger log) { for (ImmutableSegment v9 : segments) { v9.dump(log); } }
3.26
hbase_CompositeImmutableSegment_m0_rdh
/** * Returns whether the segment has any cells */ @Override public boolean m0() { for (ImmutableSegment s : segments) { if (!s.isEmpty()) return false; } return true; }
3.26
hbase_CompositeImmutableSegment_setCellSet_rdh
/** * Setting the CellSet of the segment - used only for flat immutable segment for setting immutable * CellSet after its creation in immutable segment constructor * * @return this object */ @Override protected CompositeImmutableSegment setCellSet(CellSet cellSetOld, CellSet cellSetNew) { throw new IllegalStat...
3.26
hbase_ObjectPool_get_rdh
/** * Returns a shared object associated with the given {@code key}, which is identified by the * {@code equals} method. * * @throws NullPointerException * if {@code key} is {@code null} */ public V get(K key) { Reference<V> ref = referenceCache.get(Objects.requireNonNull(key...
3.26
hbase_ObjectPool_purge_rdh
/** * Removes stale references of shared objects from the pool. References newly becoming stale may * still remain. * <p/> * The implementation of this method is expected to be lightweight when there is no stale * reference with the Oracle (Sun) implementation of {@code ReferenceQueue}, because * {@code Reference...
3.26
hbase_ObjectPool_size_rdh
/** * Returns an estimated count of objects kept in the pool. This also counts stale references, and * you might want to call {@link #purge()} beforehand. */ public int size() { return referenceCache.size(); }
3.26
hbase_IdentityTableReduce_reduce_rdh
/** * No aggregation, output pairs of (key, record) */ public void reduce(ImmutableBytesWritable key, Iterator<Put> values, OutputCollector<ImmutableBytesWritable, Put> output, Reporter reporter) throws IOException { while (values.hasNext()) { output.collect(key, values.next()); } }
3.26
hbase_ZKProcedureMemberRpcs_sendMemberAcquired_rdh
/** * This attempts to create an acquired state znode for the procedure (snapshot name). It then * looks for the reached znode to trigger in-barrier execution. If not present we have a watcher, * if present then trigger the in-barrier action. */ @Override public void sendMemberAcquired(Subprocedure sub) throws IOEx...
3.26
hbase_ZKProcedureMemberRpcs_sendMemberAborted_rdh
/** * This should be called by the member and should write a serialized root cause exception as to * the abort znode. */@Override public void sendMemberAborted(Subprocedure sub, ForeignException ee) { if (sub == null) { LOG.error("Failed due to null subprocedure", ee); return; } String procName ...
3.26
hbase_ZKProcedureMemberRpcs_m0_rdh
/** * Kick off a new sub-procedure on the listener with the data stored in the passed znode. * <p> * Will attempt to create the same procedure multiple times if an procedure znode with the same * name is created. It is left up the coordinator to ensure this doesn't occur. * * @param pa...
3.26
hbase_ZKProcedureMemberRpcs_receivedReachedGlobalBarrier_rdh
/** * Pass along the procedure global barrier notification to any listeners * * @param path * full znode path that cause the notification */ private void receivedReachedGlobalBarrier(String path) { LOG.debug("Received reached global barrier:" + path); String procName = ZKUtil.getNodeName(path); this....
3.26
hbase_ZKProcedureMemberRpcs_sendMemberCompleted_rdh
/** * This acts as the ack for a completed procedure */ @Override public void sendMemberCompleted(Subprocedure sub, byte[] data) throws IOException { String procName = sub.getName(); LOG.debug(((("Marking procedure '" + procName) + "' completed for member '") + memberName) + "' in zk"); String joinPath ...
3.26
hbase_SlowLogPersistentService_addAllLogsToSysTable_rdh
/** * Poll from queueForSysTable and insert 100 records in hbase:slowlog table in single batch */ public void addAllLogsToSysTable(Connection connection) { if (queueForSysTable == null) { f0.trace("hbase.regionserver.slowlog.systable.enabled is turned off. E...
3.26
hbase_AuthenticationFilterInitializer_initFilter_rdh
/** * Initializes hadoop-auth AuthenticationFilter. * <p> * Propagates to hadoop-auth AuthenticationFilter configuration all Hadoop configuration * properties prefixed with "hadoop.http.authentication." * * @param container * The filter container * @param conf * Configuration for run-time parameters */@Ov...
3.26
hbase_JVMClusterUtil_getRegionServer_rdh
/** * Returns the region server */ public HRegionServer getRegionServer() { return this.regionServer; }
3.26
hbase_JVMClusterUtil_shutdown_rdh
/** */ public static void shutdown(final List<MasterThread> masters, final List<RegionServerThread> regionservers) { LOG.debug("Shutting down HBase Cluster");if (masters != null) { // Do backups first. JVMClusterUtil.MasterThread activeMaster = null; for (JVMClusterUtil.MasterThread t : masters) { // Master was ki...
3.26
hbase_JVMClusterUtil_createRegionServerThread_rdh
/** * Creates a {@link RegionServerThread}. Call 'start' on the returned thread to make it run. * * @param c * Configuration to use. * @param hrsc * Class to create. * @param index * Used distinguishing the object returned. * @return Region server added. */ public static JVMClusterUtil.RegionServerThrea...
3.26
hbase_JVMClusterUtil_waitForServerOnline_rdh
/** * Block until the region server has come online, indicating it is ready to be used. */ public void waitForServerOnline() { // The server is marked online after the init method completes inside of // the HRS#run method. HRS#init can fail for whatever region. In those // cases, we'll jump out of the run...
3.26
hbase_JVMClusterUtil_createMasterThread_rdh
/** * Creates a {@link MasterThread}. Call 'start' on the returned thread to make it run. * * @param c * Configuration to use. * @param hmc * Class to create. * @param index * Used distinguishing the object returned. * @return Master added. */public static JVMClusterUtil.MasterThread createMasterThread(...
3.26