26 lines
No EOL
879 B
Java
26 lines
No EOL
879 B
Java
package com.databuild.examples.basic_graph;
|
|
|
|
import java.util.Arrays;
|
|
|
|
/**
|
|
* 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 GenerateConfigure {
|
|
public static void main(String[] args) {
|
|
if (args.length < 1) {
|
|
System.err.println("Error: Partition ref is required");
|
|
System.exit(1);
|
|
}
|
|
|
|
// Process each partition ref from input arguments
|
|
Arrays.stream(args).forEach(partitionRef -> {
|
|
// 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);
|
|
});
|
|
}
|
|
} |