You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by bb...@apache.org on 2023/05/04 18:43:16 UTC
[hbase] branch branch-2.5 updated: HBASE-26646 WALPlayer should obtain token from filesystem (#5221)
This is an automated email from the ASF dual-hosted git repository.
bbeaudreault pushed a commit to branch branch-2.5
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2.5 by this push:
new 064595b3c11 HBASE-26646 WALPlayer should obtain token from filesystem (#5221)
064595b3c11 is described below
commit 064595b3c11e56bd30c68561e1968154b98a8a67
Author: Bryan Beaudreault <bb...@apache.org>
AuthorDate: Thu May 4 14:43:09 2023 -0400
HBASE-26646 WALPlayer should obtain token from filesystem (#5221)
Signed-off-by: Duo Zhang <zh...@apache.org>
Co-authored-by: meiyi <my...@gmail.com>
---
.../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 dc7de148460..60c3e46249e 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;
@@ -272,6 +273,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);