1

我需要将数据从 Mysql 导入到 HDFS。发现此链接有帮助 http://devslogics.blogspot.com/2013/09/sqoop-java-client.html?showComment=1399588094791#c7484088811270691337。我正在尝试创建一个新的 HDFS 位置,但由于访问被拒绝问题,sqoop 作业失败。我的问题是:我们可以更改默认用户吗?这里默认用户是 sqoop2。我们可以将其设置为我们想要的用户吗?我正在使用回调方法提交作业

submission = client.startSubmission(jobId, new SubmissionCallback() {
                @Override
                public void updated(MSubmission submission) {
                }

                @Override
                public void submitted(MSubmission submission) {
                }

                @Override
                public void finished(MSubmission submission) {
                    Log.info("Job finished");
                }
            }
                    , pollTime);

这是我在运行作业后在日志中发现的错误。

org.apache.hadoop.security.AccessControlException: Permission denied: user=sqoop2, access=WRITE, inode="/xxx/xxxxxx/xlocation":hdfs:supergroup:drwxrwxr-x
at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:224)
at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:204)
at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission(FSPermissionChecker.java:149)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkPermission(FSNamesystem.java:4846)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkPermission(FSNamesystem.java:4828)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkAncestorAccess(FSNamesystem.java:4802)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.mkdirsInternal(FSNamesystem.java:3130)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.mkdirsInt(FSNamesystem.java:3094)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.mkdirs(FSNamesystem.java:3075)

提前致谢

4

0 回答 0