org.apache.flink.graph.drivers.Driver Java Examples
The following examples show how to use
org.apache.flink.graph.drivers.Driver.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Runner.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
/** * List available algorithms. This is displayed to the user when no valid * algorithm is given in the program parameterization. * * @return usage string listing available algorithms */ private static String getAlgorithmsListing() { StrBuilder strBuilder = new StrBuilder(); strBuilder .appendNewLine() .appendln("Select an algorithm to view usage: flink run examples/flink-gelly-examples_<version>.jar --algorithm <algorithm>") .appendNewLine() .appendln("Available algorithms:"); for (Driver algorithm : driverFactory) { strBuilder.append(" ") .appendFixedWidthPadRight(algorithm.getName(), 30, ' ') .append(algorithm.getShortDescription()).appendNewLine(); } return strBuilder.toString(); }
Example #2
Source File: Runner.java From flink with Apache License 2.0 | 6 votes |
/** * List available algorithms. This is displayed to the user when no valid * algorithm is given in the program parameterization. * * @return usage string listing available algorithms */ private static String getAlgorithmsListing() { StrBuilder strBuilder = new StrBuilder(); strBuilder .appendNewLine() .appendln("Select an algorithm to view usage: flink run examples/flink-gelly-examples_<version>.jar --algorithm <algorithm>") .appendNewLine() .appendln("Available algorithms:"); for (Driver algorithm : driverFactory) { strBuilder.append(" ") .appendFixedWidthPadRight(algorithm.getName(), 30, ' ') .append(algorithm.getShortDescription()).appendNewLine(); } return strBuilder.toString(); }
Example #3
Source File: Runner.java From flink with Apache License 2.0 | 6 votes |
/** * List available algorithms. This is displayed to the user when no valid * algorithm is given in the program parameterization. * * @return usage string listing available algorithms */ private static String getAlgorithmsListing() { StrBuilder strBuilder = new StrBuilder(); strBuilder .appendNewLine() .appendln("Select an algorithm to view usage: flink run examples/flink-gelly-examples_<version>.jar --algorithm <algorithm>") .appendNewLine() .appendln("Available algorithms:"); for (Driver algorithm : driverFactory) { strBuilder.append(" ") .appendFixedWidthPadRight(algorithm.getName(), 30, ' ') .append(algorithm.getShortDescription()).appendNewLine(); } return strBuilder.toString(); }
Example #4
Source File: Runner.java From Flink-CEPplus with Apache License 2.0 | 4 votes |
/** * Display the usage for the given algorithm. This includes options for all * compatible inputs, the selected algorithm, and outputs implemented by * the selected algorithm. * * @param algorithmName unique identifier of the selected algorithm * @return usage string for the given algorithm */ private static String getAlgorithmUsage(String algorithmName) { StrBuilder strBuilder = new StrBuilder(); Driver algorithm = driverFactory.get(algorithmName); strBuilder .appendNewLine() .appendNewLine() .appendln(algorithm.getLongDescription()) .appendNewLine() .append("usage: flink run examples/flink-gelly-examples_<version>.jar --algorithm ") .append(algorithmName) .append(" [algorithm options] --input <input> [input options] --output <output> [output options]") .appendNewLine() .appendNewLine() .appendln("Available inputs:"); for (Input input : inputFactory) { strBuilder .append(" --input ") .append(input.getName()) .append(" ") .appendln(input.getUsage()); } String algorithmParameterization = algorithm.getUsage(); if (algorithmParameterization.length() > 0) { strBuilder .appendNewLine() .appendln("Algorithm configuration:") .append(" ") .appendln(algorithm.getUsage()); } strBuilder .appendNewLine() .appendln("Available outputs:"); for (Output output : outputFactory) { strBuilder .append(" --output ") .append(output.getName()) .append(" ") .appendln(output.getUsage()); } return strBuilder .appendNewLine() .toString(); }
Example #5
Source File: Runner.java From flink with Apache License 2.0 | 4 votes |
/** * Display the usage for the given algorithm. This includes options for all * compatible inputs, the selected algorithm, and outputs implemented by * the selected algorithm. * * @param algorithmName unique identifier of the selected algorithm * @return usage string for the given algorithm */ private static String getAlgorithmUsage(String algorithmName) { StrBuilder strBuilder = new StrBuilder(); Driver algorithm = driverFactory.get(algorithmName); strBuilder .appendNewLine() .appendNewLine() .appendln(algorithm.getLongDescription()) .appendNewLine() .append("usage: flink run examples/flink-gelly-examples_<version>.jar --algorithm ") .append(algorithmName) .append(" [algorithm options] --input <input> [input options] --output <output> [output options]") .appendNewLine() .appendNewLine() .appendln("Available inputs:"); for (Input input : inputFactory) { strBuilder .append(" --input ") .append(input.getName()) .append(" ") .appendln(input.getUsage()); } String algorithmParameterization = algorithm.getUsage(); if (algorithmParameterization.length() > 0) { strBuilder .appendNewLine() .appendln("Algorithm configuration:") .append(" ") .appendln(algorithm.getUsage()); } strBuilder .appendNewLine() .appendln("Available outputs:"); for (Output output : outputFactory) { strBuilder .append(" --output ") .append(output.getName()) .append(" ") .appendln(output.getUsage()); } return strBuilder .appendNewLine() .toString(); }
Example #6
Source File: Runner.java From flink with Apache License 2.0 | 4 votes |
/** * Display the usage for the given algorithm. This includes options for all * compatible inputs, the selected algorithm, and outputs implemented by * the selected algorithm. * * @param algorithmName unique identifier of the selected algorithm * @return usage string for the given algorithm */ private static String getAlgorithmUsage(String algorithmName) { StrBuilder strBuilder = new StrBuilder(); Driver algorithm = driverFactory.get(algorithmName); strBuilder .appendNewLine() .appendNewLine() .appendln(algorithm.getLongDescription()) .appendNewLine() .append("usage: flink run examples/flink-gelly-examples_<version>.jar --algorithm ") .append(algorithmName) .append(" [algorithm options] --input <input> [input options] --output <output> [output options]") .appendNewLine() .appendNewLine() .appendln("Available inputs:"); for (Input input : inputFactory) { strBuilder .append(" --input ") .append(input.getName()) .append(" ") .appendln(input.getUsage()); } String algorithmParameterization = algorithm.getUsage(); if (algorithmParameterization.length() > 0) { strBuilder .appendNewLine() .appendln("Algorithm configuration:") .append(" ") .appendln(algorithm.getUsage()); } strBuilder .appendNewLine() .appendln("Available outputs:"); for (Output output : outputFactory) { strBuilder .append(" --output ") .append(output.getName()) .append(" ") .appendln(output.getUsage()); } return strBuilder .appendNewLine() .toString(); }