HBASE-17648: HBase Table-level synchronization fails between two secured(kerberized) cluster

Signed-off-by: tedyu <yuzhihong@gmail.com>
This commit is contained in:
Yi Liang 2017-02-14 10:22:22 -08:00 committed by tedyu
parent 7763dd6688
commit a2d2196e89
1 changed files with 6 additions and 0 deletions

View File

@ -144,6 +144,12 @@ public class SyncTable extends Configured implements Tool {
// would be nice to add an option for bulk load instead
}
// Obtain an authentication token, for the specified cluster, on behalf of the current user
if (sourceZkCluster != null) {
Configuration peerConf =
HBaseConfiguration.createClusterConf(job.getConfiguration(), sourceZkCluster);
TableMapReduceUtil.initCredentialsForCluster(job, peerConf);
}
return job;
}