You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2019/10/30 21:51:09 UTC
[hbase] branch branch-2 updated: HBASE-23175 Yarn unable to acquire
delegation token for HBase Spark jobs
This is an automated email from the ASF dual-hosted git repository.
stack pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2 by this push:
new 19adfee HBASE-23175 Yarn unable to acquire delegation token for HBase Spark jobs
19adfee is described below
commit 19adfee3d46c6e7d161ed84238460e17d66fe0fd
Author: Ankit Singhal <an...@gmail.com>
AuthorDate: Wed Oct 30 14:49:04 2019 -0700
HBASE-23175 Yarn unable to acquire delegation token for HBase Spark jobs
---
.../org/apache/hadoop/hbase/security/token/TokenUtil.java | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/hbase-server/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
index 9e9b685..f540b53 100644
--- a/hbase-server/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
@@ -22,6 +22,7 @@ import java.io.IOException;
import java.lang.reflect.UndeclaredThrowableException;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.client.Connection;
+import org.apache.hadoop.hbase.client.ConnectionFactory;
import org.apache.hadoop.hbase.protobuf.generated.AuthenticationProtos;
import org.apache.hadoop.hbase.security.User;
import org.apache.hadoop.hbase.zookeeper.ZKClusterId;
@@ -45,6 +46,19 @@ public class TokenUtil {
private static final Logger LOG = LoggerFactory.getLogger(TokenUtil.class);
/**
+ * It was removed in HBase-2.0 but added again as spark code relies on this method to obtain
+ * delegation token
+ * @deprecated Since 2.0.0.
+ */
+ @Deprecated
+ public static Token<AuthenticationTokenIdentifier> obtainToken(Configuration conf)
+ throws IOException {
+ try (Connection connection = ConnectionFactory.createConnection(conf)) {
+ return obtainToken(connection);
+ }
+ }
+
+ /**
* See {@link ClientTokenUtil#obtainToken(org.apache.hadoop.hbase.client.Connection)}.
* @deprecated External users should not use this method. Please post on
* the HBase dev mailing list if you need this method. Internal