Hive启动 - [错误]终端初始化失败;回落到不受支持的位置 [英] Hive startup -[ERROR] Terminal initialization failed; falling back to unsupported

查看:376
本文介绍了Hive启动 - [错误]终端初始化失败;回落到不受支持的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经下载配置单元并将HADOOP_HOME修改为

  HADOOP_HOME = $ {bin} /../../ usr /本地/ hadoop 

我的实际hadoop路径是

<在.bashrc中,pre $ / usr / local / hadoop

已经添加了下面的env变量
$ b $ pre $ export $ HIVE_HOME = / usr / lib / hive / apache-hive-1.1.0-bin
export PATH = $ PATH:$ HIVE_HOME / bin
export CLASSPATH = $ CLASSPATH:/ usr / local / Hadoop / lib / * :.
export CLASSPATH = $ CLASSPATH:/ usr / local / hive / lib / * :.

然后我试着用bin / hive启动配置单元。我得到了下面的错误:

 使用jar中的配置初始化日志:file:/usr/lib/hive/apache-hive-1.1 .0-bin / lib / hive-common-1.1.0.jar!/hive-log4j.properties 
SLF4J:类路径包含多个SLF4J绑定。
SLF4J:在[jar:file:/usr/local/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]中找到绑定
SLF4J:在[jar:file:/usr/lib/hive/apache-hive-1.1.0-bin/lib/hive-jdbc-1.1.0-standalone.jar!/ org / slf4j / impl / StaticLoggerBinder.class]
SLF4J:请参阅http://www.slf4j.org/codes.html#multiple_bindings以获取解释。
SLF4J:实际绑定类型为[org.slf4j.impl.Log4jLoggerFactory] ​​
[错误]终端初始化失败;回落到不受支持的
java.lang.IncompatibleClassChangeError:找到类jline.Terminal,但期望接口
在jline.TerminalFactory.create(TerminalFactory.java:101)
at jline.TerminalFactory。在jline.console.ConsoleReader中获得(TerminalFactory.java:158)
。< init>(ConsoleReader.java:229)$ j $ $ b at jline.console.ConsoleReader。< init>(ConsoleReader.java: 221)$ j $ b $ at jline.console.ConsoleReader。< init>(ConsoleReader.java:209)
at org.apache.hadoop.hive.cli.CliDriver.getConsoleReader(CliDriver.java:773)
at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:715)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:675)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:615)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl .invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.Delegati ngMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.util.RunJar.run(RunJar。 java:221)
at org.apache.hadoop.util.RunJar.main(RunJar.java:136)

线程main中的异常java.lang.IncompatibleClassChangeError:Found class jline 。终端,但接口在jline.console.ConsoleReader中预期为
。< init>(ConsoleReader.java:230)$ j $ $ b at jline.console.ConsoleReader。< init>(ConsoleReader.java:221 )
at jline.console.ConsoleReader。< init>(ConsoleReader.java:209)
at org.apache.hadoop.hive.cli.CliDriver.getConsoleReader(CliDriver.java:773)
at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:715)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:675)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:615)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Me thod)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)$ b $ at java.lang.reflect .Method.invoke(Method.java:606)
at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
at org.apache.hadoop.util.RunJar.main (RunJar.java:136)


解决方案

问题,并得到它从这个链接工作:



https://cwiki.apache.org/confluence/display/Hive/Hive+on+Spark%3A+Getting+Started




  • Hive已升级到Jline2,但Hadoop lib中存在jline 0.9x。



你应该遵循以下步骤:
$ b $ ol
从Hadoop lib目录中删除jline(它只能从ZooKeeper传入)。$ / $>

  • 导出HADOOP_USER_CLASSPATH_FIRST = true


  • I have downloaded hive and modified HADOOP_HOME to

    HADOOP_HOME=${bin}/../../usr/local/hadoop
    

    my actual hadoop path is

    /usr/local/hadoop
    

    in .bashrc i have added the below env variables

    export HIVE_HOME=/usr/lib/hive/apache-hive-1.1.0-bin
    export PATH=$PATH:$HIVE_HOME/bin
    export CLASSPATH=$CLASSPATH:/usr/local/Hadoop/lib/*:.
    export CLASSPATH=$CLASSPATH:/usr/local/hive/lib/*:.
    

    then i tried starting hive using bin/hive. I got the below error

    Logging initialized using configuration in jar:file:/usr/lib/hive/apache-hive-1.1.0-bin/lib/hive-common-1.1.0.jar!/hive-log4j.properties
    SLF4J: Class path contains multiple SLF4J bindings.
    SLF4J: Found binding in [jar:file:/usr/local/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
    SLF4J: Found binding in [jar:file:/usr/lib/hive/apache-hive-1.1.0-bin/lib/hive-jdbc-1.1.0-standalone.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.slf4j.impl.Log4jLoggerFactory]
    [ERROR] Terminal initialization failed; falling back to unsupported
    java.lang.IncompatibleClassChangeError: Found class jline.Terminal, but interface was expected
        at jline.TerminalFactory.create(TerminalFactory.java:101)
        at jline.TerminalFactory.get(TerminalFactory.java:158)
        at jline.console.ConsoleReader.<init>(ConsoleReader.java:229)
        at jline.console.ConsoleReader.<init>(ConsoleReader.java:221)
        at jline.console.ConsoleReader.<init>(ConsoleReader.java:209)
        at org.apache.hadoop.hive.cli.CliDriver.getConsoleReader(CliDriver.java:773)
        at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:715)
        at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:675)
        at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:615)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
    
    Exception in thread "main" java.lang.IncompatibleClassChangeError: Found class jline.Terminal, but interface was expected
        at jline.console.ConsoleReader.<init>(ConsoleReader.java:230)
        at jline.console.ConsoleReader.<init>(ConsoleReader.java:221)
        at jline.console.ConsoleReader.<init>(ConsoleReader.java:209)
        at org.apache.hadoop.hive.cli.CliDriver.getConsoleReader(CliDriver.java:773)
        at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:715)
        at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:675)
        at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:615)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
    

    解决方案

    I had the same problem and got it working from this link:

    https://cwiki.apache.org/confluence/display/Hive/Hive+on+Spark%3A+Getting+Started

    • Hive has upgraded to Jline2 but jline 0.9x exists in the Hadoop lib.

    So you should follow these steps:

    1. Delete jline from the Hadoop lib directory (it's only pulled in transitively from ZooKeeper).
    2. export HADOOP_USER_CLASSPATH_FIRST=true

    这篇关于Hive启动 - [错误]终端初始化失败;回落到不受支持的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆