How to pass JVM options when using Amazon EMR Hadoop?

0

This documentation page shows how to set the JAVA_HOME environment variable for EMR. I'm experimenting with running another version of Java, and I want to try passing some more command line options to the JVM. Is there another property for that?

I'd like to add arguments like --add-opens java.base/java.lang=ALL-UNNAMED

[
    {
        "Classification": "hadoop-env", 
        "Configurations": [
            {
                "Classification": "export", 
                "Configurations": [], 
                "Properties": {
                    "JAVA_HOME": "/usr/lib/jvm/java-17-amazon-corretto.aarch64"
                }
            }
        ], 
        "Properties": {}
    }
]

The errors I get in EMR logs, which cause me to want to add JVM command line options, look like this:

Caused by: java.lang.reflect.InaccessibleObjectException: 
  Unable to make protected final java.lang.Class
  java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: 
  module java.base does not "opens java.lang" to unnamed module @6cb02d3d
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
robn
gefragt vor einem Jahr115 Aufrufe
Keine Antworten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen