|
@@ -47,18 +47,6 @@ public class BlockInfoContiguous extends BlockInfo {
|
|
|
this.setBlockCollection(from.getBlockCollection());
|
|
|
}
|
|
|
|
|
|
- public BlockCollection getBlockCollection() {
|
|
|
- return bc;
|
|
|
- }
|
|
|
-
|
|
|
- public void setBlockCollection(BlockCollection bc) {
|
|
|
- this.bc = bc;
|
|
|
- }
|
|
|
-
|
|
|
- public boolean isDeleted() {
|
|
|
- return (bc == null);
|
|
|
- }
|
|
|
-
|
|
|
public DatanodeDescriptor getDatanode(int index) {
|
|
|
DatanodeStorageInfo storage = getStorageInfo(index);
|
|
|
return storage == null ? null : storage.getDatanodeDescriptor();
|
|
@@ -70,32 +58,6 @@ public class BlockInfoContiguous extends BlockInfo {
|
|
|
return (DatanodeStorageInfo)triplets[index*3];
|
|
|
}
|
|
|
|
|
|
- private BlockInfoContiguous getPrevious(int index) {
|
|
|
- assert this.triplets != null : "BlockInfo is not initialized";
|
|
|
- assert index >= 0 && index*3+1 < triplets.length : "Index is out of bound";
|
|
|
- BlockInfoContiguous info = (BlockInfoContiguous)triplets[index*3+1];
|
|
|
- assert info == null ||
|
|
|
- info.getClass().getName().startsWith(BlockInfoContiguous.class.getName()) :
|
|
|
- "BlockInfo is expected at " + index*3;
|
|
|
- return info;
|
|
|
- }
|
|
|
-
|
|
|
- BlockInfoContiguous getNext(int index) {
|
|
|
- assert this.triplets != null : "BlockInfo is not initialized";
|
|
|
- assert index >= 0 && index*3+2 < triplets.length : "Index is out of bound";
|
|
|
- BlockInfoContiguous info = (BlockInfoContiguous)triplets[index*3+2];
|
|
|
- assert info == null || info.getClass().getName().startsWith(
|
|
|
- BlockInfoContiguous.class.getName()) :
|
|
|
- "BlockInfo is expected at " + index*3;
|
|
|
- return info;
|
|
|
- }
|
|
|
-
|
|
|
- private void setStorageInfo(int index, DatanodeStorageInfo storage) {
|
|
|
- assert this.triplets != null : "BlockInfo is not initialized";
|
|
|
- assert index >= 0 && index*3 < triplets.length : "Index is out of bound";
|
|
|
- triplets[index*3] = storage;
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* Return the previous block on the block list for the datanode at
|
|
|
* position index. Set the previous block on the list to "to".
|