Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
HDFS >> mail # user >> Accessing list of blocks on a datanode via Java interface


Copy link to this message
-
Accessing list of blocks on a datanode via Java interface
Hi,
I'm trying to write an agent that will run on a datanode and will scan
blocks on a that datanode.
The logical thing to do is to look in the DataBlockScanner code, which
lists all the blocks on a node, which is what I did.
The problem is that the DataBlockScanner object is instantiated during the
start-up of a DataNode, so a lot of objects needed (like FSDataSet) are
already instantiated.
Then, I tried with DataNode.getDataNode(), but it returned null (needless
to say that the node is up-and-running).
I'd be grateful if you can refer me to the right object or to a a guide.

I'm new in hdfs, so I'm sorry if its a trivial question.

Thanks,
Yaron
+
Harsh J 2012-07-06, 14:58
+
Yaron Gonen 2012-07-06, 17:53
+
Harsh J 2012-07-06, 18:06
+
Yaron Gonen 2012-07-06, 18:58
+
Harsh J 2012-07-07, 01:50
+
Yaron Gonen 2012-07-07, 09:17
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB