Examples of obtainAuthTokenForJob()


Examples of org.apache.hadoop.hbase.security.User.obtainAuthTokenForJob()

    if (provider.isHBaseSecurityEnabled()) {
      try {
        User user = provider.getCurrent();
        Token<?> authToken = getAuthToken(job, user);
        if (authToken == null) {
          user.obtainAuthTokenForJob(job);
        } else {
          job.getCredentials().addToken(authToken.getService(), authToken);
        }
      } catch (InterruptedException ie) {
        ie.printStackTrace();
View Full Code Here

Examples of org.apache.hadoop.hbase.security.User.obtainAuthTokenForJob()

      try {
        // login the server principal (if using secure Hadoop)
        User user = userProvider.getCurrent();
        Token<AuthenticationTokenIdentifier> authToken = getAuthToken(job, user);
        if (authToken == null) {
          user.obtainAuthTokenForJob(job);
        } else {
          job.getCredentials().addToken(authToken.getService(), authToken);
        }
      } catch (InterruptedException ie) {
        ie.printStackTrace();
View Full Code Here

Examples of org.apache.hadoop.hbase.security.User.obtainAuthTokenForJob()

      try {
        // login the server principal (if using secure Hadoop)
        User user = userProvider.getCurrent();
        Token<AuthenticationTokenIdentifier> authToken = getAuthToken(job, user);
        if (authToken == null) {
          user.obtainAuthTokenForJob(job);
        } else {
          job.getCredentials().addToken(authToken.getService(), authToken);
        }
      } catch (InterruptedException ie) {
        ie.printStackTrace();
View Full Code Here

Examples of org.apache.hadoop.hbase.security.User.obtainAuthTokenForJob()

      try {
        // login the server principal (if using secure Hadoop)
        User user = userProvider.getCurrent();
        Token<AuthenticationTokenIdentifier> authToken = getAuthToken(job, user);
        if (authToken == null) {
          user.obtainAuthTokenForJob(job);
        } else {
          job.getCredentials().addToken(authToken.getService(), authToken);
        }
      } catch (InterruptedException ie) {
        ie.printStackTrace();
View Full Code Here

Examples of org.apache.hadoop.hbase.security.User.obtainAuthTokenForJob()

            // already existing values of jobConf
            injectConf(hbaseConf, jobConf);
            String user = context.getWorkflow().getUser();
            UserGroupInformation ugi =  UserGroupInformation.createProxyUser(user, UserGroupInformation.getLoginUser());
            User u = User.create(ugi);
            u.obtainAuthTokenForJob(jobConf);
        }
        catch (Exception e) {
            XLog.getLog(getClass()).warn("Exception in receiving hbase credentials", e);
            throw e;
        }
View Full Code Here

Examples of org.apache.hadoop.hbase.security.User.obtainAuthTokenForJob()

      try {
        // login the server principal (if using secure Hadoop)
        User user = userProvider.getCurrent();
        Token<AuthenticationTokenIdentifier> authToken = getAuthToken(job, user);
        if (authToken == null) {
          user.obtainAuthTokenForJob(job);
        } else {
          job.getCredentials().addToken(authToken.getService(), authToken);
        }
      } catch (InterruptedException ie) {
        ie.printStackTrace();
View Full Code Here

Examples of org.apache.hadoop.hbase.security.User.obtainAuthTokenForJob()

      try {
        // login the server principal (if using secure Hadoop)
        User user = userProvider.getCurrent();
        Token<AuthenticationTokenIdentifier> authToken = getAuthToken(job, user);
        if (authToken == null) {
          user.obtainAuthTokenForJob(job);
        } else {
          job.getCredentials().addToken(authToken.getService(), authToken);
        }
      } catch (InterruptedException ie) {
        ie.printStackTrace();
View Full Code Here

Examples of org.apache.hadoop.hbase.security.User.obtainAuthTokenForJob()

            // already existing values of jobConf
            injectConf(hbaseConf, jobConf);
            String user = context.getWorkflow().getUser();
            UserGroupInformation ugi =  UserGroupInformation.createProxyUser(user, UserGroupInformation.getLoginUser());
            User u = User.create(ugi);
            u.obtainAuthTokenForJob(jobConf);
        }
        catch (Exception e) {
            XLog.getLog(getClass()).warn("Exception in receiving hbase credentials", e);
            throw e;
        }
View Full Code Here

Examples of org.apache.hadoop.hbase.security.User.obtainAuthTokenForJob()

      try {
        // login the server principal (if using secure Hadoop)
        User user = userProvider.getCurrent();
        Token<AuthenticationTokenIdentifier> authToken = getAuthToken(job, user);
        if (authToken == null) {
          user.obtainAuthTokenForJob(job);
        } else {
          job.getCredentials().addToken(authToken.getService(), authToken);
        }
      } catch (InterruptedException ie) {
        ie.printStackTrace();
View Full Code Here

Examples of org.apache.hadoop.hbase.security.User.obtainAuthTokenForJob()

    private void obtainToken(JobConf jobConf, Context context) throws IOException, InterruptedException {
        String user = context.getWorkflow().getUser();
        UserGroupInformation ugi =  UserGroupInformation.createProxyUser(user, UserGroupInformation.getLoginUser());
        User u = User.create(ugi);
        u.obtainAuthTokenForJob(jobConf);
    }

    private void addPropsConf(CredentialsProperties props, Configuration destConf) {
        for (Map.Entry<String, String> entry : props.getProperties().entrySet()) {
            destConf.set(entry.getKey(), entry.getValue());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.