Abacn commented on code in PR #36809:
URL: https://github.com/apache/beam/pull/36809#discussion_r2538999438
##########
runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/options/DataflowPipelineOptions.java:
##########
@@ -266,4 +267,30 @@ public String create(PipelineOptions options) {
List<String> getJdkAddOpenModules();
void setJdkAddOpenModules(List<String> options);
+
+ class AvroSerializableClassesFactory implements
DefaultValueFactory<List<String>> {
Review Comment:
tested that it mostly work as intented
- without setting `avroSerializableClasses`, I indeed get java command
`Executing: java -Xmx5835282432 -XX:+UseParallelGC ...
-Dorg.apache.avro.SERIALIZABLE_CLASSES=java.math.BigDecimal,java.math.BigInteger,java.net.URI,java.net.URL,java.io.File,java.lang.Integer...
org.apache.beam.fn.harness.FnHarness`
- set pipeline option `--avroSerializableClasses=`, however, I get java
command `-Dorg.apache.avro.SERIALIZABLE_CLASSES= `. This is because the
pipeline option get parsed to an empty string, then it is a list of size 1,
instead of zero.
We probably want to change to
```
if len(serializableClassesList) > 0 && !(len(serializableClassesList) == 1
&& len(numbersArray[0]) == 0) {
```
or better use an utility format to check string list non-empty or contains
only one empty string
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]