Package java.util

Examples of java.util.Formatter.out()


        ugi = ShimLoader.getHadoopShims().getUGIForConf(getConf());
      } catch (Exception ex) {
        throw new RuntimeException(ex);
      }
      final Formatter fmt = auditFormatter.get();
      ((StringBuilder) fmt.out()).setLength(0);

      String address;
      if (useSasl) {
        address = saslServer.getRemoteAddress().toString();
      } else {
View Full Code Here


        ugi = ShimLoader.getHadoopShims().getUGIForConf(getConf());
      } catch (Exception ex) {
        throw new RuntimeException(ex);
      }
      final Formatter fmt = auditFormatter.get();
      ((StringBuilder) fmt.out()).setLength(0);

      String address;
      if (useSasl) {
        address = saslServer.getRemoteAddress().toString();
      } else {
View Full Code Here

        ugi = ShimLoader.getHadoopShims().getUGIForConf(getConf());
      } catch (Exception ex) {
        throw new RuntimeException(ex);
      }
      final Formatter fmt = auditFormatter.get();
      ((StringBuilder) fmt.out()).setLength(0);

      String address;
      if (useSasl) {
        address = saslServer.getRemoteAddress().toString();
      } else {
View Full Code Here

  private static final void logAuditEvent(UserGroupInformation ugi,
      InetAddress addr, String cmd, String src, String dst,
      HdfsFileStatus stat) {
    final Formatter fmt = auditFormatter.get();
    ((StringBuilder)fmt.out()).setLength(0);
    auditLog.info(fmt.format(AUDIT_FORMAT, ugi, addr, cmd, src, dst,
                  (stat == null)
                    ? null
                    : stat.getOwner() + ':' + stat.getGroup() + ':' +
                      stat.getPermission()
View Full Code Here

    String result;
    Formatter formatter = null;
    try {
      formatter = new Formatter();
      Formatter format = formatter.format("%10d-%10d: %s", start, (start + length) - 1, descriptor.toString());
      result = format.out().toString();
    }
    finally {
      if (null != formatter) {
        formatter.close();
      }
View Full Code Here

          bucketCountInLevel += countForBucketSize;
          Formatter formatter = new Formatter();
          formatter.format(" %10d | %10d", bucketSize, countForBucketSize);

          if (levelMap.size() < 20 || i < 3 || i >= (levelMap.size() - 3)) {
            LOG.debug(formatter.out());
          } else if (levelMap.size() / 2 == i) {
            LOG.debug("         .. |         ..");
            LOG.debug(formatter.out());
            LOG.debug("         .. |         ..");
          }
View Full Code Here

          if (levelMap.size() < 20 || i < 3 || i >= (levelMap.size() - 3)) {
            LOG.debug(formatter.out());
          } else if (levelMap.size() / 2 == i) {
            LOG.debug("         .. |         ..");
            LOG.debug(formatter.out());
            LOG.debug("         .. |         ..");
          }
          i++;
          formatter.close();
        }
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.