diff --git a/src/java/org/apache/sqoop/mapreduce/HBaseImportJob.java b/src/java/org/apache/sqoop/mapreduce/HBaseImportJob.java index afc42991..3f18bd98 100644 --- a/src/java/org/apache/sqoop/mapreduce/HBaseImportJob.java +++ b/src/java/org/apache/sqoop/mapreduce/HBaseImportJob.java @@ -165,7 +165,8 @@ protected void jobSetup(Job job) throws IOException, ImportException { */ try { // Get method isSecurityEnabled - Method isSecurityEnabled = User.class.getMethod("isSecurityEnabled"); + Method isHBaseSecurityEnabled = User.class.getMethod( + "isHBaseSecurityEnabled", Configuration.class); // Get method obtainAuthTokenForJob Method obtainAuthTokenForJob = User.class.getMethod( @@ -175,7 +176,7 @@ protected void jobSetup(Job job) throws IOException, ImportException { User user = User.getCurrent(); // Obtain security token if needed - if ((Boolean)isSecurityEnabled.invoke(null)) { + if ((Boolean)isHBaseSecurityEnabled.invoke(null, conf)) { obtainAuthTokenForJob.invoke(user, conf, job); } } catch (NoSuchMethodException e) {