Examples of addDelegationTokens()


Examples of org.apache.hadoop.fs.FileSystem.addDelegationTokens()

                      + token.getService() + " into " + tokenFile);
                }
              } else {
                FileSystem fs = FileSystem.get(conf);
                Credentials cred = new Credentials();
                Token<?> tokens[] = fs.addDelegationTokens(renewer, cred);
                cred.writeTokenStorageFile(tokenFile, conf);
                for (Token<?> token : tokens) {
                  System.out.println("Fetched token for " + token.getService()
                      + " into " + tokenFile);
                }
View Full Code Here

Examples of org.apache.hadoop.fs.FileSystem.addDelegationTokens()

          "Can't get Master Kerberos principal for the RM to use as renewer");
      }

      // For now, only getting tokens for the default file-system.
      final Token<?> tokens[] =
          fs.addDelegationTokens(tokenRenewer, credentials);
      if (tokens != null) {
        for (Token<?> token : tokens) {
          LOG.info("Got dt for " + fs.getUri() + "; " + token);
        }
      }
View Full Code Here

Examples of org.apache.hadoop.fs.FileSystem.addDelegationTokens()

                      + token.getService() + " into " + tokenFile);
                }
              } else {
                FileSystem fs = FileSystem.get(conf);
                Credentials cred = new Credentials();
                Token<?> tokens[] = fs.addDelegationTokens(renewer, cred);
                cred.writeTokenStorageFile(tokenFile, conf);
                for (Token<?> token : tokens) {
                  System.out.println("Fetched token for " + token.getService()
                      + " into " + tokenFile);
                }
View Full Code Here

Examples of org.apache.hadoop.fs.FileSystem.addDelegationTokens()

    try {
      if (UserGroupInformation.isSecurityEnabled()) {
        Credentials credentials = new Credentials();
        final FileSystem fs = FileSystem.get(configuration);
        Token<?>[] tokens = fs.addDelegationTokens(YarnUtils.getPrincipal(configuration), credentials);
        if (tokens != null) {
          for (Token<?> token : tokens) {
            log.info("Got delegation token for " + fs.getUri() + "; " + token);
          }
        }
View Full Code Here

Examples of org.apache.hadoop.fs.FileSystem.addDelegationTokens()

        }
      }

      // Get delegation tokens so we log the delegation token op
      Token<?>[] delegationTokens =
          hdfs.addDelegationTokens(TEST_RENEWER, null);
      for (Token<?> t : delegationTokens) {
        LOG.debug("got token " + t);
      }

      // Write results to the fsimage file
View Full Code Here

Examples of org.apache.hadoop.fs.FileSystem.addDelegationTokens()

      if (tokenRenewer == null || tokenRenewer.length() == 0) {
        throw new IOException("Can't get Master Kerberos principal for the RM to use as renewer");
      }

      // For now, only getting tokens for the default file-system.
      final Token<?> tokens[] = fs.addDelegationTokens(tokenRenewer, credentials);
      if (tokens != null) {
        for (Token<?> token : tokens) {
          LOG.info("Got dt for " + fs.getUri() + "; " + token);
        }
      }
View Full Code Here

Examples of org.apache.hadoop.fs.FileSystem.addDelegationTokens()

      );
    }

    // For now, only getting tokens for the default file-system.
    FileSystem fs = coreFileSystem.getFileSystem();
    fs.addDelegationTokens(tokenRenewer, credentials);
  }

  public LaunchedApplication submitApplication() throws IOException, YarnException {
    completeAppMasterLaunch();
View Full Code Here

Examples of org.apache.hadoop.fs.FileSystem.addDelegationTokens()

          "Can't get Master Kerberos principal for the RM to use as renewer");
      }

      // For now, only getting tokens for the default file-system.
      final Token<?> tokens[] =
          fs.addDelegationTokens(tokenRenewer, credentials);
      if (tokens != null) {
        for (Token<?> token : tokens) {
          LOG.info("Got dt for " + fs.getUri() + "; " + token);
        }
      }
View Full Code Here

Examples of org.apache.hadoop.fs.FileSystem.addDelegationTokens()

                      + token.getService() + " into " + tokenFile);
                }
              } else {
                FileSystem fs = FileSystem.get(conf);
                Credentials cred = new Credentials();
                Token<?> tokens[] = fs.addDelegationTokens(renewer, cred);
                cred.writeTokenStorageFile(tokenFile, conf);
                for (Token<?> token : tokens) {
                  System.out.println("Fetched token for " + token.getService()
                      + " into " + tokenFile);
                }
View Full Code Here

Examples of org.apache.hadoop.fs.FileSystem.addDelegationTokens()

        }
      }

      // Get delegation tokens so we log the delegation token op
      Token<?>[] delegationTokens =
          hdfs.addDelegationTokens(TEST_RENEWER, null);
      for (Token<?> t : delegationTokens) {
        LOG.debug("got token " + t);
      }

      // Write results to the fsimage file
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.