Сбой запроса Hive на Tez DAG не удалось из-за VERTEX_FAILURE

У меня есть базовая настройка Ambari 2.5.3 и HDP 2.6.3, и я попытался выполнить несколько простых запросов ниже. Я не понимаю, почему это не удалось. Вы можете помочь?

[root@demo demo]# beeline
Beeline version 1.2.1000.2.6.3.0-235 by Apache Hive
beeline> !connect jdbc:hive2://localhost:10000/default hive hive
Connecting to jdbc:hive2://localhost:10000/default
Connected to: Apache Hive (version 1.2.1000.2.6.3.0-235)
Driver: Hive JDBC (version 1.2.1000.2.6.3.0-235)
Transaction isolation: TRANSACTION_REPEATABLE_READ
0: jdbc:hive2://localhost:10000/default> create table test2 (id int, desc varchar(40));
No rows affected (1.216 seconds)
0: jdbc:hive2://localhost:10000/default> insert into table test2 values (1,"aa"),(2,"bb");
INFO  : Tez session hasn't been created yet. Opening session
INFO  : Dag name: insert into table test2 ...(1,"aa"),(2,"bb")(Stage-1)
ERROR : Status: Failed
ERROR : Vertex failed, vertexName=Map 1, vertexId=vertex_1514250829950_0001_1_00, diagnostics=[Vertex vertex_1514250829950_0001_1_00 [Map 1] killed/failed due to:ROOT_INPUT_INIT_FAILURE, Vertex Input: values__tmp__table__1 initializer failed, vertex=vertex_1514250829950_0001_1_00 [Map 1], java.lang.NullPointerException
    at org.apache.hadoop.mapred.FileInputFormat.getBlockIndex(FileInputFormat.java:388)
    at org.apache.hadoop.mapred.FileInputFormat.getSplitHostsAndCachedHosts(FileInputFormat.java:579)
    at org.apache.hadoop.mapred.FileInputFormat.getSplits(FileInputFormat.java:359)
    at org.apache.hadoop.hive.ql.io.HiveInputFormat.addSplitsForGroup(HiveInputFormat.java:311)
    at org.apache.hadoop.hive.ql.io.HiveInputFormat.getSplits(HiveInputFormat.java:413)
    at org.apache.hadoop.hive.ql.exec.tez.HiveSplitGenerator.initialize(HiveSplitGenerator.java:155)
    at org.apache.tez.dag.app.dag.RootInputInitializerManager$InputInitializerCallable$1.run(RootInputInitializerManager.java:273)
    at org.apache.tez.dag.app.dag.RootInputInitializerManager$InputInitializerCallable$1.run(RootInputInitializerManager.java:266)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:422)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1866)
    at org.apache.tez.dag.app.dag.RootInputInitializerManager$InputInitializerCallable.call(RootInputInitializerManager.java:266)
    at org.apache.tez.dag.app.dag.RootInputInitializerManager$InputInitializerCallable.call(RootInputInitializerManager.java:253)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
]
ERROR : DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:0
Error: Error while processing statement: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Map 1, vertexId=vertex_1514250829950_0001_1_00, diagnostics=[Vertex vertex_1514250829950_0001_1_00 [Map 1] killed/failed due to:ROOT_INPUT_INIT_FAILURE, Vertex Input: values__tmp__table__1 initializer failed, vertex=vertex_1514250829950_0001_1_00 [Map 1], java.lang.NullPointerException
    at org.apache.hadoop.mapred.FileInputFormat.getBlockIndex(FileInputFormat.java:388)
    at org.apache.hadoop.mapred.FileInputFormat.getSplitHostsAndCachedHosts(FileInputFormat.java:579)
    at org.apache.hadoop.mapred.FileInputFormat.getSplits(FileInputFormat.java:359)
    at org.apache.hadoop.hive.ql.io.HiveInputFormat.addSplitsForGroup(HiveInputFormat.java:311)
    at org.apache.hadoop.hive.ql.io.HiveInputFormat.getSplits(HiveInputFormat.java:413)
    at org.apache.hadoop.hive.ql.exec.tez.HiveSplitGenerator.initialize(HiveSplitGenerator.java:155)
    at org.apache.tez.dag.app.dag.RootInputInitializerManager$InputInitializerCallable$1.run(RootInputInitializerManager.java:273)
    at org.apache.tez.dag.app.dag.RootInputInitializerManager$InputInitializerCallable$1.run(RootInputInitializerManager.java:266)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:422)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1866)
    at org.apache.tez.dag.app.dag.RootInputInitializerManager$InputInitializerCallable.call(RootInputInitializerManager.java:266)
    at org.apache.tez.dag.app.dag.RootInputInitializerManager$InputInitializerCallable.call(RootInputInitializerManager.java:253)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
]DAG did not succeed due to VERTEX_FAILURE. failedVertices:1 killedVertices:0 (state=08S01,code=2)

ОБНОВЛЕНИЕ 1

Это то, что у меня есть в конфигурации Hive

введите здесь описание изображения


person HP.    schedule 26.12.2017    source источник
comment
Попробуйте мой ответ по следующей ссылке, чтобы увидеть более подробное сообщение журнала: stackoverflow.com/a/36630460/2421561   -  person Ambrish    schedule 26.12.2017
comment
@Ambrish Я включил DEBUG и увидел такое же сообщение об ошибке в FileInputFormat.   -  person HP.    schedule 03.01.2018


Ответы (2)


Я столкнулся с той же проблемой, просто измените механизм выполнения на MR, и он будет работать.

person Manish Pansari    schedule 28.12.2017
comment
Переход на MR работает, но у меня может не быть полномочий для этого в нашем производственном кластере. Другие администраторы могут доставить мне неприятности, поэтому мне нужно сказать им, что нужно исправить в TEZ. Что вы предлагаете? - person HP.; 03.01.2018
comment
Я провел некоторые исследования и разработки по той же проблеме, но не понял основной причины, это связано с динамической памятью TEZ. вы можете увеличить память TEZ, изменив какое-то свойство, но если таблица большая, то она снова покажет ошибку. - person Manish Pansari; 03.01.2018
comment
@HP, вам не нужно заставлять администраторов менять его, даже если бы они это сделали, это была бы плохая идея. Просто измените его для своего запроса set hive.execution.engine=mr; - person MikeKulls; 25.06.2020

NPE может быть связано с mapred.FileInputFormat. Имя входного формата имеет значение. Попробуйте установить org.apache.hadoop.hive.ql.io.HiveInputFormat для hive.input.format.

установить hive.input.format=org.apache.hadoop.hive.ql.io.HiveInputFormat;

person Pushkar Mishra    schedule 27.12.2017