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.

Getting -find: unknown command while using HDFS find tool

Highlighted

Getting -find: unknown command while using HDFS find tool

New Contributor


Hi,

I am new to Hadooping and in the processing of familiarising with the Hadoop environment.

Currently, I have deployed a 3 node cluster in Openstack. All 3 nodes are running on CentOS 6.4.

I have installed the CDH4 Core services combination using package type installation using CM5 on these machines.

Right now, I am able to create files/dirs and see them replicated across all 3 nodes.

But this method is inefficient when the no. of nodes will eventually be scaled up.

Hence turned to the HDFS find tool to see all file/dir replicas globally on one node.

I am logged in as the root user and sudo su hdfs to execute hadoop fs shell commands.

Whenever I try using the hadoop fs -find <path> replica -3, it gives me an error "-find : unknown command".

I am not sure why this is happening.

Could somebody please help me.

 

Thanks,

Vidya

6 REPLIES 6
Highlighted

Re: Getting -find: unknown command while using HDFS find tool

Explorer

Hey Vidya,

 

"-find" is not currently a command implemented by the FileSystem shell. The command is under active development at HADOOP-8989 and will likely make its way into future versions of Hadoop. Until then, you can see all commands currently implemented by the FileSystem shell in the official HDFS documentation.

 

Regards,
Jeff

Highlighted

Re: Getting -find: unknown command while using HDFS find tool

New Contributor

Thanks Jeff,

 

But is there an alternative solution to check the replication of files/dirs globally on any one node?

 

Re: Getting -find: unknown command while using HDFS find tool

Explorer

Hey Vidya,

 

My apologies, I don't understand what you're trying to do. When I'm looking to learn about the replicas of the blocks of a certain file, I use the fsck command. Perhaps that will help you out?

 

Thanks,
Jeff

Highlighted

Re: Getting -find: unknown command while using HDFS find tool

New Contributor

Thanks Jeff. I was looking for an equivalent fs command for the -find in CDH. For now, will look into the fsck and see if it helps.

Highlighted

Re: Getting -find: unknown command while using HDFS find tool

New Contributor

@hammer wrote:

Hey Vidya,

 

My apologies, I don't understand what you're trying to do. When I'm looking to learn about the replicas of the blocks of a certain file, I use the fsck command. Perhaps that will help you out?

 

Thanks,
Jeff



Thanks Jeff. I was looking for an equivalent fs command for the -find in CDH. For now, will look into the fsck and see if it helps.

Highlighted

Re: Getting -find: unknown command while using HDFS find tool

Master Guru
Apache Hadoop is yet to receive a find tool. Work is in progress to add such a feature, and upon completion, it will be added in a future CDH release: https://issues.apache.org/jira/browse/HADOOP-8989

There are a few 3rd party tools available at the moment though, for example: https://github.com/fsfiii/hadoop-find, which you can perhaps use in the interim.
Don't have an account?
Coming from Hortonworks? Activate your account here