@Override boolean addStorage(DatanodeStorageInfo storage, Block reportedBlock) { Preconditions.checkArgument(this.getBlockId() == reportedBlock.getBlockId(), "reported blk_%s is different from stored blk_%s", reportedBlock.getBlockId(), this.getBlockId()); // find the last null node int lastNode = ensureCapacity(1); setStorageInfo(lastNode, storage); return true; }
/** * Add a {@link DatanodeStorageInfo} location for a block */ boolean addStorage(DatanodeStorageInfo storage) { // find the last null node int lastNode = ensureCapacity(1); setStorageInfo(lastNode, storage); setNext(lastNode, null); setPrevious(lastNode, null); return true; }
/** * Add a {@link DatanodeStorageInfo} location for a block */ boolean addStorage(DatanodeStorageInfo storage) { // find the last null node int lastNode = ensureCapacity(1); setStorageInfo(lastNode, storage); setNext(lastNode, null); setPrevious(lastNode, null); return true; }