Using AppCDS to Test Hive
Testing Hive
- Generate a ClassList file.
- Open the hive/conf/hive-site.xml configuration file.
1vi hive/conf/hive-site.xml - Press i to enter the insert mode and modify the value of hive.tez.java.opts.
1-server -Xshare:off -XX:+UseAppCDS -XX:DumpLoadedClassList=/tmp/hive.lst -Djava.net.preferIPv4Stack=true -XX:NewRatio=8 -XX:+UseNUMA -XX:+UseG1GC -XX:+ResizeTLAB -XX:+PrintGCDetails -verbose:gc -XX:+PrintGCTimeStamps
Adding hive.lst to the configuration prevents conflicts when multiple processes access the same file.

- Press Esc, type :wq!, and press Enter to save the file and exit.
- After any SQL case is executed, a /tmp/hive.lst file is generated on each agent node.
Make sure that the /tmp/hive.jsa file is generated on each agent node, whether the case execution succeeds or not.
- Generate a JSA file.
- Open the hive/conf/hive-site.xml configuration file.
1vi hive/conf/hive-site.xml - Press i to enter the insert mode and modify the value of hive.tez.java.opts.
1-server -Xshare:dump -XX:+UseAppCDS -XX:SharedClassListFile=/tmp/hive.lst -XX:SharedArchiveFile=/tmp/hive.jsa -Djava.net.preferIPv4Stack=true -XX:NewRatio=8 -XX:+UseNUMA -XX:+UseG1GC -XX:+ResizeTLAB -XX:+PrintGCDetails -verbose:gc -XX:+PrintGCTimeStamps
Adding hive.lst to the configuration prevents conflicts when multiple processes access the same file.

- Press Esc, type :wq!, and press Enter to save the file and exit.
- After any SQL case is executed, a /tmp/hive.jsa file is generated on each agent node.
Make sure that the /tmp/hive.jsa file is generated on each agent node, whether the case execution succeeds or not.
- Use the JSA file.
- Open the hive/conf/hive-site.xml configuration file.
1vi hive/conf/hive-site.xml - Press i to enter the insert mode and modify the value of hive.tez.java.opts.
1-server -Xshare:on -XX:+UseAppCDS -XX:SharedArchiveFile=/tmp/hive.jsa -Djava.net.preferIPv4Stack=true -XX:NewRatio=8 -XX:+UseNUMA -XX:+UseG1GC -XX:+ResizeTLAB -XX:+PrintGCDetails -verbose:gc -XX:+PrintGCTimeStamps

- Press Esc, type :wq!, and press Enter to save the file and exit.
If a new JVM version is used, the new JVM does not support the JSA file generated for the JVM of an earlier version. In this case, you need to start from 1 to test again.
- Open the hive/conf/hive-site.xml configuration file.
- Use the JSA file.
- Open the hive/conf/hive-site.xml configuration file.
- Generate a JSA file.
- Open the hive/conf/hive-site.xml configuration file.
Parent topic: BiSheng JDK Acceleration Hive Component