Error while using Catalog in SQL Client

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Error while using Catalog in SQL Client

Yebgenya Lazarkhosrouabadi



I use SQL Client and want to access to the Hive Tables. Here is the configuration of the YAML file:




  - name: mynewhive

    type: hive

    property-version: 1

    hive-conf-dir: /home/myuser/Downloads/apache-hive-1.2.2-bin/conf

    hive-version: 1.2.1


# Execution properties



# Properties that change the fundamental execution behavior of a table program.



  # select the implementation responsible for planning table programs

  # possible values are 'old' (used by default) or 'blink'

  planner: old

  # 'batch' or 'streaming' execution

  type: streaming

  # allow 'event-time' or only 'processing-time' in sources

  time-characteristic: event-time

  # interval in ms for emitting periodic watermarks

  periodic-watermarks-interval: 200

  # 'changelog' or 'table' presentation of results

  result-mode: table

  # maximum number of maintained rows in 'table' presentation of results

  max-table-result-rows: 1000000

  # parallelism of the program

  parallelism: 1

  # maximum parallelism

  max-parallelism: 128

  # minimum idle state retention in ms

  min-idle-state-retention: 0

  # maximum idle state retention in ms

  max-idle-state-retention: 0

  # current catalog ('default_catalog' by default)

  current-catalog: default_catalog

  # current database of the current catalog (default database of the catalog by default)

  current-database: default_database

  # controls how table programs are restarted in case of a failures


    # strategy type

    # possible values are "fixed-delay", "failure-rate", "none", or "fallback" (default)

    type: fallback



I get this error when I try to start SQL Client:



Exception in thread "main" org.apache.flink.table.client.SqlClientException: The configured environment is invalid. Please check your environment files again.

               at org.apache.flink.table.client.SqlClient.validateEnvironment(

               at org.apache.flink.table.client.SqlClient.start(

               at org.apache.flink.table.client.SqlClient.main(

Caused by: org.apache.flink.table.client.gateway.SqlExecutionException: Could not create execution context.

               at org.apache.flink.table.client.gateway.local.LocalExecutor.getOrCreateExecutionContext(

               at org.apache.flink.table.client.gateway.local.LocalExecutor.validateSession(

               at org.apache.flink.table.client.SqlClient.validateEnvironment(

               ... 2 more

Caused by: java.lang.NoClassDefFoundError: org/apache/hive/common/util/HiveVersionInfo

               at org.apache.flink.table.catalog.hive.client.HiveShimLoader.getHiveVersion(

               at org.apache.flink.table.catalog.hive.factories.HiveCatalogFactory.createCatalog(

               at org.apache.flink.table.client.gateway.local.ExecutionContext.createCatalog(

               at org.apache.flink.table.client.gateway.local.ExecutionContext.lambda$new$0(

               at java.util.HashMap.forEach(

               at org.apache.flink.table.client.gateway.local.ExecutionContext.<init>(

               at org.apache.flink.table.client.gateway.local.LocalExecutor.getOrCreateExecutionContext(

               ... 4 more

Caused by: java.lang.ClassNotFoundException: org.apache.hive.common.util.HiveVersionInfo


               at java.lang.ClassLoader.loadClass(

               at sun.misc.Launcher$AppClassLoader.loadClass(

               at java.lang.ClassLoader.loadClass(

               ... 11 more



Can anyone help please?



Yebgenya Lazar



HINWEIS: Dies ist eine vertrauliche Nachricht und nur für den Adressaten bestimmt. Es ist nicht erlaubt, diese Nachricht zu kopieren oder Dritten zugänglich zu machen. Sollten Sie diese Nachricht irrtümlich erhalten haben, bitte ich um Ihre Mitteilung per E-Mail oder unter der oben angegebenen Telefonnummer.