我已按照此[站点][1]设置了Hive。
当我试图通过终端运行hive时,它在下面抛出错误;
/usr/local/Cellar/hadoop/3.3.1/libexec/etc/hadoop/hadoop-env.sh: line 70: export: `“/Users/karth/Library/Java/JavaVirtualMachines/corretto-1.8.0_292/Contents/Home”': not a valid identifier
/usr/local/Cellar/hadoop/3.3.1/libexec/etc/hadoop/hadoop-env.sh: line 93: export: `=': not a valid identifier
/usr/local/Cellar/hadoop/3.3.1/libexec/etc/hadoop/hadoop-env.sh: line 93: export: `”-Djava.net.preferIPv4Stack=true': not a valid identifier
/usr/local/Cellar/hadoop/3.3.1/libexec/etc/hadoop/hadoop-env.sh: line 93: export: `-Djava.security.krb5.realm=': not a valid identifier
/usr/local/Cellar/hadoop/3.3.1/libexec/etc/hadoop/hadoop-env.sh: line 93: export: `-Djava.security.krb5.kdc=”': not a valid identifier
/usr/local/Cellar/hadoop/3.3.1/libexec/etc/hadoop/hadoop-env.sh: line 70: export: `“/Users/kart/Library/Java/JavaVirtualMachines/corretto-1.8.0_292/Contents/Home”': not a valid identifier
/usr/local/Cellar/hadoop/3.3.1/libexec/etc/hadoop/hadoop-env.sh: line 93: export: `=': not a valid identifier
/usr/local/Cellar/hadoop/3.3.1/libexec/etc/hadoop/hadoop-env.sh: line 93: export: `”-Djava.net.preferIPv4Stack=true': not a valid identifier
/usr/local/Cellar/hadoop/3.3.1/libexec/etc/hadoop/hadoop-env.sh: line 93: export: `-Djava.security.krb5.realm=': not a valid identifier
/usr/local/Cellar/hadoop/3.3.1/libexec/etc/hadoop/hadoop-env.sh: line 93: export: `-Djava.security.krb5.kdc=”': not a valid identifier
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/Cellar/hive/3.1.2_3/libexec/lib/log4j-slf4j-impl-2.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/Cellar/hadoop/3.3.1/libexec/share/hadoop/common/lib/slf4j-log4j12-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
Exception in thread "main" java.lang.RuntimeException: com.ctc.wstx.exc.WstxParsingException: Illegal character entity: expansion character (code 0x8
at [row,col,system-id]: [3215,96,"file:/usr/local/Cellar/hive/3.1.2_3/libexec/conf/hive-site.xml"]
at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:3069)
at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:3018)
at org.apache.hadoop.conf.Configuration.loadProps(Configuration.java:2893)
at org.apache.hadoop.conf.Configuration.addResourceObject(Configuration.java:1034)
at org.apache.hadoop.conf.Configuration.addResource(Configuration.java:939)
at org.apache.hadoop.hive.conf.HiveConf.initialize(HiveConf.java:5151)
at org.apache.hadoop.hive.conf.HiveConf.<init>(HiveConf.java:5099)
at org.apache.hadoop.hive.common.LogUtils.initHiveLog4jCommon(LogUtils.java:97)
at org.apache.hadoop.hive.common.LogUtils.initHiveLog4j(LogUtils.java:81)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:699)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:683)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.hadoop.util.RunJar.run(RunJar.java:323)
at org.apache.hadoop.util.RunJar.main(RunJar.java:236)
Caused by: com.ctc.wstx.exc.WstxParsingException: Illegal character entity: expansion character (code 0x8
at [row,col,system-id]: [3215,96,"file:/usr/local/Cellar/hive/3.1.2_3/libexec/conf/hive-site.xml"]
at com.ctc.wstx.sr.StreamScanner.constructWfcException(StreamScanner.java:634)
at com.ctc.wstx.sr.StreamScanner.throwParseError(StreamScanner.java:504)
at com.ctc.wstx.sr.StreamScanner.reportIllegalChar(StreamScanner.java:2469)
at com.ctc.wstx.sr.StreamScanner.validateChar(StreamScanner.java:2416)
at com.ctc.wstx.sr.StreamScanner.resolveCharEnt(StreamScanner.java:2382)
at com.ctc.wstx.sr.StreamScanner.fullyResolveEntity(StreamScanner.java:1528)
at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2818)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1121)
at org.apache.hadoop.conf.Configuration$Parser.parseNext(Configuration.java:3373)
at org.apache.hadoop.conf.Configuration$Parser.parse(Configuration.java:3159)
at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:3052)
... 16 more
bash概要如下;
export JAVA_HOME=/Users/karth/Library/Java/JavaVirtualMachines/corretto-1.8.0_292/Contents/Home
export HADOOP_HOME=/usr/local/Cellar/hadoop/3.3.1/libexec
export PATH=$HADOOP_HOME/bin:$HADOOP_HOME/sbin:$PATH
export HIVE_HOME=export HIVE_HOME=/usr/local/Cellar/hive/3.1.2_3/libexec
export PATH=$HIVE_HOME/bin:$HIVE_HOME/sbin:$PATH
我在这里做错了什么[1]: https://luckymrwang.github.io/2018/03/14/install-hive-on-mac-with-homebrew/
暂无答案!
目前还没有任何答案,快来回答吧!