Ошибка пряжи: не удалось создать клиент Spark для сеанса Spak - PullRequest
0 голосов
/ 04 июля 2019

Я немного новичок в этом и у меня мало опыта, буду признателен за вашу помощь. Я пытаюсь установить Hive на существующую установку Spark.

Я в основном следовал инструкциям на этой странице без проблем.
https://github.com/dryshliak/hadoop/wiki/Installing-Hive-on-existing-Hadoop-cluster

Я также создал базу данных с именем warehouse и таблицу с именем test_table.

hive> show tables;
OK
employee
test_table
Time taken: 0.084 seconds, Fetched: 2 row(s)
hive> desc test_table;
OK
   col1                    int                     Integer Column
   col2                    string                  String Column
   Time taken: 0.052 seconds, Fetched: 2 row(s)
hive>

Проблема, с которой я сталкиваюсь, заключается в том, что при попытке вставить данные в test_table с помощью команды

hive> insert into test_table values(1,'aaa');

Я получаю сообщение об ошибке ниже

Идентификатор запроса = hadoop_20190703135836_4b17eeac-249d-4e54-bd98-1212f3cb5b5d Всего заданий = 1
Запуск задания 1 из 1
Чтобы изменить среднюю нагрузку для редуктора (в байтах):
set hive.exec.reducers.bytes.per.reducer =
Чтобы ограничить максимальное количество редукторов:
set hive.exec.reducers.max =
Чтобы установить постоянное количество редукторов:
set mapreduce.job.reduces =
Не удалось выполнить задачу зажигания, за исключением 'org.apache.hadoop.hive.ql.metadata.HiveException (Не удалось создать клиент Spark для сеанса Spark 821e05e7-74a8-4656-b4ed-3a622c9cadcc)'
СБОЙ: Ошибка выполнения, код возврата 30041 из org.apache.hadoop.hive.ql.exec.spark.SparkTask. Не удалось создать клиент Spark для сеанса Spark 821e05e7-74a8-4656-b4ed-3a622c9cadcc


Я использую следующие версии ПО
RHEL Server выпуск 7.5
Hadoop 3.1.1
Spark 2.4.0
Улей 3.1.1

Ниже вырезано из файла hive.log, в котором произошла ошибка.

2019-07-03T12:56:00,269  INFO [6beaec32-ecac-4dc1-b118-f2c86c385005 main] ql.Driver: Executing command(queryId=hadoop_20190703125557_f48a3966-691d-4c42-aee0-93f81fabef66): insert into test_table values(1,'aaa')   
2019-07-03T12:56:00,270  INFO [6beaec32-ecac-4dc1-b118-f2c86c385005 main] ql.Driver: Query ID = hadoop_20190703125557_f48a3966-691d-4c42-aee0-93f81fabef66   
2019-07-03T12:56:00,270  INFO [6beaec32-ecac-4dc1-b118-f2c86c385005 main] ql.Driver: Total jobs = 1   
2019-07-03T12:56:00,282  INFO [6beaec32-ecac-4dc1-b118-f2c86c385005 main] ql.Driver: Launching Job 1 out of 1   
2019-07-03T12:56:00,282  INFO [6beaec32-ecac-4dc1-b118-f2c86c385005 main] ql.Driver: Starting task [Stage-1:MAPRED] in serial mode   
2019-07-03T12:56:00,282  INFO [6beaec32-ecac-4dc1-b118-f2c86c385005 main] spark.SparkTask: In order to change the average load for a reducer (in bytes):   
2019-07-03T12:56:00,282  INFO [6beaec32-ecac-4dc1-b118-f2c86c385005 main] spark.SparkTask:   set hive.exec.reducers.bytes.per.reducer=<number>   
2019-07-03T12:56:00,282  INFO [6beaec32-ecac-4dc1-b118-f2c86c385005 main] spark.SparkTask: In order to limit the maximum number of reducers:   
2019-07-03T12:56:00,282  INFO [6beaec32-ecac-4dc1-b118-f2c86c385005 main] spark.SparkTask:   set hive.exec.reducers.max=<number>   
2019-07-03T12:56:00,282  INFO [6beaec32-ecac-4dc1-b118-f2c86c385005 main] spark.SparkTask: In order to set a constant number of reducers:   
2019-07-03T12:56:00,282  INFO [6beaec32-ecac-4dc1-b118-f2c86c385005 main] spark.SparkTask:   set mapreduce.job.reduces=<number>   
2019-07-03T12:56:00,284  INFO [6beaec32-ecac-4dc1-b118-f2c86c385005 main] session.SparkSessionManagerImpl: Setting up the session manager.   
2019-07-03T12:56:00,642  INFO [6beaec32-ecac-4dc1-b118-f2c86c385005 main] session.SparkSession: Trying to open Spark session e3b4aa82-29a5-4e82-b63b-742c5d35df3f   
2019-07-03T12:56:00,700 ERROR [6beaec32-ecac-4dc1-b118-f2c86c385005 main] spark.SparkTask: Failed to execute spark task, with exception 'org.apache.hadoop.hive.ql.metadata.HiveException(Failed to create Spark client for Spark session e3b4aa82-29a5-4e82-b63b-742c5d35df3f)'   
org.apache.hadoop.hive.ql.metadata.HiveException: Failed to create Spark client for Spark session e3b4aa82-29a5-4e82-b63b-742c5d35df3f   
        at org.apache.hadoop.hive.ql.exec.spark.session.SparkSessionImpl.getHiveException(SparkSessionImpl.java:221)   
        at org.apache.hadoop.hive.ql.exec.spark.session.SparkSessionImpl.open(SparkSessionImpl.java:92)   
        at org.apache.hadoop.hive.ql.exec.spark.session.SparkSessionManagerImpl.getSession(SparkSessionManagerImpl.java:115)   
        at org.apache.hadoop.hive.ql.exec.spark.SparkUtilities.getSparkSession(SparkUtilities.java:136)   
        at org.apache.hadoop.hive.ql.exec.spark.SparkTask.execute(SparkTask.java:115)   
        at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:205)   
        at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:97)   
        at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:2664)   
        at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:2335)   
        at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:2011)   
        at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1709)   
        at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1703)   
        at org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:157)   
        at org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:218)   
        at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:239)   
        at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:188)   
        at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:402)   
        at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:821)   
        at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:759)   
        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:318)   
        at org.apache.hadoop.util.RunJar.main(RunJar.java:232)   
Caused by: java.lang.NoClassDefFoundError: org/apache/spark/SparkConf   
        at org.apache.hadoop.hive.ql.exec.spark.HiveSparkClientFactory.generateSparkConf(HiveSparkClientFactory.java:263)   
        at org.apache.hadoop.hive.ql.exec.spark.RemoteHiveSparkClient.<init>(RemoteHiveSparkClient.java:98)   
        at org.apache.hadoop.hive.ql.exec.spark.HiveSparkClientFactory.createHiveSparkClient(HiveSparkClientFactory.java:76)   
        at org.apache.hadoop.hive.ql.exec.spark.session.SparkSessionImpl.open(SparkSessionImpl.java:87)   
        ... 24 more   
Caused by: java.lang.ClassNotFoundException: org.apache.spark.SparkConf   
        at java.net.URLClassLoader.findClass(URLClassLoader.java:382)   
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)   
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)   
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)   
        ... 28 more   
2019-07-03T12:56:00,700 ERROR [6beaec32-ecac-4dc1-b118-f2c86c385005 main] spark.SparkTask: Failed to execute spark task, with exception 'org.apache.hadoop.hive.ql.metadata.HiveException(Failed to create Spark client for Spark session e3b4aa82-29a5-4e82-b63b-742c5d35df3f)'   
org.apache.hadoop.hive.ql.metadata.HiveException: Failed to create Spark client for Spark session e3b4aa82-29a5-4e82-b63b-742c5d35df3f   
        at org.apache.hadoop.hive.ql.exec.spark.session.SparkSessionImpl.getHiveException(SparkSessionImpl.java:221) ~[hive-exec-3.1.1.jar:3.1.1]   
        at org.apache.hadoop.hive.ql.exec.spark.session.SparkSessionImpl.open(SparkSessionImpl.java:92) ~[hive-exec-3.1.1.jar:3.1.1]   
        at org.apache.hadoop.hive.ql.exec.spark.session.SparkSessionManagerImpl.getSession(SparkSessionManagerImpl.java:115) ~[hive-exec-3.1.1.jar:3.1.1]   
        at org.apache.hadoop.hive.ql.exec.spark.SparkUtilities.getSparkSession(SparkUtilities.java:136) ~[hive-exec-3.1.1.jar:3.1.1]   
        at org.apache.hadoop.hive.ql.exec.spark.SparkTask.execute(SparkTask.java:115) ~[hive-exec-3.1.1.jar:3.1.1]   
        at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:205) ~[hive-exec-3.1.1.jar:3.1.1]   
        at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:97) ~[hive-exec-3.1.1.jar:3.1.1]   
        at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:2664) ~[hive-exec-3.1.1.jar:3.1.1]   
        at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:2335) ~[hive-exec-3.1.1.jar:3.1.1]   
        at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:2011) ~[hive-exec-3.1.1.jar:3.1.1]   
        at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1709) ~[hive-exec-3.1.1.jar:3.1.1]   
        at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1703) ~[hive-exec-3.1.1.jar:3.1.1]   
        at org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:157) ~[hive-exec-3.1.1.jar:3.1.1]   
        at org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:218) ~[hive-exec-3.1.1.jar:3.1.1]   
        at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:239) ~[hive-cli-3.1.1.jar:3.1.1]   
        at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:188) ~[hive-cli-3.1.1.jar:3.1.1]   
        at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:402) ~[hive-cli-3.1.1.jar:3.1.1]   
        at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:821) ~[hive-cli-3.1.1.jar:3.1.1]   
        at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:759) ~[hive-cli-3.1.1.jar:3.1.1]   
        at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:683) ~[hive-cli-3.1.1.jar:3.1.1]   
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_191]   
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_191]   
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_191]   
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_191]   
        at org.apache.hadoop.util.RunJar.run(RunJar.java:318) ~[hadoop-common-3.1.1.jar:?]   
        at org.apache.hadoop.util.RunJar.main(RunJar.java:232) ~[hadoop-common-3.1.1.jar:?]   
Caused by: java.lang.NoClassDefFoundError: org/apache/spark/SparkConf   
        at org.apache.hadoop.hive.ql.exec.spark.HiveSparkClientFactory.generateSparkConf(HiveSparkClientFactory.java:263) ~[hive-exec-3.1.1.jar:3.1.1]   
        at org.apache.hadoop.hive.ql.exec.spark.RemoteHiveSparkClient.<init>(RemoteHiveSparkClient.java:98) ~[hive-exec-3.1.1.jar:3.1.1]   
        at org.apache.hadoop.hive.ql.exec.spark.HiveSparkClientFactory.createHiveSparkClient(HiveSparkClientFactory.java:76) ~[hive-exec-3.1.1.jar:3.1.1]   
        at org.apache.hadoop.hive.ql.exec.spark.session.SparkSessionImpl.open(SparkSessionImpl.java:87) ~[hive-exec-3.1.1.jar:3.1.1]   
        ... 24 more   
Caused by: java.lang.ClassNotFoundException: org.apache.spark.SparkConf   
        at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[?:1.8.0_191]   
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_191]   
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) ~[?:1.8.0_191]   
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_191]   
        at org.apache.hadoop.hive.ql.exec.spark.HiveSparkClientFactory.generateSparkConf(HiveSparkClientFactory.java:263) ~[hive-exec-3.1.1.jar:3.1.1]   
        at org.apache.hadoop.hive.ql.exec.spark.RemoteHiveSparkClient.<init>(RemoteHiveSparkClient.java:98) ~[hive-exec-3.1.1.jar:3.1.1]   
        at org.apache.hadoop.hive.ql.exec.spark.HiveSparkClientFactory.createHiveSparkClient(HiveSparkClientFactory.java:76) ~[hive-exec-3.1.1.jar:3.1.1]   
        at org.apache.hadoop.hive.ql.exec.spark.session.SparkSessionImpl.open(SparkSessionImpl.java:87) ~[hive-exec-3.1.1.jar:3.1.1]   
        ... 24 more   
2019-07-03T12:56:00,701  INFO [6beaec32-ecac-4dc1-b118-f2c86c385005 main] reexec.ReOptimizePlugin: ReOptimization: retryPossible: false   
2019-07-03T12:56:00,701 ERROR [6beaec32-ecac-4dc1-b118-f2c86c385005 main] ql.Driver: FAILED: Execution Error, return code 30041 from org.apache.hadoop.hive.ql.exec.spark.SparkTask. Failed to create Spark client for Spark session e3b4aa82-29a5-4e82-b63b-742c5d35df3f   
2019-07-03T12:56:00,701  INFO [6beaec32-ecac-4dc1-b118-f2c86c385005 main] ql.Driver: Completed executing command(queryId=hadoop_20190703125557_f48a3966-691d-4c42-aee0-93f81fabef66); Time taken: 0.432 seconds   
2019-07-03T12:56:00,701  INFO [6beaec32-ecac-4dc1-b118-f2c86c385005 main] ql.Driver: Concurrency mode is disabled, not creating a lock manager   
2019-07-03T12:56:00,721  INFO [6beaec32-ecac-4dc1-b118-f2c86c385005 main] conf.HiveConf: Using the default value passed in for log id: 6beaec32-ecac-4dc1-b118-f2c86c385005   
2019-07-03T12:56:00,721  INFO [6beaec32-ecac-4dc1-b118-f2c86c385005 main] session.SessionState: Resetting thread name to  main   
...