Skip to content

Commit

Permalink
Fix UnsupportedOperationException because of ImmutableCollection.add (a…
Browse files Browse the repository at this point in the history
  • Loading branch information
nbali authored Nov 30, 2023
1 parent 93fb204 commit 6c7606e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1339,9 +1339,9 @@ public DataflowPipelineJob run(Pipeline pipeline) {
int jobGraphByteSize = jobGraphBytes.length;
if (jobGraphByteSize >= CREATE_JOB_REQUEST_LIMIT_BYTES
&& !hasExperiment(options, "upload_graph")) {
List<String> experiments = firstNonNull(options.getExperiments(), new ArrayList<>());
experiments.add("upload_graph");
options.setExperiments(ImmutableList.copyOf(experiments));
List<String> experiments = firstNonNull(options.getExperiments(), Collections.emptyList());
options.setExperiments(
ImmutableList.<String>builder().addAll(experiments).add("upload_graph").build());
LOG.info(
"The job graph size ({} in bytes) is larger than {}. Automatically add "
+ "the upload_graph option to experiments.",
Expand Down

0 comments on commit 6c7606e

Please sign in to comment.