错误:找不到或加载主类fs [英] Error : Could not find or load main class fs

查看:97
本文介绍了错误:找不到或加载主类fs的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用以下命令创建目录:

I am trying create a directory with the below commands:

  1. hadoop fs -mkdir示例

hadoop fs -mkdir/user/cloudera/sample1

无论哪种方式,我都会收到错误消息:

Either way i receive the error:

找不到或加载主类fs

Could not find or load main class fs

如何解决此问题?

推荐答案

两个 Stack Overflow帖子说明 hadoop fs hadoop dfs 命令已被弃用,并且已经使用了一段时间.

These two Stack Overflow posts illustrate that the hadoop fs and hadoop dfs commands are deprecated and have been for some time.

理想情况下,您应该改用 hdfs dfs .如Ramya B所述,您需要成为 hdfs 用户,才能使用这种类型的命令并确保关闭安全模式.如果您拥有Ambari,则可以轻松访问NameNode UI来检查是否存在这种情况.

Ideally you should be using hdfs dfs instead. As Ramya B states, you need to become the hdfs user in order to use this type of command and ensure that safe mode is turned off. If you have Ambari, you can easily access the NameNode UI to check that this isn't the case.

用法:

hdfs dfs -mkdir [hdfs位置]

我认为出现错误的原因是因为 hadoop fs 不再是可用于在HDFS上执行文件系统更改的命令.

I would assume that the reason you're getting an error is because hadoop fs is no longer a command you can use to execute filesystem changes on HDFS.

这篇关于错误:找不到或加载主类fs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆