HBASE-26646 WALPlayer should obtain token from filesystem (#4003)
Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
parent
5e263dac38
commit
f1e263a8fd
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue