@Override public String toString() { return new StringBuilder().append(inputBundle.getName()).append("(").append(path).append(")").toString(); } }
@Override public String toString() { return new StringBuilder().append(inputBundle.getName()).append("(").append(pathsAsString()).append(")").toString(); }
private String getId(FormatBundle bundle, MRJob mrJob) { String name = (bundle == null) ? "-" : bundle.getName(); return format("\"%s@%s\"", name, mrJob.getJobID()); }
private void formatJobOutputs(Map<String, OutputConfig> namedOutputs, MRJob mrJob) { contentBuilder.append("subgraph \"cluster-output_" + mrJob.getJobID() + "\" {\n"); contentBuilder.append(" label=\"OUTPUTS\"; fontsize=14; color= magenta;\n"); for (Entry<String, OutputConfig> entry : namedOutputs.entrySet()) { String output = format("%s [label=\"{%s | %s | { %s | %s } }\" shape=record; color = %s];\n", getOutputNameId(entry.getKey(), mrJob), entry.getKey(), entry.getValue().bundle.getName(), entry.getValue().keyClass.getSimpleName(), entry.getValue().valueClass.getSimpleName(), BLACK); contentBuilder.append(output); } contentBuilder.append("}\n"); }
private void formatJobInputs(Map<FormatBundle, Map<Integer, List<Path>>> inputFormatNodeMap, MRJob mrJob, String color) { contentBuilder.append("subgraph \"cluster-inputs_" + mrJob.getJobID() + "\" {\n"); contentBuilder.append(" label=\"INPUTS\"; fontsize=14; color= " + color + ";\n"); for (Entry<FormatBundle, Map<Integer, List<Path>>> entry : inputFormatNodeMap.entrySet()) { FormatBundle bundle = entry.getKey(); ArrayList<String> inList = new ArrayList<String>(); for (Entry<Integer, List<Path>> value : entry.getValue().entrySet()) { inList.add(format("{ %s | %s}", value.getKey(), value.getValue())); } contentBuilder.append(format("%s [label=\"{ %s | %s}\" shape=record; color = %s];\n", getId(bundle, mrJob), bundle.getName(), Joiner.on("|").join(inList), BLACK)); } contentBuilder.append("}\n"); }