List of usage examples for org.apache.hadoop.hdfs.util LightWeightLinkedSet LightWeightLinkedSet
public LightWeightLinkedSet()
From source file:io.hops.metadata.blockmanagement.ExcessReplicasMap.java
License:Apache License
public LightWeightLinkedSet<Block> get(String dn) throws IOException { Collection<ExcessReplica> excessReplicas = getExcessReplicas(datanodeManager.getDatanode(dn).getSId()); if (excessReplicas == null) { return null; }/*from w w w. j av a2s . c o m*/ LightWeightLinkedSet<Block> excessBlocks = new LightWeightLinkedSet<Block>(); for (ExcessReplica er : excessReplicas) { //FIXME: [M] might need to get the blockinfo from the db, but for now we don't need it excessBlocks.add(new Block(er.getBlockId())); } return excessBlocks; }