addDependencyJars(job);
}
}
public static void initCredentials(Job job) throws IOException {
UserProvider provider = UserProvider.instantiate(job.getConfiguration());
if (provider.isHadoopSecurityEnabled()) {
// propagate delegation related props from launcher job to MR job
if (System.getenv("HADOOP_TOKEN_FILE_LOCATION") != null) {
job.getConfiguration().set("mapreduce.job.credentials.binary",
System.getenv("HADOOP_TOKEN_FILE_LOCATION"));
}
}
if (provider.isHBaseSecurityEnabled()) {
try {
// init credentials for remote cluster
String quorumAddress = job.getConfiguration().get(
TableOutputFormat.QUORUM_ADDRESS);
User user = provider.getCurrent();
if (quorumAddress != null) {
String[] parts = ZKUtil.transformClusterKey(quorumAddress);
Configuration peerConf = HBaseConfiguration.create(job
.getConfiguration());
peerConf.set(HConstants.ZOOKEEPER_QUORUM, parts[0]);