无法rsync到“hdfs mount”-挂载的hdfs:-)

kmbjn2e3  于 2021-05-27  发布在  Hadoop
关注(0)|答案(0)|浏览(353)

很抱歉标题里的双关语。交易如下:
我有什么问题?
我有一个hdp3.1集群,有3个datanode、1个namenode和1个备用namenode。此群集位于网络192.168.10.0/24上。在这个网络中,我有另一个服务器,我经常需要从它将文件rsync到hdfs。rsync给了我错误信息

rsync: [receiver] close failed on "/hdfs_10G_fuse/user/dir_1/.file_xyz.csv.hoY9FN": Input/output error (5)

以及

rsync: [receiver] mkstemp "/hdfs_10G_fuse/user/dir_1/sub_dir1/.file_xyz" failed: Input/output error (5)

以及

create /user/dir_1/dir_1.5/dir_sub_1.5/dir_37/.file.csv.ggVI4W: permission denied

(不,我不想使用hdfs copyfromlocal,因为我现在不想使用brievity,但是如果没有人找到解决我rsync问题的方法,我愿意解释。)
到目前为止我做了什么并尝试了什么?
因此,我使用microsofts的“hdfs mount”工具最终成功地将hdfs挂载到该服务器上的本地目录。我遵守了所有的指示https://github.com/microsoft/hdfs-mount 包括安装go 1.13等。以下是我为成功安装所做的:

sudo apt remove 'golang-*'
cd ~
wget https://dl.google.com/go/go1.13.9.linux-amd64.tar.gz
tar xf go1.13.9.linux-amd64.tar.gz
sudo mv go /usr/local/go-1.13
export GOROOT=/usr/local/go-1.13
export PATH=$GOROOT/bin:$PATH
git clone --recurse-submodules -j8 https://github.com/microsoft/hdfs-mount.git
sudo mkdir -p $GOROOT/src/golang.org/x/
cd !$
sudo git clone https://github.com/golang/sys.git
cd ~/hdfs-mount/
make
sudo nano /etc/fuse.conf

# + --> uncomment settings in /etc/fuse.conf

sudo mkdir /hdfs_10G_fuse/
sudo chown danilo:danilo /hdfs_10G_fuse
sudo ./hdfs-mount 192.168.10.10:8020 /hdfs_10G_fuse/

(我是在尝试其他方法之后做的,比如hdp自带的nfs网关(挂载工作,与下面相同的问题+慢得多),https://github.com/remis-thoughts/native-hdfs-fuse.git, https://github.com/alexsmith1612/hadoofus.git所以hdfs挂载似乎是我的最佳选择。)
在我执行的hdfs上

hdfs dfs -chmod 755 /user/dir_1

作为hdfs用户,我也试过777。我还尝试将hdfs站点配置中的“dfs.permissions.enabled”设置为“false”,然后重新启动服务并再次装载—所有这些结果与上面列出的相同。
我还将rsync更新到3.2.3版本,方法是下载源代码,对其进行修补并根据install.md文件中列出的说明进行编译。因为我在服务器上使用的是ubuntu18.04,所以我没有可用的xxhash库,并用编译器标志禁用了它。以下是版本的输出:

rsync  version 3.2.3  protocol version 31
Copyright (C) 1996-2020 by Andrew Tridgell, Wayne Davison, and others.
Web site: https://rsync.samba.org/
Capabilities:
    64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
    socketpairs, hardlinks, hardlink-specials, symlinks, IPv6, atimes,
    batchfiles, inplace, append, ACLs, xattrs, optional protect-args, iconv,
    symtimes, prealloc, stop-at, no crtimes
Optimizations:
    SIMD, asm, openssl-crypto
Checksum list:
    md5 md4 none
Compress list:
    zlibx zlib none

rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
are welcome to redistribute it under certain conditions.  See the GNU
General Public Licence for details.

我对ubuntu18.04附带的rsync版本也有同样的问题。为什么要从源代码处更新和安装?所以我可以修补它。我为什么要修补它?因为我希望https://stackoverflow.com/a/11697694/7870462 会解决我的问题。
我可以提供哪些其他信息?
在终端中运行hdfs mount并查看输出时会显示如下消息:

2020/10/16 17:02:47 Dir.go:212: Can't create file:  /user/dir_1/subdir_1/.file_1.csv.UMdYKH create /user/dir_1/subdir_1/.file_1.csv.UMdYKH: permission denied

而我则通过上述几种方法来充分发挥灵活性。
有什么能帮到我?
找出问题所在的解释或测试
rsync或hdfs挂载的另一个补丁解决了这个问题
非常感谢!

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题