You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/03/22 20:31:18 UTC

[GitHub] [beam] lukecwik commented on a change in pull request #17110: [BEAM-13695] Add option to add-open flags for Java container

lukecwik commented on a change in pull request #17110:
URL: https://github.com/apache/beam/pull/17110#discussion_r832596779



##########
File path: runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/options/DataflowPipelineOptions.java
##########
@@ -217,4 +217,22 @@ public String create(PipelineOptions options) {
   boolean isHotKeyLoggingEnabled();
 
   void setHotKeyLoggingEnabled(boolean value);
+
+  /**
+   * Open modules needed for reflection that access JDK internals with Java 17+

Review comment:
       ```suggestion
      * Open modules needed for reflection that access JDK internals with Java 9+
   ```

##########
File path: sdks/java/core/src/main/java/org/apache/beam/sdk/options/SdkHarnessOptions.java
##########
@@ -294,4 +295,18 @@ public static SdkHarnessLogLevelOverrides from(Map<String, String> values) {
       return overrides;
     }
   }
+
+  /**
+   * Open modules needed for reflection that access JDK internals with Java 17+

Review comment:
       ```suggestion
      * Open modules needed for reflection that access JDK internals with Java 9+
   ```

##########
File path: sdks/java/core/src/main/java/org/apache/beam/sdk/options/SdkHarnessOptions.java
##########
@@ -294,4 +295,18 @@ public static SdkHarnessLogLevelOverrides from(Map<String, String> values) {
       return overrides;
     }
   }
+
+  /**
+   * Open modules needed for reflection that access JDK internals with Java 17+
+   *
+   * <p>With JDK 16+, <a href="#{https://openjdk.java.net/jeps/403}">JDK internals are strongly
+   * encapsulated</a> and can result in an InaccessibleObjectException being thrown if a tool or
+   * library uses reflection that access JDK internals. If you see these errors in your worker logs,
+   * you can pass in modules to open using the format module/package=target-module(,target-module)*
+   * to allow access to the library. E.g. java.base/java.lang=jamm
+   */

Review comment:
       ```suggestion
      *
      * <p>You may see warnings that jamm, a library used to more accurately size objects, is unable to
      * make a private field accessible. To resolve the warning, open the specified module/package to
      * jamm.
      */
   ```




-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org