Rate This Document
Findability
Accuracy
Completeness
Readability

Using AppCDS to Test Hive

Testing Hive

  1. Generate a ClassList file.
    1. Open the hive/conf/hive-site.xml configuration file.
      1
      vi hive/conf/hive-site.xml
      
    2. 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.

    3. Press Esc, type :wq!, and press Enter to save the file and exit.
    4. 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.

      1. Generate a JSA file.
        1. Open the hive/conf/hive-site.xml configuration file.
          1
          vi hive/conf/hive-site.xml
          
        2. 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.

        3. Press Esc, type :wq!, and press Enter to save the file and exit.
        4. 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.

          1. Use the JSA file.
            1. Open the hive/conf/hive-site.xml configuration file.
              1
              vi hive/conf/hive-site.xml
              
            2. 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
              

            3. 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.