You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by me...@apache.org on 2022/01/07 10:00:53 UTC
[hbase] branch branch-2 updated: HBASE-26646 WALPlayer should obtain token from filesystem (#4003)
This is an automated email from the ASF dual-hosted git repository.
meiyi 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 d25fa46 HBASE-26646 WALPlayer should obtain token from filesystem (#4003)
d25fa46 is described below
commit d25fa46c8f0df824f644746e5644cc9db363ef51
Author: meiyi <my...@gmail.com>
AuthorDate: Fri Jan 7 17:37:29 2022 +0800
HBASE-26646 WALPlayer should obtain token from filesystem (#4003)
Signed-off-by: Duo Zhang <zh...@apache.org>
---
.../main/java/org/apache/hadoop/hbase/mapreduce/WALInputFormat.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/WALInputFormat.java b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/WALInputFormat.java
index ffc202a..373bf4f 100644
--- a/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/WALInputFormat.java
+++ b/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/WALInputFormat.java
@@ -45,6 +45,7 @@ import org.apache.hadoop.mapreduce.JobContext;
import org.apache.hadoop.mapreduce.RecordReader;
import org.apache.hadoop.mapreduce.TaskAttemptContext;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
+import org.apache.hadoop.mapreduce.security.TokenCache;
import org.apache.hadoop.util.StringUtils;
import org.apache.yetus.audience.InterfaceAudience;
import org.slf4j.Logger;
@@ -274,6 +275,8 @@ public class WALInputFormat extends InputFormat<WALKey, WALEdit> {
Configuration conf = context.getConfiguration();
boolean ignoreMissing = conf.getBoolean(WALPlayer.IGNORE_MISSING_FILES, false);
Path[] inputPaths = getInputPaths(conf);
+ // get delegation token for the filesystem
+ TokenCache.obtainTokensForNamenodes(context.getCredentials(), inputPaths, conf);
long startTime = conf.getLong(startKey, Long.MIN_VALUE);
long endTime = conf.getLong(endKey, Long.MAX_VALUE);