Hive不会在Hortonworks 2.2.4中运行

时间:2021-10-22 14:55:44

I've just downloaded Hortonworks Sandbox 2.2.4, and I noticed when I follow the Hortonwork's tutorial on Hive, I get this,

我刚刚下载了Hortonworks Sandbox 2.2.4,我注意到当我按照Hortonwork的Hive教程,我得到了这个,

HCatClienterroroncreatetable: {
    "statement": "use default; create table nyse_stocks(`exchange` string, `stock_symbol` string, `date` string, `stock_price_open` float, `stock_price_high` float, `stock_price_low` float, `stock_price_close` float, `stock_volume` bigint, `stock_price_adj_close` float) row format delimited fields terminated by '\\t';",
    "error": "unable to create table: nyse_stocks",
    "exec": {
        "stdout": "",
        "stderr": "
        15/05/05 09:57:50 WARN conf.HiveConf: HiveConf of name hive.heapsize does not exist
        15/05/05 09:57:50 WARN conf.HiveConf: HiveConf of name hive.server2.enable.impersonation does not exist
        SLF4J: Class path contains multiple SLF4J bindings.
        SLF4J: Found binding in [jar:file:/usr/hdp/2.2.4.2-2/hadoop/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
        SLF4J: Found binding in                                                         [jar:file:/usr/hdp/2.2.4.2-2/hive/lib/hive-jdbc-0.14.0.2.2.4.2-2-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]
        Command  was terminated due to timeout(60000ms).  See templeton.exec.timeout property",
        "exitcode": 143
    }
}(error500)

When I ssh into the Sandbox, and I simply type hive on shell, I get this the output inside the stderr,

当我进入Sandbox,我只是在shell上输入hive时,我得到了stderr中的输出,

15/05/05 09:57:50 WARN conf.HiveConf: HiveConf of name hive.heapsize does not exist
15/05/05 09:57:50 WARN conf.HiveConf: HiveConf of name hive.server2.enable.impersonation does not exist
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/hdp/2.2.4.2-2/hadoop/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in                                                         [jar:file:/usr/hdp/2.2.4.2-2/hive/lib/hive-jdbc-0.14.0.2.2.4.2-2-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]

What could be the solution for this?

这可能是什么解决方案?

1 个解决方案

#1


There is a problem (due to incompatibility) with SerDe jar, inside sandbox. I had the same problem and after a few googles, I found a solution at https://github.com/brandonswilson.

沙箱内的SerDe jar存在问题(由于不兼容)。我有同样的问题,经过一些谷歌,我在https://github.com/brandonswilson找到了解决方案。

Here is what I did:

这是我做的:

a-)removed the first line from hiveddl.sql

a-)从hiveddl.sql中删除了第一行

b-)changed line 34 to: ROW FORMAT SERDE 'org.apache.hive.hcatalog.data.JsonSerDe'

b-)将第34行更改为:ROW FORMAT SERDE'org.apache.hive.hcatalog.data.JsonSerDe'

That's it!

(After to run hive -f hiveddl.sql I got a problem at line 119:

(之后运行hive -f hiveddl.sql我遇到了第119行的问题:

-- FAILED: SemanticException Unrecognized file format in STORED AS clause: 'RCFILESE' --

- FAILED:SemanticException STORED AS子句中无法识别的文件格式:'RCFILESE' -

Was: STORED AS RCFilese

是:存储为RCFilese

I changed to: STORED AS RCFile

我改为:STORED AS RCFile

You could try to change before to run.)

您可以尝试在运行之前进行更改。)

Daniel Galizi.

#1


There is a problem (due to incompatibility) with SerDe jar, inside sandbox. I had the same problem and after a few googles, I found a solution at https://github.com/brandonswilson.

沙箱内的SerDe jar存在问题(由于不兼容)。我有同样的问题,经过一些谷歌,我在https://github.com/brandonswilson找到了解决方案。

Here is what I did:

这是我做的:

a-)removed the first line from hiveddl.sql

a-)从hiveddl.sql中删除了第一行

b-)changed line 34 to: ROW FORMAT SERDE 'org.apache.hive.hcatalog.data.JsonSerDe'

b-)将第34行更改为:ROW FORMAT SERDE'org.apache.hive.hcatalog.data.JsonSerDe'

That's it!

(After to run hive -f hiveddl.sql I got a problem at line 119:

(之后运行hive -f hiveddl.sql我遇到了第119行的问题:

-- FAILED: SemanticException Unrecognized file format in STORED AS clause: 'RCFILESE' --

- FAILED:SemanticException STORED AS子句中无法识别的文件格式:'RCFILESE' -

Was: STORED AS RCFilese

是:存储为RCFilese

I changed to: STORED AS RCFile

我改为:STORED AS RCFile

You could try to change before to run.)

您可以尝试在运行之前进行更改。)

Daniel Galizi.