24 lines
No EOL
743 B
Java
24 lines
No EOL
743 B
Java
package com.databuild.examples.basic_graph;
|
|
|
|
/**
|
|
* Configure class for generating a random number.
|
|
* This class creates a job configuration for generating a random number based on the partition ref.
|
|
*/
|
|
public class Configure {
|
|
public static void main(String[] args) {
|
|
if (args.length < 1) {
|
|
System.err.println("Error: Partition ref (output path) is required");
|
|
System.exit(1);
|
|
}
|
|
|
|
String partitionRef = args[0];
|
|
|
|
// Create a job config for generating a random number
|
|
String config = String.format(
|
|
"{\"outputs\":[\"%s\"],\"inputs\":[],\"args\":[\"%s\"],\"env\":{}}",
|
|
partitionRef, partitionRef
|
|
);
|
|
|
|
System.out.println(config);
|
|
}
|
|
} |