sqoop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Szabolcs Vasas (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SQOOP-3016) warehouse-dir or target-dir is not being honored
Date Mon, 17 Oct 2016 08:04:58 GMT

    [ https://issues.apache.org/jira/browse/SQOOP-3016?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15581545#comment-15581545
] 

Szabolcs Vasas commented on SQOOP-3016:
---------------------------------------

Hi [~jebas],

As far as I can see from your logs you try to to run your command as user abc, this user may
not have the necessary privilege to write to /projects/Sqoop_Test. Can you try this comand:

sqoop import --connect jdbc:teradata://<ip>/Database=test,LOGMECH=LDAP --username abc
-P --table tbl1 --split-by tbl_cd --warehouse-dir /user/abc/projects/Sqoop_Test

This command assumes that the abc home directory exists on HDFS.  If it does not exist you
can create it using the following command:

sudo -u hdfs hdfs dfs -mkdir /user/abc
sudo -u hdfs hdfs dfs -chown abc:abc /user/abc

Another solution could be to run the sqoop command with hdfs user:

sudo -u hdfs sqoop import --connect jdbc:teradata://<ip>/Database=test,LOGMECH=LDAP
--username abc -P --table tbl1 --split-by tbl_cd --warehouse-dir /projects/Sqoop_Test

It depends on your security settings but I assume this would work out of the box.

I hope this helps.

Regards,
Szabolcs

> warehouse-dir or target-dir is not being honored 
> -------------------------------------------------
>
>                 Key: SQOOP-3016
>                 URL: https://issues.apache.org/jira/browse/SQOOP-3016
>             Project: Sqoop
>          Issue Type: Bug
>          Components: connectors/hdfs
>    Affects Versions: 1.4.5
>         Environment: CDH 5.4.7
>            Reporter: Kingsly J
>
> Hi Team,
> In our QA env, we are not having sudo access and not having folder in our username in
"/user" and not having write access to the same. Hence we used --warhouse-dir to direct the
result to the directory for which we are having write access.we tried the below sqoop statement
to load data from Teradata to hdfs,
> sqoop import --connect jdbc:teradata://<ip>/Database=test,LOGMECH=LDAP --username
abc -P --table tbl1 --split-by tbl_cd --warehouse-dir /projects/Sqoop_Test
> but getting the below error,
> ERROR tool.ImportTool: Encountered IOException running import job: com.teradata.connector.common.exception.ConnectorException:
org.apache.hadoop.security.AccessControlException: Permission denied: user=abc, access=WRITE,
inode="/user":hdfs:supergroup:drwxr-xr-x
> It is still trying to write to "/user" path. we have tried with --target-dir parameter
also, and still getting the same error.
> Please guide us on the same.
> Regards,
> Kingsly J



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message