Hadoop Can';t同步到;“hdfs安装”-已安装的hdfs:-)

Hadoop Can';t同步到;“hdfs安装”-已安装的hdfs:-),hadoop,hdfs,rsync,hortonworks-data-platform,hdp,Hadoop,Hdfs,Rsync,Hortonworks Data Platform,Hdp,很抱歉在标题中出现了糟糕的双关语。交易如下: 我有什么问题? 我有一个HDP3.1集群,有3个DataNode、1个namenode和1个备用namenode。此群集位于网络192.168.10.0/24上。在这个网络中,我有另一台服务器,我经常需要从该服务器将文件重新同步到HDFS。rsync正在给我错误消息 rsync: [receiver] close failed on "/hdfs_10G_fuse/user/dir_1/.file_xyz.csv.hoY9FN":

很抱歉在标题中出现了糟糕的双关语。交易如下:

我有什么问题?

我有一个HDP3.1集群,有3个DataNode、1个namenode和1个备用namenode。此群集位于网络192.168.10.0/24上。在这个网络中,我有另一台服务器,我经常需要从该服务器将文件重新同步到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
以及

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挂载”工具最终成功地将hdfs挂载到该服务器上的本地目录。我按照所有说明进行安装,包括安装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网关(挂载工作,与下面相同的问题+慢得多),等等。所以hdfs挂载似乎是我的最佳选择。)

在我执行的HDFS上

hdfs dfs -chmod 755 /user/dir_1
作为hdfs用户,我也曾尝试过777。我还尝试将HDFS站点配置中的“dfs.permissions.enabled”设置为“false”,然后重新启动服务并再次装载-所有结果与上面列出的相同

我还将rsync更新为3.2.3版,方法是下载源代码,对其进行修补并根据INSTALL.md文件中列出的说明进行编译。因为我在服务器上使用的是Ubuntu 18.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.
我对Ubuntu 18.04附带的rsync版本也有同样的问题。为什么我要从源代码进行更新和安装?所以我可以修补它。我为什么要修补它?因为我希望这能解决我的问题

我可以提供哪些其他信息?

在终端中运行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挂载的另一个补丁解决了这个问题

非常感谢