Hi, 

I am relatively new to Hadoop and I am trying to utilize HDFS for own
application where I want to take advantage of data partitioning HDFS
performs.

The idea is that I get list of individual blocks - BlockLocations of
particular file and then directly read those (go to individual DataNodes).
So far I found org.apache.hadoop.hdfs.DFSClient.BlockReader to be the way
to go.

However I am struggling with instantiating the BlockReader() class, namely
creating the "Token<BlockTokenIdentifier>".

Is there an example Java code showing how to access individual blocks of
particular file stored on HDFS ?

Thanks in advance,

David.


 


Reply via email to