asnowfox edited a comment on issue #2468:
URL: https://github.com/apache/iceberg/issues/2468#issuecomment-927508700


   in my flink cluster. it runs like this:
   `
   Flink SQL> CREATE CATALOG flow_catalog WITH (
   >   'type'='iceberg',
   >   'catalog-type'='hadoop',
   >   'warehouse'='hdfs://namenode-206-10:8020/warehouse/flows',
   >   'property-version'='1'
   > );
   2021-09-27 11:56:43,219 WARN  
org.apache.hadoop.hdfs.shortcircuit.DomainSocketFactory      [] - The 
short-circuit local reads feature cannot be used because libhadoop cannot be 
loaded.
   [INFO] Catalog has been created.
   
   Flink SQL> use catalog flow_catalog;
   
   Flink SQL> CREATE DATABASE iceberg_db;
   [ERROR] Could not execute SQL statement. Reason:
   org.apache.iceberg.exceptions.AlreadyExistsException: Namespace already 
exists: iceberg_db
   
   Flink SQL> drop database iceberg_db;
   [ERROR] Could not execute SQL statement. Reason:
   org.apache.iceberg.exceptions.NamespaceNotEmptyException: Namespace 
iceberg_db is not empty.
   
   Flink SQL> use iceberg_db;
   
   Flink SQL> show tables;
   test
   
   Flink SQL> drop table test;
   [INFO] Table has been removed.
   
   Flink SQL> drop database iceberg_db;
   [INFO] Database has been removed.
   
   Flink SQL> CREATE DATABASE iceberg_db;
   [INFO] Database has been created.
   
   Flink SQL> USE iceberg_db;
   
   Flink SQL> CREATE TABLE test (
   >     id BIGINT COMMENT 'unique id',
   >     data STRING
   > );
   [INFO] Table has been created.
   
   Flink SQL> INSERT INTO test VALUES (1, 'a');
   [INFO] Submitting SQL update statement to the cluster...
   [INFO] Table update statement has been successfully submitted to the cluster:
   Job ID: 68bf513689c4920e2af3d49f4231945f
   
   
   Flink SQL> select * from test;
   [INFO] Result retrieval cancelled.
   
   Flink SQL> 
   > SET execution.type = batch;
   [INFO] Session property has been set.
   
   Flink SQL> select * from test;
   [ERROR] Could not execute SQL statement. Reason:
   java.lang.ClassCastException: org.apache.iceberg.hadoop.HadoopCatalog cannot 
be cast to org.apache.iceberg.catalog.Catalog
   
   Flink SQL>  set execution.type = streaming;
   [INFO] Session property has been set.
   
   Flink SQL> select * from test;
   [ERROR] Could not execute SQL statement. Reason:
   java.lang.ClassCastException: org.apache.iceberg.hadoop.HadoopCatalog cannot 
be cast to org.apache.iceberg.catalog.Catalog
   
   Flink SQL> 
   
   `
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to