Package com.google.common.base

Examples of com.google.common.base.Joiner.join()


          Lists.newArrayList("timestamp"),
          parser.fields
      )));
      for(final Result<TimeseriesResultValue> r : rows) {
        System.out.println(
            tabJoiner.join(
              Iterables.concat(
                Lists.newArrayList(r.getTimestamp()),
                Lists.transform(
                  parser.fields,
                  new Function<String, Object>()
View Full Code Here


    long seconds = NANOSECONDS.toSeconds(timeNanos);
    double rowsPerSec = rowMeter.count() / (double) seconds;
    double mbPerSec = mbParsed(hiveStats) / (double) seconds;

    writer.println(joiner.join(
        rowMeter.count(),
        args.multiThread.threads,
        rawMBMeter.count(),
        seconds,
        rowsPerSec,
View Full Code Here

                String arg1 = extr.getArgument1().toString();
                String rel = extr.getRelation().toString();
                String arg2 = extr.getArgument2().toString();

                String extrString = joiner.join(sentenceCount, arg1, rel, arg2, score);

                System.out.println("extraction\t" + extrString);

                extractionCount++;
            }
View Full Code Here

    return stringList;
  }

  public String toString() {
    Joiner joiner = Joiner.on(" ").skipNulls();
    return joiner.join(getArgumentsAsStringList());
  }

  public int size() {
    return arguments.size();
  }
View Full Code Here

    @NotNull
    @Override
    public String getPresentableString() {
      Joiner joiner = Joiner.on("|");
      return "(" + joiner.join(PREFIXES) + ").*(" + joiner.join(DOT_SUFFIXES) + ")";
    }

    private static boolean hasSuitableExtension(@NotNull CharSequence fileName) {
      for (String dotSuffix : DOT_SUFFIXES) {
        if (StringUtil.endsWith(fileName, dotSuffix)) {
View Full Code Here

    @NotNull
    @Override
    public String getPresentableString() {
      Joiner joiner = Joiner.on("|");
      return "(" + joiner.join(PREFIXES) + ").*(" + joiner.join(DOT_SUFFIXES) + ")";
    }

    private static boolean hasSuitableExtension(@NotNull CharSequence fileName) {
      for (String dotSuffix : DOT_SUFFIXES) {
        if (StringUtil.endsWith(fileName, dotSuffix)) {
View Full Code Here

        if (unhealthy.isEmpty()) {
            return Result.healthy();
        } else if (unhealthy.size() < healthChecks.size()) {
            return Result.unhealthy(String.format(
                    "Some nodes are unhealthy: %s", joiner.join(unhealthy)));
        } else {
            return Result.unhealthy(String.format(
                    "All nodes are unhealthy: %s", joiner.join(unhealthy)));
        }
    }
View Full Code Here

        } else if (unhealthy.size() < healthChecks.size()) {
            return Result.unhealthy(String.format(
                    "Some nodes are unhealthy: %s", joiner.join(unhealthy)));
        } else {
            return Result.unhealthy(String.format(
                    "All nodes are unhealthy: %s", joiner.join(unhealthy)));
        }
    }

    /**
     * Gets a {@link List} of the currently unhealthy nodes in the quorum.
View Full Code Here

        if (!resourceConfigs.isEmpty()) {
            command.add("-c");

            Joiner joiner = Joiner.on(',');
            command.add(joiner.join(resourceConfigs));
        }

        if (symbolOutputDir != null &&
                (type == VariantConfiguration.Type.LIBRARY || !libraries.isEmpty())) {
            command.add("--output-text-symbols");
View Full Code Here

    if (req.getRacks() != null) {
      dedupedRacks.addAll(req.getRacks());
      if(req.getRacks().size() != dedupedRacks.size()) {
        Joiner joiner = Joiner.on(',');
        LOG.warn("ContainerRequest has duplicate racks: "
            + joiner.join(req.getRacks()));
      }
    }
    Set<String> inferredRacks = resolveRacks(req.getNodes());
    inferredRacks.removeAll(dedupedRacks);
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.