Java 类org.apache.hadoop.hbase.security.token.AuthenticationTokenSelector 实例源码

项目:HIndex    文件:TableMapReduceUtil.java   
/**
 * Get the authentication token of the user for the cluster specified in the configuration
 * @return null if the user does not have the token, otherwise the auth token for the cluster.
 */
private static Token<AuthenticationTokenIdentifier> getAuthToken(Configuration conf, User user)
    throws IOException, InterruptedException {
  ZooKeeperWatcher zkw = new ZooKeeperWatcher(conf, "mr-init-credentials", null);
  try {
    String clusterId = ZKClusterId.readClusterIdZNode(zkw);
    return new AuthenticationTokenSelector().selectToken(new Text(clusterId), user.getUGI().getTokens());
  } catch (KeeperException e) {
    throw new IOException(e);
  } finally {
    zkw.close();
  }
}
项目:HIndex    文件:TableMapReduceUtil.java   
/**
 * Get the authentication token of the user for the cluster specified in the configuration
 * @return null if the user does not have the token, otherwise the auth token for the cluster.
 */
private static Token<AuthenticationTokenIdentifier> getAuthToken(Configuration conf, User user)
    throws IOException, InterruptedException {
  ZooKeeperWatcher zkw = new ZooKeeperWatcher(conf, "mr-init-credentials", null);
  try {
    String clusterId = ZKClusterId.readClusterIdZNode(zkw);
    return new AuthenticationTokenSelector().selectToken(new Text(clusterId), user.getUGI().getTokens());
  } catch (KeeperException e) {
    throw new IOException(e);
  } finally {
    zkw.close();
  }
}
项目:PyroDB    文件:TableMapReduceUtil.java   
/**
 * Get the authentication token of the user for the cluster specified in the configuration
 * @return null if the user does not have the token, otherwise the auth token for the cluster.
 */
private static Token<AuthenticationTokenIdentifier> getAuthToken(Configuration conf, User user)
    throws IOException, InterruptedException {
  ZooKeeperWatcher zkw = new ZooKeeperWatcher(conf, "mr-init-credentials", null);
  try {
    String clusterId = ZKClusterId.readClusterIdZNode(zkw);
    return new AuthenticationTokenSelector().selectToken(new Text(clusterId), user.getUGI().getTokens());
  } catch (KeeperException e) {
    throw new IOException(e);
  } finally {
    zkw.close();
  }
}
项目:PyroDB    文件:TableMapReduceUtil.java   
/**
 * Get the authentication token of the user for the cluster specified in the configuration
 * @return null if the user does not have the token, otherwise the auth token for the cluster.
 */
private static Token<AuthenticationTokenIdentifier> getAuthToken(Configuration conf, User user)
    throws IOException, InterruptedException {
  ZooKeeperWatcher zkw = new ZooKeeperWatcher(conf, "mr-init-credentials", null);
  try {
    String clusterId = ZKClusterId.readClusterIdZNode(zkw);
    return new AuthenticationTokenSelector().selectToken(new Text(clusterId), user.getUGI().getTokens());
  } catch (KeeperException e) {
    throw new IOException(e);
  } finally {
    zkw.close();
  }
}
项目:c5    文件:TableMapReduceUtil.java   
/**
 * Get the authentication token of the user for the cluster specified in the configuration
 * @return null if the user does not have the token, otherwise the auth token for the cluster.
 */
private static Token<AuthenticationTokenIdentifier> getAuthToken(Configuration conf, User user)
    throws IOException, InterruptedException {
  ZooKeeperWatcher zkw = new ZooKeeperWatcher(conf, "mr-init-credentials", null);
  try {
    String clusterId = ZKClusterId.readClusterIdZNode(zkw);
    return new AuthenticationTokenSelector().selectToken(new Text(clusterId), user.getUGI().getTokens());
  } catch (KeeperException e) {
    throw new IOException(e);
  } finally {
    zkw.close();
  }
}
项目:c5    文件:TableMapReduceUtil.java   
/**
 * Get the authentication token of the user for the cluster specified in the configuration
 * @return null if the user does not have the token, otherwise the auth token for the cluster.
 */
private static Token<AuthenticationTokenIdentifier> getAuthToken(Configuration conf, User user)
    throws IOException, InterruptedException {
  ZooKeeperWatcher zkw = new ZooKeeperWatcher(conf, "mr-init-credentials", null);
  try {
    String clusterId = ZKClusterId.readClusterIdZNode(zkw);
    return new AuthenticationTokenSelector().selectToken(new Text(clusterId), user.getUGI().getTokens());
  } catch (KeeperException e) {
    throw new IOException(e);
  } finally {
    zkw.close();
  }
}