gpt4 book ai didi

rhdfs - RJavaTools 将数据集写入 hdfs 时出错

转载 作者:可可西里 更新时间:2023-11-01 15:38:17 25 4
gpt4 key购买 nike

我在 hadoop 的 hortonworks 沙箱版本上运行 rStudio Server。我加载了 rhdfs 包,但是当我尝试使用 hdfs.put() 命令将数据集写入 hdfs 时,我收到以下错误:

hdfs.put(mtcars,"/user/root")
Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, :
java.io.IOException: File c(21, 21, 22.8, 21.4, 18.7, 18.1, 14.3, 24.4, 22.8, 19.2, 17.8, 16.4, 17.3, 15.2, 10.4, 10.4, 14.7, 32.4, 30.4, 33.9, 21.5, 15.5, 15.2, 13.3, 19.2, 27.3, 26, 30.4, 15.8, 19.7, 15, 21.4) does not exist

有人遇到过这个问题吗?我假设它与在 64 位操作系统上使用 32 位版本的 Java 有关。非常感谢任何建议

最佳答案

虽然现在回答为时已晚,但我想人们可能会觉得这很有用。

rhdfs 包的命令'hdfs.put' 可用于将文件从本地文件系统传输到HDFS。在这种情况下,mtcars 内置于 R 数据帧中,必须先将其保存到本地磁盘,然后再使用“hdfs.put”命令移动到 hdfs。

R代码:

# Save built in data set to local disk
save(mtcars, file = "/home/mtcars.RData")

# Move data from local to hdfs
hdfs.put("/home/mtcars.RData", "/in")

关于rhdfs - RJavaTools 将数据集写入 hdfs 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21938020/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com