Re: Getting a list of all StorageInfo

2015-01-08 Thread Youssef Hatem
Hi Chris, thanks a lot for taking the time answering my question. Skimming through BlockPlacementPolicyDefault helped my a lot; I managed to get DatanodeDescriptor(s) by using Host2NodesMap object. The DatanodeDescriptor contains storage info which I was looking for. Thanks again for your help, I

Re: Getting a list of all StorageInfo

2015-01-07 Thread Chris Nauroth
Hi Youssef, You might want to review the code for BlockPlacementPolicyDefault to get a sense for how an implementation works. Perhaps you could even start your own work by copying and modifying that class. This code would show you how to get ahold of a DatanodeDescriptor and then use it to call

Getting a list of all StorageInfo

2015-01-02 Thread Youssef Hatem
Hi, I am working on implementing a custom placement policy. So I created a class that extends BlockPlacementPolicy. I am trying to get a list of all DatanodeStorageInfo objects in order to be able to decide which one to choose for placement (based on certain criteria), this is the logic of chooseT