Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

HDFS API for defining block locations on the disks

HDFS API for defining block locations on the disks

Rising Star

Hi dear experts!

 

i'm wondering is it possible with some HDFS API get block locations on some particular disks?

getFileBlockLocations able to show host only without extra information...

 

thanks!

1 REPLY 1

Re: HDFS API for defining block locations on the disks

Master Guru
You can use the special DistributedFileSystem class API method of
'getFileBlockStorageLocations(…)':
https://github.com/cloudera/hadoop-common/blob/cdh5.4.8-release/hadoop-hdfs-project/hadoop-hdfs/src/...

Impala uses this for improving its read operations, too:
https://github.com/cloudera/Impala/blob/cdh5.4.8-release/fe/src/main/java/com/cloudera/impala/catalo...