> On Jan. 6, 2016, 4:07 p.m., Jarek Cecho wrote:
> > test/src/main/java/org/apache/sqoop/test/hadoop/HadoopRunner.java, line 74
> > <https://reviews.apache.org/r/41971/diff/1/?file=1183938#file1183938line74>
> >
> >     Why do we need to change the directory to /tmp/ ?
> >     
> >     Aren't we by mistake using this for local path somewhere?

In kerberos enabled cluster, we will get exceptions like this with 
"/mapreduce-job-io":
```
2016-01-07 10:00:46,381 INFO  
[org.apache.hadoop.hdfs.server.namenode.FSNamesystem$DefaultAuditLogger.logAuditMessage(FSNamesystem.java:9332)]
 allowed=false    ugi=sqoopclient (auth:TOKEN) via 
hadoop/bdpe20.sh.intel....@example.com (auth:TOKEN)    ip=/127.0.0.1   
cmd=create      
src=/mapreduce-job-io/org.apache.sqoop.integration.connector.hdfs.AppendModeTest/test/.577fcfcd-6ef8-491c-ad6c-c6f4983dfdf0/22200b07-c11b-4c39-b0f3-c8236b34f44e.txt
    dst=null        perm=null       proto=rpc
2016-01-07 10:00:46,381 DEBUG 
[org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:634)]
 Served: create queueTime= 1 procesingTime= 1 exception= AccessControlException
2016-01-07 10:00:46,381 DEBUG 
[org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1632)]
 PrivilegedActionException as:sqoopclient (auth:TOKEN) via 
hadoop/bdpe20.sh.intel....@example.com (auth:TOKEN) 
cause:org.apache.hadoop.security.AccessControlException: Permission denied: 
user=sqoopclient, access=WRITE, inode="/":root:supergroup:drwxr-xr-x
```
This reason to this exception is that MR job tries to create directory 
"/mapreduce-job-io" with user **sqoopclient**. But only superuser is allowed to 
create directory under "/". While I found a better way to handle this: just 
create directory "mapreduce-job-io" with superuser and changes its permission 
to "0777" during cluster initial phase.


- Dian


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41971/#review113083
-----------------------------------------------------------


On Jan. 6, 2016, 7:28 a.m., Dian Fu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41971/
> -----------------------------------------------------------
> 
> (Updated Jan. 6, 2016, 7:28 a.m.)
> 
> 
> Review request for Sqoop.
> 
> 
> Bugs: SQOOP-2744
>     https://issues.apache.org/jira/browse/SQOOP-2744
> 
> 
> Repository: sqoop-sqoop2
> 
> 
> Description
> -------
> 
> The aim of this JIRA is to enable kerberos for HadoopMiniCluster.
> 
> 
> Diffs
> -----
> 
>   test/pom.xml bd1680f 
>   
> test/src/main/java/org/apache/sqoop/test/hadoop/HadoopMiniClusterRunner.java 
> 2c0c4e6 
>   test/src/main/java/org/apache/sqoop/test/hadoop/HadoopRunner.java cb4e384 
>   test/src/main/java/org/apache/sqoop/test/infrastructure/SqoopTestCase.java 
> c300b33 
>   test/src/main/java/org/apache/sqoop/test/kdc/KdcRunner.java aa5c6fc 
>   test/src/main/java/org/apache/sqoop/test/kdc/MiniKdcRunner.java 299fd9f 
>   test/src/main/java/org/apache/sqoop/test/kdc/NoKerberosKdcRunner.java 
> 29a005e 
>   test/src/main/java/org/apache/sqoop/test/minicluster/SqoopMiniCluster.java 
> 4ff97e7 
>   test/src/main/java/org/apache/sqoop/test/testcases/JettyTestCase.java 
> d4ca396 
>   
> test/src/test/java/org/apache/sqoop/integration/connector/hive/FromRDBMSToKiteHiveTest.java
>  ec9f733 
>   test/src/test/resources/hive-tests-suite.xml PRE-CREATION 
>   test/src/test/resources/integration-tests-suite.xml 1cf3299 
> 
> Diff: https://reviews.apache.org/r/41971/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Dian Fu
> 
>

Reply via email to