Skip to content

Commit

Permalink
HBASE-26646 WALPlayer should obtain token from filesystem (#4003)
Browse files Browse the repository at this point in the history
Signed-off-by: Duo Zhang <[email protected]>
  • Loading branch information
mymeiyi authored Jan 7, 2022
1 parent 5e263da commit f1e263a
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
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;
Expand Down Expand Up @@ -274,6 +275,8 @@ List<InputSplit> getSplits(final JobContext context, final String startKey, fina
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);

Expand Down

0 comments on commit f1e263a

Please sign in to comment.