Qiheng He created HIVE-28432: -------------------------------- Summary: Debugging the unit test of `TestHplsqlLocal` in IntelliJ IDEA will throw `OutOfMemoryError` Key: HIVE-28432 URL: https://issues.apache.org/jira/browse/HIVE-28432 Project: Hive Issue Type: Bug Reporter: Qiheng He Attachments: image-2024-08-04-09-36-46-398.png
- Debugging the unit test of *org.apache.hive.hplsql.TestHplsqlLocal* in IntelliJ IDEA will throw {*}java.lang.OutOfMemoryError{*}. I looked at [https://cwiki.apache.org/confluence/display/Hive/HiveDeveloperFAQ#HiveDeveloperFAQ-Testing] and it seems to only allow debugging via Eclipse IDE? - I used *SDKMAN!* to configure the following under {*}Ubuntu WSL 22.04.4{*}. {code:bash} sdk install java 8.0.422-tem sdk use java 8.0.422-tem sdk install maven git clone g...@github.com:apache/hive.git cd ./hive/ mvn clean install -DskipTests {code} - Then I tried to start the unit test of *org.apache.hive.hplsql.TestHplsqlLocal* directly in the IDE. At this time, IntelliJ IDEA will throw the following exception to terminate the execution of the unit test. - !image-2024-08-04-09-36-46-398.png|width=488,height=287! - The log is as follows. It seems that ASF JIRA does not support markdown's html-like folding blocks. - {code:bash} java: java.lang.OutOfMemoryError: Java heap space java.lang.RuntimeException: java.lang.OutOfMemoryError: Java heap space at com.sun.tools.javac.main.Main.compile(Main.java:559) at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129) at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138) at org.jetbrains.jps.javac.JavacMain.compile(JavacMain.java:239) at org.jetbrains.jps.javac.ExternalJavacProcess.compile(ExternalJavacProcess.java:189) at org.jetbrains.jps.javac.ExternalJavacProcess.access$400(ExternalJavacProcess.java:28) at org.jetbrains.jps.javac.ExternalJavacProcess$CompilationRequestsHandler$1.run(ExternalJavacProcess.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750) Caused by: java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOfRange(Arrays.java:3664) at java.lang.String.<init>(String.java:207) at java.lang.String.substring(String.java:1969) at java.net.URI$Parser.substring(URI.java:2868) at java.net.URI$Parser.parse(URI.java:3064) at java.net.URI.<init>(URI.java:673) at java.net.URI.<init>(URI.java:774) at com.intellij.openapi.util.io.FileUtilRt.fileToUri(FileUtilRt.java:1068) at org.jetbrains.jps.javac.InputFileObject.<init>(InputFileObject.java:18) at org.jetbrains.jps.javac.JpsJavacFileManager$3.fun(JpsJavacFileManager.java:62) at org.jetbrains.jps.javac.JpsJavacFileManager$3.fun(JpsJavacFileManager.java:59) at org.jetbrains.jps.javac.Iterators$10.next(Iterators.java:235) at org.jetbrains.jps.javac.Iterators$6.next(Iterators.java:160) at com.sun.tools.javac.api.ClientCodeWrapper.wrapJavaFileObjects(ClientCodeWrapper.java:140) at com.sun.tools.javac.api.ClientCodeWrapper$WrappedJavaFileManager.list(ClientCodeWrapper.java:231) at com.sun.tools.javac.jvm.ClassReader.fillIn(ClassReader.java:2803) at com.sun.tools.javac.jvm.ClassReader.complete(ClassReader.java:2446) at com.sun.tools.javac.jvm.ClassReader.access$000(ClassReader.java:76) at com.sun.tools.javac.jvm.ClassReader$1.complete(ClassReader.java:240) at com.sun.tools.javac.code.Symbol.complete(Symbol.java:574) at com.sun.tools.javac.code.Symbol$PackageSymbol.flags(Symbol.java:863) at com.sun.tools.javac.comp.Attr.visitSelect(Attr.java:3347) at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:1897) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:576) at com.sun.tools.javac.comp.Attr.visitSelect(Attr.java:3250) at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:1897) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:576) at com.sun.tools.javac.comp.Attr.attribImportQualifier(Attr.java:410) at com.sun.tools.javac.comp.MemberEnter.visitImport(MemberEnter.java:544) at com.sun.tools.javac.tree.JCTree$JCImport.accept(JCTree.java:571) at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:437) at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:449) {code} - This is not reasonable behavior from my perspective. Earlier investigations are at https://github.com/apache/hive/pull/5375 and https://github.com/apache/logging-log4j2/issues/2794 . -- This message was sent by Atlassian Jira (v8.20.10#820010)