OSS #
Download paimon-oss-0.8.2.jar.If you have already configured oss access through Flink (Via Flink FileSystem), here you can skip the following configuration.
Put paimon-oss-0.8.2.jar
into lib
directory of your Flink home, and create catalog:
CREATE CATALOG my_catalog WITH (
'type' = 'paimon',
'warehouse' = 'oss://<bucket>/<path>',
'fs.oss.endpoint' = 'oss-cn-hangzhou.aliyuncs.com',
'fs.oss.accessKeyId' = 'xxx',
'fs.oss.accessKeySecret' = 'yyy'
);
If you have already configured oss access through Spark (Via Hadoop FileSystem), here you can skip the following configuration.
Place paimon-oss-0.8.2.jar
together with paimon-spark-0.8.2.jar
under Spark’s jars directory, and start like
spark-sql \
--conf spark.sql.catalog.paimon=org.apache.paimon.spark.SparkCatalog \
--conf spark.sql.catalog.paimon.warehouse=oss://<bucket>/<path> \
--conf spark.sql.catalog.paimon.fs.oss.endpoint=oss-cn-hangzhou.aliyuncs.com \
--conf spark.sql.catalog.paimon.fs.oss.accessKeyId=xxx \
--conf spark.sql.catalog.paimon.fs.oss.accessKeySecret=yyy
If you have already configured oss access through Hive (Via Hadoop FileSystem), here you can skip the following configuration.
NOTE: You need to ensure that Hive metastore can access oss
.
Place paimon-oss-0.8.2.jar
together with paimon-hive-connector-0.8.2.jar
under Hive’s auxlib directory, and start like
SET paimon.fs.oss.endpoint=oss-cn-hangzhou.aliyuncs.com;
SET paimon.fs.oss.accessKeyId=xxx;
SET paimon.fs.oss.accessKeySecret=yyy;
And read table from hive metastore, table can be created by Flink or Spark, see Catalog with Hive Metastore
SELECT * FROM test_table;
SELECT COUNT(1) FROM test_table;
From version 0.8, paimon-trino uses trino filesystem as basic file read and write system. We strongly recommend you to use jindo-sdk in trino.
You can find How to config jindo sdk on trino here. Please note that:
- Use paimon to replace hive-hadoop2 when you decompress the plugin jar and find location to put in.
- You can specify the
core-site.xml
inpaimon.properties
on configuration hive.config.resources. - Presto and Jindo use the same configuration method.