Building Hive with Maven:
mvn clean install -Phadoop-2,dist
Java version:
$ java -version
Picked up _JAVA_OPTIONS: -Xmx2048m
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-466.1-11M4716)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-466.1, mixed mode)
I tried setting the following Parameters:
$ env | grep JAVA
JAVA_OPTS=-Xmx2048m
_JAVA_OPTIONS=-Xmx2048m
r$ env | grep MAVEN
MAVEN_OPTS=-Xmx2048m
I also tried editing pom.xml and set maven-surefire-plugin
<argLine>-Xmx2048m -XX:MaxPermSize=1024m</argLine>
The system is out of resources.
Consult the following stack trace for details.
java.lang.OutOfMemoryError: Java heap space
at java.util.HashMap.resize(HashMap.java:462)
at java.util.HashMap.addEntry(HashMap.java:755)
at java.util.HashMap.put(HashMap.java:385)
at com.sun.tools.javac.parser.EndPosParser.storeEnd(EndPosParser.java:55)
at com.sun.tools.javac.parser.Parser.literal(Parser.java:561)
at com.sun.tools.javac.parser.Parser.term3(Parser.java:949)
at com.sun.tools.javac.parser.Parser.term2(Parser.java:683)
at com.sun.tools.javac.parser.Parser.term1(Parser.java:654)
at com.sun.tools.javac.parser.Parser.term(Parser.java:610)
at com.sun.tools.javac.parser.Parser.termRest(Parser.java:624)
...
You can unset _JAVA_OPTIONS, and set MAVEN_OPTS="-Xms2048m -Xmx4096m -XX:MaxPermSize=1024m". And you could install oracle java 7/8.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.