diff --git a/hbase-client/pom.xml b/hbase-client/pom.xml
index dc0da77f3ee..425bd055132 100644
--- a/hbase-client/pom.xml
+++ b/hbase-client/pom.xml
@@ -291,52 +291,6 @@
-
- org.apache.hadoop
- hadoop-mapreduce-client-core
-
-
- com.sun.jersey.jersey-test-framework
- jersey-test-framework-grizzly2
-
-
- javax.servlet
- servlet-api
-
-
- com.sun.jersey
- jersey-server
-
-
- com.sun.jersey
- jersey-core
-
-
- com.sun.jersey
- jersey-json
-
-
- com.sun.jersey.contribs
- jersey-guice
-
-
- com.google.inject
- guice
-
-
- com.google.inject.extensions
- guice-servlet
-
-
- org.codehaus.jackson
- jackson-jaxrs
-
-
- org.codehaus.jackson
- jackson-xc
-
-
-
diff --git a/hbase-common/pom.xml b/hbase-common/pom.xml
index d782c6c5aed..3e315e4c154 100644
--- a/hbase-common/pom.xml
+++ b/hbase-common/pom.xml
@@ -357,10 +357,6 @@
org.apache.hadoop
hadoop-common
-
- org.apache.hadoop
- hadoop-mapreduce-client-core
-
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/security/User.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/security/User.java
index 0efb4029be5..b0e2ed27d2f 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/security/User.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/security/User.java
@@ -20,7 +20,6 @@
package org.apache.hadoop.hbase.security;
import java.io.IOException;
-import java.lang.reflect.UndeclaredThrowableException;
import java.security.PrivilegedAction;
import java.security.PrivilegedExceptionAction;
import java.util.Collection;
@@ -29,8 +28,6 @@ import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.classification.InterfaceAudience;
import org.apache.hadoop.hbase.classification.InterfaceStability;
import org.apache.hadoop.hbase.util.Methods;
-import org.apache.hadoop.mapred.JobConf;
-import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.security.SecurityUtil;
import org.apache.hadoop.security.UserGroupInformation;
import org.apache.hadoop.security.token.Token;
@@ -99,30 +96,6 @@ public abstract class User {
public abstract T runAs(PrivilegedExceptionAction action)
throws IOException, InterruptedException;
- /**
- * Requests an authentication token for this user and stores it in the
- * user's credentials.
- *
- * @throws IOException
- * @deprecated Use {@code TokenUtil.obtainAuthTokenForJob(Connection,User,Job)}
- * instead.
- */
- @Deprecated
- public abstract void obtainAuthTokenForJob(Configuration conf, Job job)
- throws IOException, InterruptedException;
-
- /**
- * Requests an authentication token for this user and stores it in the
- * user's credentials.
- *
- * @throws IOException
- * @deprecated Use {@code TokenUtil.obtainAuthTokenForJob(Connection,JobConf,User)}
- * instead.
- */
- @Deprecated
- public abstract void obtainAuthTokenForJob(JobConf job)
- throws IOException, InterruptedException;
-
/**
* Returns the Token of the specified kind associated with this user,
* or null if the Token is not present.
@@ -278,7 +251,7 @@ public abstract class User {
* {@link org.apache.hadoop.security.UserGroupInformation} for secure Hadoop
* 0.20 and versions 0.21 and above.
*/
- private static class SecureHadoopUser extends User {
+ private static final class SecureHadoopUser extends User {
private String shortName;
private SecureHadoopUser() throws IOException {
@@ -312,55 +285,6 @@ public abstract class User {
return ugi.doAs(action);
}
- @Override
- public void obtainAuthTokenForJob(Configuration conf, Job job)
- throws IOException, InterruptedException {
- try {
- Class> c = Class.forName(
- "org.apache.hadoop.hbase.security.token.TokenUtil");
- Methods.call(c, null, "obtainTokenForJob",
- new Class[]{Configuration.class, UserGroupInformation.class,
- Job.class},
- new Object[]{conf, ugi, job});
- } catch (ClassNotFoundException cnfe) {
- throw new RuntimeException("Failure loading TokenUtil class, "
- +"is secure RPC available?", cnfe);
- } catch (IOException ioe) {
- throw ioe;
- } catch (InterruptedException ie) {
- throw ie;
- } catch (RuntimeException re) {
- throw re;
- } catch (Exception e) {
- throw new UndeclaredThrowableException(e,
- "Unexpected error calling TokenUtil.obtainAndCacheToken()");
- }
- }
-
- @Override
- public void obtainAuthTokenForJob(JobConf job)
- throws IOException, InterruptedException {
- try {
- Class> c = Class.forName(
- "org.apache.hadoop.hbase.security.token.TokenUtil");
- Methods.call(c, null, "obtainTokenForJob",
- new Class[]{JobConf.class, UserGroupInformation.class},
- new Object[]{job, ugi});
- } catch (ClassNotFoundException cnfe) {
- throw new RuntimeException("Failure loading TokenUtil class, "
- +"is secure RPC available?", cnfe);
- } catch (IOException ioe) {
- throw ioe;
- } catch (InterruptedException ie) {
- throw ie;
- } catch (RuntimeException re) {
- throw re;
- } catch (Exception e) {
- throw new UndeclaredThrowableException(e,
- "Unexpected error calling TokenUtil.obtainAndCacheToken()");
- }
- }
-
/** @see User#createUserForTesting(org.apache.hadoop.conf.Configuration, String, String[]) */
public static User createUserForTesting(Configuration conf,
String name, String[] groups) {
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/security/token/TokenUtil.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/token/TokenUtil.java
similarity index 100%
rename from hbase-client/src/main/java/org/apache/hadoop/hbase/security/token/TokenUtil.java
rename to hbase-server/src/main/java/org/apache/hadoop/hbase/security/token/TokenUtil.java