You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/06/24 16:41:49 UTC

[GitHub] [iceberg] jtLiBrain commented on issue #2468: master branch - flink sql create hive catalog error

jtLiBrain commented on issue #2468:
URL: https://github.com/apache/iceberg/issues/2468#issuecomment-1165747848

   > I build a jar file from master branch. when i create a hive catalog on flink sql client ,it comes a problem.
   > 
   > **the SQL is :**
   > 
   > ```
   > drop catalog if exists iceberg_catalog;
   > CREATE CATALOG iceberg_catalog WITH (
   >   'type'='iceberg',
   >   'catalog-type'='hive',
   >   'uri'='thrift://xxx1:9083,thrift://xxx2:9083',
   >   'clients'='5',
   >   'property-version'='1',
   >   'warehouse'='hdfs://hacluster/user/hive/warehouse'
   > );
   > ```
   > 
   > **error info:**
   > 
   > ```
   > java.lang.IllegalArgumentException: Cannot initialize Catalog, org.apache.iceberg.hive.HiveCatalog does not implement Catalog.
   > 	at org.apache.iceberg.CatalogUtil.loadCatalog(CatalogUtil.java:176)
   > 	at org.apache.iceberg.flink.CatalogLoader$HiveCatalogLoader.loadCatalog(CatalogLoader.java:112)
   > 	at org.apache.iceberg.flink.FlinkCatalog.<init>(FlinkCatalog.java:110)
   > 	at org.apache.iceberg.flink.FlinkCatalogFactory.createCatalog(FlinkCatalogFactory.java:130)
   > 	at org.apache.iceberg.flink.FlinkCatalogFactory.createCatalog(FlinkCatalogFactory.java:117)
   > 	at org.apache.flink.table.api.internal.TableEnvironmentImpl.createCatalog(TableEnvironmentImpl.java:1085)
   > 	at org.apache.flink.table.api.internal.TableEnvironmentImpl.executeOperation(TableEnvironmentImpl.java:1019)
   > 	at org.apache.flink.table.api.internal.TableEnvironmentImpl.executeSql(TableEnvironmentImpl.java:690)
   > 	at org.apache.zeppelin.flink.Flink111Shims.executeSql(Flink111Shims.java:374)
   > 	at org.apache.zeppelin.flink.FlinkSqlInterrpeter.callCreateCatalog(FlinkSqlInterrpeter.java:391)
   > 	at org.apache.zeppelin.flink.FlinkSqlInterrpeter.callCommand(FlinkSqlInterrpeter.java:244)
   > 	at org.apache.zeppelin.flink.FlinkSqlInterrpeter.runSqlList(FlinkSqlInterrpeter.java:151)
   > 	at org.apache.zeppelin.flink.FlinkSqlInterrpeter.internalInterpret(FlinkSqlInterrpeter.java:111)
   > 	at org.apache.zeppelin.interpreter.AbstractInterpreter.interpret(AbstractInterpreter.java:47)
   > 	at org.apache.zeppelin.interpreter.LazyOpenInterpreter.interpret(LazyOpenInterpreter.java:110)
   > 	at org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:808)
   > 	at org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:700)
   > 	at org.apache.zeppelin.scheduler.Job.run(Job.java:172)
   > 	at org.apache.zeppelin.scheduler.AbstractScheduler.runJob(AbstractScheduler.java:132)
   > 	at org.apache.zeppelin.scheduler.ParallelScheduler.lambda$runJobInScheduler$0(ParallelScheduler.java:46)
   > 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   > 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   > 	at java.lang.Thread.run(Thread.java:748)
   > Caused by: java.lang.ClassCastException: org.apache.iceberg.hive.HiveCatalog cannot be cast to org.apache.iceberg.catalog.Catalog
   > 	at org.apache.iceberg.CatalogUtil.loadCatalog(CatalogUtil.java:172)
   > 	... 22 more
   > ```
   > 
   > but when i'm using iceberg-flink-runtime-0.11.1.jar . it‘s seems ok. could you tell me how to fix this.
   
   I got the same exception when i use iceberg in Zeppline


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org