public static void initCredentialsForCluster(Job job, Configuration conf) throws IOException {
    initCredentialsForCluster(job, conf, null);
  }
Obtain an authentication token, for the specified cluster, on behalf of the current user and
add it to the credentials for the given map reduce job.
@param job  The job that requires the permission.
@param conf The configuration to use in connecting to the peer cluster
@throws IOException When the authentication token cannot be obtained.
hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java