{
"job": {
"setting": {
"speed": {
"channel": 3
},
"errorLimit": {
"record": 0,
"percentage": 0.02
}
},
"content": [
{
"reader": {
"name": "mysqlreader",
"parameter": {
"username": "8ivlZcKGclwi5NwpuzkXzg==",
"password": "Wj2uLJOMOmN62QRQAEceSQ==",
"column": [
"id",
"username"
],
"splitPk": "",
"connection": [
{
"table": [
"job_user"
],
"jdbcUrl": [
"jdbc:mysql://localhost:3306/datax"
]
}
]
}
},
"writer": {
"name": "hdfswriter",
"parameter": {
"defaultFS": "hdfs://hadoop102:9000",
"fileType": "text",
"path": "/user/hive/warehouse",
"writeMode": "append",
"fieldDelimiter": "\t",
"fileName": "student2",
"column": [
{
"name": "id",
"type": "int"
},
{
"name": "name",
"type": "string"
}
]
}
}
}
]
}
}
执行报错:org.apache.hadoop.security.AccessControlException: Permission denied: user=lwx86, access=ALL, inode=",没有权限
解决方法一:
在 hdfs-site.xml 总添加参数:
<property>
<name>dfs.permissions.enabled</name>
<value>false</value>
</property>
然后重启hadoop集群
解决方法二:hadoop fs -chown root /user