作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
I am doing as below
FileSystem fs = FileSystem.get(new URI("hdfs://IP:PORT"), context.getConfiguration());
path = new Path("/AAP");
fsOutStream = fs.create(path);
// read this file into InputStream
inputStream = new ByteArrayInputStream(value.getBytes());
IOUtils.copyBytes(inputStream, fsOutStream, context.getConfiguration()); //After this step a new folder AAP is available on HDFS
//Problem in below step
fs.copyToLocalFile(path, new Path("/xyz")); //After this step i am expecting that a folder local to DataNode with name "xyz" should be available but its not
最佳答案
检查事项:
您是否有权写入根目录?
尝试使用完整的URL:fs.copyToLocalFile(path, new Path("file:///home/hadoop/xyz"));
关于hadoop - copyToLocal没有将本地文件复制到DataNode,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20743095/
Hadoop copyToLocal 正在目标目录中创建 .crc 文件以及实际的数据文件,这对我来说是不必要的,并且会影响我进一步的数据处理。有没有办法避免创建它而不是稍后删除它? val co
我只是想知道 hadoop 中的 copyToLocal 和 copyFromLocal 是如何工作的。他们使用 MapReduce 吗?我想要一个完整的架构 View 。谢谢。 最佳答案 此命令不使
我正在尝试从 HDFS 复制当我运行它时,什么也没有发生。 hadoop fs -copyToLocal out1 ~/datatemp 我假设我应该为 HDFS 文件包含一个更长的路径?out1 是
有什么方法可以覆盖现有文件,同时使用 HDFS 使用: hadoop fs -copyToLocal 最佳答案 fs -copyFromLocal -f $LOCAL_MOUNT_SRC_PATH
我正在尝试从 .hql 文件执行“copyToLocal”,如下所示: dfs -copyToLocal hdfs://nameservice1/HDFS_FOLDER1/HDFS_FOLDER2/f
我是一名优秀的程序员,十分优秀!