【问题标题】:HIVE on TEZ (java.lang.RuntimeException: native snappy library not available: this version of libhadoop was built without snappy support)TEZ 上的 HIVE(java.lang.RuntimeException:本机 snappy 库不可用:此版本的 libhadoop 是在没有 snappy 支持的情况下构建的)
【发布时间】:2017-04-19 22:07:24
【问题描述】:

我的脚本不断出现同样的错误

java.lang.RuntimeException: native snappy library not available: this version of libhadoop was built without snappy support

代码本身是这样的

WITH step1 AS(
  SELECT columns
  FROM t1 stg
  WHERE time_key < '2017-04-08' AND time_key >= DATE_ADD('2017-04-08', -31)
  GROUP BY columns
  HAVING conditions1
)
, step2 AS(
  SELECT columns
  FROM t2
  WHERE conditions2
)
, step3 AS(
  SELECT columns
  FROM stg
  JOIN comverse_sub
  ON conditions3
)
INSERT INTO TABLE t1 PARTITION(time_key = '2017-04-08')
SELECT columns
FROM step3
WHERE conditions4

我检查了是否安装了 snappy

hadoop checknative -a

得到了

snappy:  true /usr/hdp/2.5.0.0-1245/hadoop/lib/native/libsnappy.so.1

我对 tez 的设置是

set tez.queue.name=adhoc;
set hive.execution.engine=tez;
set hive.tez.container.size=4096;
set hive.auto.convert.join=true;
set hive.exec.parallel=true;
set hive.tez.auto.reducer.parallelism=true;
SET hive.exec.compress.output=true;
SET tez.runtime.compress=true;
SET tez.runtime.compress.codec=org.apache.hadoop.io.compress.SnappyCodec;

我还应该注意,并非 tez 上的所有脚本都会失败。一些工作。喜欢这个

WITH hist AS(
  SELECT columns
  FROM t1
  WHERE conditions1
)
INSERT INTO TABLE t1 PARTITION(time_key)
SELECT columns
FROM hist
INNER JOIN t2
  on conditions2
INNER JOIN t3
  ON conditions3
WHERE conditions4

为什么会这样?

我检查了thisthisthis。没有帮助。此外,当我在 MR 上运行脚本时,它们都可以正常工作。

【问题讨论】:

    标签: hive snappy tez


    【解决方案1】:

    好吧,我解决了。我只是不断添加设置,直到它起作用。还是不知道是什么问题,解决的也不是很好,不过暂时还是可以的。

    set tez.queue.name=adhoc;
    set hive.execution.engine=tez;
    set hive.tez.container.size=4096;
    set hive.auto.convert.join=true;
    set hive.exec.parallel=true;
    set hive.tez.auto.reducer.parallelism=true;
    SET hive.exec.compress.output=true;
    SET tez.runtime.compress=true;
    SET tez.runtime.compress.codec=org.apache.hadoop.io.compress.SnappyCodec;
    SET das.reduce-tasks-per-node=12;
    SET das.map-tasks-per-node=12;
    SET das.job.map-task.memory=4096;
    SET das.job.reduce-task.memory=4096;
    SET das.job.application-manager.memory=4096;
    SET tez.runtime.io.sort.mb=512;
    SET tez.runtime.io.sort.factor=100;
    set hive.tez.min.partition.factor=0.25;
    set hive.tez.max.partition.factor=2.0;
    set mapred.reduce.tasks = -1;
    

    【讨论】:

      猜你喜欢
      • 2016-12-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-31
      • 2016-08-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多