sqoop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Abraham Elmahrek (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SQOOP-1246) HBaseImportJob should add job authtoken only if HBase is secured
Date Tue, 03 Dec 2013 02:16:36 GMT

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

Abraham Elmahrek commented on SQOOP-1246:
-----------------------------------------

You may need to catch NoSuchMethodException exceptions and fallback to the void argument list
for that method. It looks like 0.94, which sqoop is currently supporting, didn't supply an
isSecurityEnabled method that takes a Configuration object. I'm looking at https://github.com/apache/hbase/blob/0.94/src/main/java/org/apache/hadoop/hbase/security/User.java.
Please correct me If I am wrong.

> HBaseImportJob should add job authtoken only if HBase is secured
> ----------------------------------------------------------------
>
>                 Key: SQOOP-1246
>                 URL: https://issues.apache.org/jira/browse/SQOOP-1246
>             Project: Sqoop
>          Issue Type: Bug
>          Components: hbase-integration
>    Affects Versions: 1.4.4
>            Reporter: Aditya Kishore
>            Assignee: Aditya Kishore
>         Attachments: SQOOP-1246.patch
>
>
> Sqoop's HBase import job incorrectly checks if Hadoop is secured instead of HBase is
secured before deciding to add an HBase authtoken,
> {code:title=HBaseImportJob.java}
>   @Override
>   /** Create the target HBase table before running the job. */
>   protected void jobSetup(Job job) throws IOException, ImportException {
> ...
>       // Get method isSecurityEnabled
>       Method isSecurityEnabled = User.class.getMethod("isSecurityEnabled");
> ...
>       // Obtain security token if needed
>       if ((Boolean)isSecurityEnabled.invoke(null)) {
>         obtainAuthTokenForJob.invoke(user, conf, job);
>       }
> {code}
> which of course fails if Hadoop is secured but HBase is not.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message