Fusing multiple Java operators into a single PE

If multiple Java primitive operators and JavaOp operator invocations have compatible vmArg parameter lists, you can fuse them together into a single processing element (PE) or run them in stand-alone mode.

If Java operator invocations have incompatible vmArg parameter lists, then you must manually separate the invocations into different PEs using partition placement constraints. Then, you must run the application in distributed mode.

To determine whether the vmArg parameter lists are compatible, the SPL runtime first simplifies each list individually by removing any vmArg parameter that is overridden by a value later in the list. For example,
vmArg: "-Dthreshold=7", "-mx32m", "-Dsize=100", "-ms32m", "-mx64m", "-Dthreshold=9";
is simplified by removing overridden values
vmArg: "-Dsize=100", "-ms32m", "-mx64m", "-Dthreshold=9";
If the resulting lists for each Java operator invocation are the same, then the lists are compatible. An empty list is not compatible with a non-empty list.

If any list contains ordered values, then the lists are not compatible and execution fails. Ordered values are parameters where the value does not start with a dash character (-) and is thus an argument to the previous value, for example, vmArg: "-file", "a.dat";. Most JVM command-line options are of the non-ordered type. The standard ones that are not (for example, -jar, -classpath, and -cp), must not be used with the vmArg parameter because the class path is defined by the operator model or the classLibrary parameter.

If each list contains the same set of non-ordered values, regardless of ordering within the vmArg parameter setting, then the lists are compatible. For example, the following two settings are compatible:
vmArg: "-Dsize=100", "-mx64m";
vmArg: "-mx64m", "-Dsize=100";
Otherwise, the lists are not compatible and execution fails.