无法访问 mapr 沙箱虚拟机中的 hdfs 文件系统 运行

Cannot access hdfs file system running in mapr sandbox VM

我刚刚在 Virtualbox 中安装了 MapR 沙箱虚拟机 运行。 VM 使用“NAT”网络模式设置,端口转发到我的 Mac。由于端口被转发,我猜我应该能够访问“localhost”上的 hdfs。

现在我正在尝试列出 VM 上的 hdfs 的内容:

$ hadoop fs -fs maprfs://localhost -ls /
15/03/25 15:16:11 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where    applicable
2015-03-25 15:16:11,6646 ERROR Cidcache fs/client/fileclient/cc/cidcache.cc:1586 Thread: 4548153344 MoveToNextCldb: No CLDB entries, cannot run, sleeping 5 seconds!
2015-03-25 15:16:16,6683 ERROR Client fs/client/fileclient/cc/client.cc:813 Thread: 4548153344 Failed to initialize client for cluster localhost:7222, error Connection refused(61)
ls: Could not create FileClient

我也尝试过使用 127.0.0.1、sudo 和最后的端口 :5660 但没有成功。

有什么想法吗?

从 NAT 网络模式更改为主机仅解决了问题。然后,当然我必须使用VM的IP来访问maprfs。

如果你只是 运行 local/single 节点上的普通 Spark 那么你不需要 HDFS,你可以只提到你的输入和输出文件是从本地文件系统加载,如下所示:

file:///pathtoinput
file:///pathtooutput