samredai commented on code in PR #4993: URL: https://github.com/apache/iceberg/pull/4993#discussion_r895354472
########## docs/integrations/dell.md: ########## @@ -0,0 +1,150 @@ +--- +title: "Dell" +url: dell +--- +<!-- + - Licensed to the Apache Software Foundation (ASF) under one or more + - contributor license agreements. See the NOTICE file distributed with + - this work for additional information regarding copyright ownership. + - The ASF licenses this file to You under the Apache License, Version 2.0 + - (the "License"); you may not use this file except in compliance with + - the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, software + - distributed under the License is distributed on an "AS IS" BASIS, + - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + - See the License for the specific language governing permissions and + - limitations under the License. + --> + + +# Iceberg Dell Integrations + +## Dell ECS Integrations + +This session will show you how to use Iceberg with Dell ECS. Dell ECS provides several features that are more appropriate for Iceberg: Review Comment: There may be a better word than session to use here. I see that you mean a sort of reading session but I think that word is used in a lot of other places to mean specific things (like a Spark session). Maybe just say "Iceberg can be used with Dell's Enterprise Object Storage (ECS) by using the ECS catalog." ########## docs/integrations/dell.md: ########## @@ -0,0 +1,150 @@ +--- +title: "Dell" +url: dell +--- +<!-- + - Licensed to the Apache Software Foundation (ASF) under one or more + - contributor license agreements. See the NOTICE file distributed with + - this work for additional information regarding copyright ownership. + - The ASF licenses this file to You under the Apache License, Version 2.0 + - (the "License"); you may not use this file except in compliance with + - the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, software + - distributed under the License is distributed on an "AS IS" BASIS, + - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + - See the License for the specific language governing permissions and + - limitations under the License. + --> + + +# Iceberg Dell Integrations + +## Dell ECS Integrations + +This session will show you how to use Iceberg with Dell ECS. Dell ECS provides several features that are more appropriate for Iceberg: + +1. Append operation for file writer. +2. CAS operation for Table commit. + +See [Dell ECS](https://www.dell.com/en-us/dt/storage/ecs/index.htm) for more information on Dell ECS. + +### Connection parameters + +When you try to connect Dell ECS with Iceberg, these connection parameters should be prepared: + +| Name | Description | +| ------------------------ | ---------------------- | +| ecs.s3.endpoint | ECS S3 service endpoint | +| ecs.s3.access-key-id | Username | +| ecs.s3.secret-access-key | S3 Secret Key | + +As for the catalog, you should provide a warehouse location where will store all data and metadata later. + +| Example | Description | +| -------------------------- | --------------------------------------------------------------- | +| ecs://bucket-a | Use the whole bucket as the data | +| ecs://bucket-a/namespace-a | Use a prefix to access the data only in this specific namespace | + +When you provide the `warehouse`, the last / will be ignored. The `ecs://bucket-a` is same with `ecs://bucket-a/`. + +### Dependencies of runtime + +The Iceberg `runtime` jar supports different versions of Spark and Flink. If the version was not matched in the example, please check the related document of Spark and Flink. + +Even though the [Dell ECS client](https://github.com/EMCECS/ecs-object-client-java) jar is backward compatible, Dell ECS still recommends using the latest version of the client. + +### Spark + +For example, to use the Dell ECS catalog with Spark 3.2.1, you should create a Spark session like: + +```sh +spark-sql --packages org.apache.iceberg:iceberg-spark-runtime-3.2_2.12:0.14.0,com.emc.ecs:object-client-bundle:3.3.2 \ Review Comment: The different mechanisms to set the spark configuration feels like material more suited for a quickstart. Since the properties are listed in the `Connection parameters` section above--here I think it just needs to describe the added prefix to set these in Spark (`ecs.s3.endpoint` is set as `spark.sql.catalog.<catalog-name>.ecs.s3.endpoint`) In a quickstart, we can include this in a tabbed box with a spark-sql, spark-shell, and pyspark example to give something easy to copy & paste. ########## docs/integrations/dell.md: ########## @@ -0,0 +1,150 @@ +--- +title: "Dell" +url: dell +--- +<!-- + - Licensed to the Apache Software Foundation (ASF) under one or more + - contributor license agreements. See the NOTICE file distributed with + - this work for additional information regarding copyright ownership. + - The ASF licenses this file to You under the Apache License, Version 2.0 + - (the "License"); you may not use this file except in compliance with + - the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, software + - distributed under the License is distributed on an "AS IS" BASIS, + - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + - See the License for the specific language governing permissions and + - limitations under the License. + --> + + +# Iceberg Dell Integrations + +## Dell ECS Integrations + +This session will show you how to use Iceberg with Dell ECS. Dell ECS provides several features that are more appropriate for Iceberg: + +1. Append operation for file writer. +2. CAS operation for Table commit. + +See [Dell ECS](https://www.dell.com/en-us/dt/storage/ecs/index.htm) for more information on Dell ECS. + +### Connection parameters + +When you try to connect Dell ECS with Iceberg, these connection parameters should be prepared: + +| Name | Description | +| ------------------------ | ---------------------- | +| ecs.s3.endpoint | ECS S3 service endpoint | +| ecs.s3.access-key-id | Username | +| ecs.s3.secret-access-key | S3 Secret Key | + +As for the catalog, you should provide a warehouse location where will store all data and metadata later. + +| Example | Description | +| -------------------------- | --------------------------------------------------------------- | +| ecs://bucket-a | Use the whole bucket as the data | +| ecs://bucket-a/namespace-a | Use a prefix to access the data only in this specific namespace | + +When you provide the `warehouse`, the last / will be ignored. The `ecs://bucket-a` is same with `ecs://bucket-a/`. Review Comment: nit: Maybe add backticks around the `/`? ########## docs/integrations/dell.md: ########## @@ -0,0 +1,150 @@ +--- +title: "Dell" +url: dell +--- +<!-- + - Licensed to the Apache Software Foundation (ASF) under one or more + - contributor license agreements. See the NOTICE file distributed with + - this work for additional information regarding copyright ownership. + - The ASF licenses this file to You under the Apache License, Version 2.0 + - (the "License"); you may not use this file except in compliance with + - the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, software + - distributed under the License is distributed on an "AS IS" BASIS, + - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + - See the License for the specific language governing permissions and + - limitations under the License. + --> + + +# Iceberg Dell Integrations + +## Dell ECS Integrations + +This session will show you how to use Iceberg with Dell ECS. Dell ECS provides several features that are more appropriate for Iceberg: + +1. Append operation for file writer. +2. CAS operation for Table commit. + +See [Dell ECS](https://www.dell.com/en-us/dt/storage/ecs/index.htm) for more information on Dell ECS. + +### Connection parameters + +When you try to connect Dell ECS with Iceberg, these connection parameters should be prepared: + +| Name | Description | +| ------------------------ | ---------------------- | +| ecs.s3.endpoint | ECS S3 service endpoint | +| ecs.s3.access-key-id | Username | +| ecs.s3.secret-access-key | S3 Secret Key | + +As for the catalog, you should provide a warehouse location where will store all data and metadata later. + +| Example | Description | +| -------------------------- | --------------------------------------------------------------- | +| ecs://bucket-a | Use the whole bucket as the data | +| ecs://bucket-a/namespace-a | Use a prefix to access the data only in this specific namespace | + +When you provide the `warehouse`, the last / will be ignored. The `ecs://bucket-a` is same with `ecs://bucket-a/`. + +### Dependencies of runtime + +The Iceberg `runtime` jar supports different versions of Spark and Flink. If the version was not matched in the example, please check the related document of Spark and Flink. + +Even though the [Dell ECS client](https://github.com/EMCECS/ecs-object-client-java) jar is backward compatible, Dell ECS still recommends using the latest version of the client. + +### Spark + +For example, to use the Dell ECS catalog with Spark 3.2.1, you should create a Spark session like: + +```sh +spark-sql --packages org.apache.iceberg:iceberg-spark-runtime-3.2_2.12:0.14.0,com.emc.ecs:object-client-bundle:3.3.2 \ + --conf spark.sql.catalog.my_catalog=org.apache.iceberg.spark.SparkCatalog \ + --conf spark.sql.catalog.my_catalog.warehouse=ecs://bucket-a/namespace-a \ + --conf spark.sql.catalog.my_catalog.catalog-impl=org.apache.iceberg.dell.ecs.EcsCatalog \ + --conf spark.sql.catalog.my_catalog.ecs.s3.endpoint=http://10.x.x.x:9020 \ + --conf spark.sql.catalog.my_catalog.ecs.s3.access-key-id=test \ + --conf spark.sql.catalog.my_catalog.ecs.s3.secret-access-key=xxxxxxxxxxxxxxxx +``` + +```python +from pyspark.sql import SparkSession + +spark = SparkSession.builder\ + .config("spark.jars.packages", "org.apache.iceberg:iceberg-spark-runtime-3.2_2.12:0.14.0,com.emc.ecs:object-client-bundle:3.3.2")\ + .config("spark.sql.extensions", "org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions")\ + .config("spark.sql.catalog.my_catalog", "org.apache.iceberg.spark.SparkCatalog")\ + .config("spark.sql.catalog.my_catalog.warehouse", "ecs://bucket-a/namespace-a")\ + .config("spark.sql.catalog.my_catalog.catalog-impl", "org.apache.iceberg.dell.ecs.EcsCatalog")\ + .config("spark.sql.catalog.my_catalog.ecs.s3.endpoint", "http://10.x.x.x:9020")\ + .config("spark.sql.catalog.my_catalog.ecs.s3.access-key-id", "test")\ + .config("spark.sql.catalog.my_catalog.ecs.s3.secret-access-key", "xxxxxxxxxxxxxxxx")\ + .getOrCreate() +``` + +Then, use `my_catalog` to access the data in ECS. You can use `SHOW NAMESPACES IN my_catalog` and `SHOW TABLES IN my_catalog` to fetch the namespaces and tables of the catalog. + +The related problems of catalog usage: + +1. The [pyspark.sql.SparkSession.catalog](https://spark.apache.org/docs/latest/api/python/reference/api/pyspark.sql.SparkSession.catalog.html#pyspark.sql.SparkSession.catalog) won't access the 3rd-party catalog of Spark, so please use DDL SQL to list all tables and namespaces. + + +### Flink + +For example, to use the Dell ECS catalog with Flink 1.14, you should create a Flink environment like: + +```sh +wget https://repo1.maven.org/maven2/org/apache/iceberg/iceberg-flink-runtime-1.14/0.14.0/iceberg-flink-runtime-1.14-0.14.0.jar +wget https://repo1.maven.org/maven2/com/emc/ecs/object-client-bundle/3.3.2/object-client-bundle-3.3.2.jar + +sql-client.sh embedded -j iceberg-flink-runtime-1.14-0.14.0.jar -j object-client-bundle-3.3.2.jar shell +``` + +```python +import requests +from pyflink.datastream import StreamExecutionEnvironment +from pyflink.table import StreamTableEnvironment + +# Set your workspace +work_space = "/" + +# Download libraries +maven_url="https://repo1.maven.org/maven2" +with open(f"{work_space}/iceberg-flink-runtime-1.14-0.14.0.jar", "wb") as f: + f.write(requests.get(f"{maven_url}/org/apache/iceberg/iceberg-flink-runtime-1.14/0.14.0/iceberg-flink-runtime-1.14-0.14.0.jar").content) +with open(f"{work_space}/object-client-bundle-3.3.2.jar", "wb") as f: + f.write(requests.get(f"{maven_url}/com/emc/ecs/object-client-bundle/3.3.2/object-client-bundle-3.3.2.jar").content) + +jars = ["iceberg-flink-runtime-1.14-0.14.0.jar", "object-client-bundle-3.3.2.jar"] +pipeline_jars = [f"file://{work_space}/{jar}" for jar in jars] + +# Setup Flink session +env = StreamExecutionEnvironment.get_execution_environment() +env.add_jars(*pipeline_jars) +t_env = StreamTableEnvironment.create(env) +``` + +Then, use Flink SQL to create a catalog named `my_catalog`: + +```SQL +CREATE CATALOG my_catalog WITH ( + 'type'='iceberg', + 'warehouse' = 'ecs://bucket-a/namespace-a', + 'catalog-impl'='org.apache.iceberg.dell.ecs.EcsCatalog', + 'ecs.s3.endpoint' = 'http://10.x.x.x:9020', + 'ecs.s3.access-key-id' = 'test', + 'ecs.s3.secret-access-key' = 'xxxxxxxxxxxxxxxx') +``` + +Then, `USE CATALOG my_catalog`, `SHOW DATABASES`, and `SHOW TABLES` to fetch the namespaces and tables of the catalog. + +### Limitations + +When you use the catalog with Dell ECS only, you should care about these limitations: + +1. The rename operation is supported without other protections. When you try to rename a table, you need to guarantee all commits are finished in the original table. +2. The rename operation only renames the table without moving any data file. The renamed table maybe store data objects in different paths even not in the warehouse that is configured in the catalog. Review Comment: This needs some rewording. How about: > `RENAME` statements only renames the table without moving any data files. This can lead to a table's data being stored in a path outside of the configured warehouse path. ########## docs/integrations/dell.md: ########## @@ -0,0 +1,150 @@ +--- +title: "Dell" +url: dell +--- +<!-- + - Licensed to the Apache Software Foundation (ASF) under one or more + - contributor license agreements. See the NOTICE file distributed with + - this work for additional information regarding copyright ownership. + - The ASF licenses this file to You under the Apache License, Version 2.0 + - (the "License"); you may not use this file except in compliance with + - the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, software + - distributed under the License is distributed on an "AS IS" BASIS, + - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + - See the License for the specific language governing permissions and + - limitations under the License. + --> + + +# Iceberg Dell Integrations + +## Dell ECS Integrations Review Comment: This h2 title and the h1 title above it feels redundant. I would consolidate them into a single title such as `# Dell ECS` or `# Dell ECS Catalog`. Also I think the word "Integration" refers more to Iceberg's incorporation into compute/query engines such as Spark or Trino. I could be wrong but I think Dell ECS is more of an "Implementation". ########## docs/integrations/dell.md: ########## @@ -0,0 +1,150 @@ +--- +title: "Dell" +url: dell +--- +<!-- + - Licensed to the Apache Software Foundation (ASF) under one or more + - contributor license agreements. See the NOTICE file distributed with + - this work for additional information regarding copyright ownership. + - The ASF licenses this file to You under the Apache License, Version 2.0 + - (the "License"); you may not use this file except in compliance with + - the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, software + - distributed under the License is distributed on an "AS IS" BASIS, + - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + - See the License for the specific language governing permissions and + - limitations under the License. + --> + + +# Iceberg Dell Integrations + +## Dell ECS Integrations + +This session will show you how to use Iceberg with Dell ECS. Dell ECS provides several features that are more appropriate for Iceberg: + +1. Append operation for file writer. +2. CAS operation for Table commit. + +See [Dell ECS](https://www.dell.com/en-us/dt/storage/ecs/index.htm) for more information on Dell ECS. + +### Connection parameters + +When you try to connect Dell ECS with Iceberg, these connection parameters should be prepared: + +| Name | Description | +| ------------------------ | ---------------------- | +| ecs.s3.endpoint | ECS S3 service endpoint | +| ecs.s3.access-key-id | Username | Review Comment: nit: Replace "Username" with "ECS Username" ########## docs/integrations/dell.md: ########## @@ -0,0 +1,150 @@ +--- +title: "Dell" +url: dell +--- +<!-- + - Licensed to the Apache Software Foundation (ASF) under one or more + - contributor license agreements. See the NOTICE file distributed with + - this work for additional information regarding copyright ownership. + - The ASF licenses this file to You under the Apache License, Version 2.0 + - (the "License"); you may not use this file except in compliance with + - the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, software + - distributed under the License is distributed on an "AS IS" BASIS, + - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + - See the License for the specific language governing permissions and + - limitations under the License. + --> + + +# Iceberg Dell Integrations + +## Dell ECS Integrations + +This session will show you how to use Iceberg with Dell ECS. Dell ECS provides several features that are more appropriate for Iceberg: + +1. Append operation for file writer. Review Comment: The line above mentions "several features" but then only lists 2. Does it make more sense to provide a more comprehensive list of features or to reword the above sentence to say something like: > Dell ECS has many features that make Iceberg a highly compatible table format, such as append operations for file writers and content addressable storage (CAS) for table commits. ...then you can exclude this numbered list. What do you think? ########## docs/integrations/dell.md: ########## @@ -0,0 +1,150 @@ +--- +title: "Dell" +url: dell +--- +<!-- + - Licensed to the Apache Software Foundation (ASF) under one or more + - contributor license agreements. See the NOTICE file distributed with + - this work for additional information regarding copyright ownership. + - The ASF licenses this file to You under the Apache License, Version 2.0 + - (the "License"); you may not use this file except in compliance with + - the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, software + - distributed under the License is distributed on an "AS IS" BASIS, + - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + - See the License for the specific language governing permissions and + - limitations under the License. + --> + + +# Iceberg Dell Integrations + +## Dell ECS Integrations + +This session will show you how to use Iceberg with Dell ECS. Dell ECS provides several features that are more appropriate for Iceberg: + +1. Append operation for file writer. +2. CAS operation for Table commit. + +See [Dell ECS](https://www.dell.com/en-us/dt/storage/ecs/index.htm) for more information on Dell ECS. + +### Connection parameters + +When you try to connect Dell ECS with Iceberg, these connection parameters should be prepared: + +| Name | Description | +| ------------------------ | ---------------------- | +| ecs.s3.endpoint | ECS S3 service endpoint | +| ecs.s3.access-key-id | Username | +| ecs.s3.secret-access-key | S3 Secret Key | + +As for the catalog, you should provide a warehouse location where will store all data and metadata later. + +| Example | Description | +| -------------------------- | --------------------------------------------------------------- | +| ecs://bucket-a | Use the whole bucket as the data | +| ecs://bucket-a/namespace-a | Use a prefix to access the data only in this specific namespace | + +When you provide the `warehouse`, the last / will be ignored. The `ecs://bucket-a` is same with `ecs://bucket-a/`. + +### Dependencies of runtime Review Comment: "Runtime Dependencies" seems like the more common way this is described. ########## docs/integrations/dell.md: ########## @@ -0,0 +1,150 @@ +--- +title: "Dell" +url: dell +--- +<!-- + - Licensed to the Apache Software Foundation (ASF) under one or more + - contributor license agreements. See the NOTICE file distributed with + - this work for additional information regarding copyright ownership. + - The ASF licenses this file to You under the Apache License, Version 2.0 + - (the "License"); you may not use this file except in compliance with + - the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, software + - distributed under the License is distributed on an "AS IS" BASIS, + - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + - See the License for the specific language governing permissions and + - limitations under the License. + --> + + +# Iceberg Dell Integrations + +## Dell ECS Integrations + +This session will show you how to use Iceberg with Dell ECS. Dell ECS provides several features that are more appropriate for Iceberg: + +1. Append operation for file writer. +2. CAS operation for Table commit. + +See [Dell ECS](https://www.dell.com/en-us/dt/storage/ecs/index.htm) for more information on Dell ECS. + +### Connection parameters + +When you try to connect Dell ECS with Iceberg, these connection parameters should be prepared: + +| Name | Description | +| ------------------------ | ---------------------- | +| ecs.s3.endpoint | ECS S3 service endpoint | +| ecs.s3.access-key-id | Username | +| ecs.s3.secret-access-key | S3 Secret Key | + +As for the catalog, you should provide a warehouse location where will store all data and metadata later. + +| Example | Description | +| -------------------------- | --------------------------------------------------------------- | +| ecs://bucket-a | Use the whole bucket as the data | +| ecs://bucket-a/namespace-a | Use a prefix to access the data only in this specific namespace | + +When you provide the `warehouse`, the last / will be ignored. The `ecs://bucket-a` is same with `ecs://bucket-a/`. + +### Dependencies of runtime + +The Iceberg `runtime` jar supports different versions of Spark and Flink. If the version was not matched in the example, please check the related document of Spark and Flink. + +Even though the [Dell ECS client](https://github.com/EMCECS/ecs-object-client-java) jar is backward compatible, Dell ECS still recommends using the latest version of the client. + +### Spark + +For example, to use the Dell ECS catalog with Spark 3.2.1, you should create a Spark session like: + +```sh +spark-sql --packages org.apache.iceberg:iceberg-spark-runtime-3.2_2.12:0.14.0,com.emc.ecs:object-client-bundle:3.3.2 \ + --conf spark.sql.catalog.my_catalog=org.apache.iceberg.spark.SparkCatalog \ + --conf spark.sql.catalog.my_catalog.warehouse=ecs://bucket-a/namespace-a \ + --conf spark.sql.catalog.my_catalog.catalog-impl=org.apache.iceberg.dell.ecs.EcsCatalog \ + --conf spark.sql.catalog.my_catalog.ecs.s3.endpoint=http://10.x.x.x:9020 \ + --conf spark.sql.catalog.my_catalog.ecs.s3.access-key-id=test \ + --conf spark.sql.catalog.my_catalog.ecs.s3.secret-access-key=xxxxxxxxxxxxxxxx +``` + +```python +from pyspark.sql import SparkSession + +spark = SparkSession.builder\ + .config("spark.jars.packages", "org.apache.iceberg:iceberg-spark-runtime-3.2_2.12:0.14.0,com.emc.ecs:object-client-bundle:3.3.2")\ + .config("spark.sql.extensions", "org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions")\ + .config("spark.sql.catalog.my_catalog", "org.apache.iceberg.spark.SparkCatalog")\ + .config("spark.sql.catalog.my_catalog.warehouse", "ecs://bucket-a/namespace-a")\ + .config("spark.sql.catalog.my_catalog.catalog-impl", "org.apache.iceberg.dell.ecs.EcsCatalog")\ + .config("spark.sql.catalog.my_catalog.ecs.s3.endpoint", "http://10.x.x.x:9020")\ + .config("spark.sql.catalog.my_catalog.ecs.s3.access-key-id", "test")\ + .config("spark.sql.catalog.my_catalog.ecs.s3.secret-access-key", "xxxxxxxxxxxxxxxx")\ + .getOrCreate() +``` + +Then, use `my_catalog` to access the data in ECS. You can use `SHOW NAMESPACES IN my_catalog` and `SHOW TABLES IN my_catalog` to fetch the namespaces and tables of the catalog. + +The related problems of catalog usage: + +1. The [pyspark.sql.SparkSession.catalog](https://spark.apache.org/docs/latest/api/python/reference/api/pyspark.sql.SparkSession.catalog.html#pyspark.sql.SparkSession.catalog) won't access the 3rd-party catalog of Spark, so please use DDL SQL to list all tables and namespaces. + + +### Flink + +For example, to use the Dell ECS catalog with Flink 1.14, you should create a Flink environment like: Review Comment: I don't think "For example,` is needed here, I would just jump right in and say "Using the Dell ECS catalog with Flink, you first must create a Flink environment." ########## docs/integrations/dell.md: ########## @@ -0,0 +1,150 @@ +--- +title: "Dell" +url: dell +--- +<!-- + - Licensed to the Apache Software Foundation (ASF) under one or more + - contributor license agreements. See the NOTICE file distributed with + - this work for additional information regarding copyright ownership. + - The ASF licenses this file to You under the Apache License, Version 2.0 + - (the "License"); you may not use this file except in compliance with + - the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, software + - distributed under the License is distributed on an "AS IS" BASIS, + - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + - See the License for the specific language governing permissions and + - limitations under the License. + --> + + +# Iceberg Dell Integrations + +## Dell ECS Integrations + +This session will show you how to use Iceberg with Dell ECS. Dell ECS provides several features that are more appropriate for Iceberg: + +1. Append operation for file writer. +2. CAS operation for Table commit. + +See [Dell ECS](https://www.dell.com/en-us/dt/storage/ecs/index.htm) for more information on Dell ECS. + +### Connection parameters + +When you try to connect Dell ECS with Iceberg, these connection parameters should be prepared: Review Comment: I could be overthinking this but `try` doesn't feel confident enough. I would just say "When using Dell ECS with Iceberg, these configuration parameters are required." ########## docs/integrations/dell.md: ########## @@ -0,0 +1,150 @@ +--- +title: "Dell" +url: dell +--- +<!-- + - Licensed to the Apache Software Foundation (ASF) under one or more + - contributor license agreements. See the NOTICE file distributed with + - this work for additional information regarding copyright ownership. + - The ASF licenses this file to You under the Apache License, Version 2.0 + - (the "License"); you may not use this file except in compliance with + - the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, software + - distributed under the License is distributed on an "AS IS" BASIS, + - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + - See the License for the specific language governing permissions and + - limitations under the License. + --> + + +# Iceberg Dell Integrations + +## Dell ECS Integrations + +This session will show you how to use Iceberg with Dell ECS. Dell ECS provides several features that are more appropriate for Iceberg: + +1. Append operation for file writer. +2. CAS operation for Table commit. + +See [Dell ECS](https://www.dell.com/en-us/dt/storage/ecs/index.htm) for more information on Dell ECS. + +### Connection parameters + +When you try to connect Dell ECS with Iceberg, these connection parameters should be prepared: + +| Name | Description | +| ------------------------ | ---------------------- | +| ecs.s3.endpoint | ECS S3 service endpoint | +| ecs.s3.access-key-id | Username | +| ecs.s3.secret-access-key | S3 Secret Key | + +As for the catalog, you should provide a warehouse location where will store all data and metadata later. Review Comment: This looks like a typo or grammar issue. Maybe change this to: > An ECS catalog requires that you configure a warehouse location where all data and metadata will be created. ########## docs/integrations/dell.md: ########## @@ -0,0 +1,150 @@ +--- +title: "Dell" +url: dell +--- +<!-- + - Licensed to the Apache Software Foundation (ASF) under one or more + - contributor license agreements. See the NOTICE file distributed with + - this work for additional information regarding copyright ownership. + - The ASF licenses this file to You under the Apache License, Version 2.0 + - (the "License"); you may not use this file except in compliance with + - the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, software + - distributed under the License is distributed on an "AS IS" BASIS, + - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + - See the License for the specific language governing permissions and + - limitations under the License. + --> + + +# Iceberg Dell Integrations + +## Dell ECS Integrations + +This session will show you how to use Iceberg with Dell ECS. Dell ECS provides several features that are more appropriate for Iceberg: + +1. Append operation for file writer. +2. CAS operation for Table commit. + +See [Dell ECS](https://www.dell.com/en-us/dt/storage/ecs/index.htm) for more information on Dell ECS. + +### Connection parameters + +When you try to connect Dell ECS with Iceberg, these connection parameters should be prepared: + +| Name | Description | +| ------------------------ | ---------------------- | +| ecs.s3.endpoint | ECS S3 service endpoint | +| ecs.s3.access-key-id | Username | +| ecs.s3.secret-access-key | S3 Secret Key | + +As for the catalog, you should provide a warehouse location where will store all data and metadata later. + +| Example | Description | +| -------------------------- | --------------------------------------------------------------- | +| ecs://bucket-a | Use the whole bucket as the data | +| ecs://bucket-a/namespace-a | Use a prefix to access the data only in this specific namespace | + +When you provide the `warehouse`, the last / will be ignored. The `ecs://bucket-a` is same with `ecs://bucket-a/`. + +### Dependencies of runtime + +The Iceberg `runtime` jar supports different versions of Spark and Flink. If the version was not matched in the example, please check the related document of Spark and Flink. + +Even though the [Dell ECS client](https://github.com/EMCECS/ecs-object-client-java) jar is backward compatible, Dell ECS still recommends using the latest version of the client. + +### Spark + +For example, to use the Dell ECS catalog with Spark 3.2.1, you should create a Spark session like: + +```sh +spark-sql --packages org.apache.iceberg:iceberg-spark-runtime-3.2_2.12:0.14.0,com.emc.ecs:object-client-bundle:3.3.2 \ + --conf spark.sql.catalog.my_catalog=org.apache.iceberg.spark.SparkCatalog \ + --conf spark.sql.catalog.my_catalog.warehouse=ecs://bucket-a/namespace-a \ + --conf spark.sql.catalog.my_catalog.catalog-impl=org.apache.iceberg.dell.ecs.EcsCatalog \ + --conf spark.sql.catalog.my_catalog.ecs.s3.endpoint=http://10.x.x.x:9020 \ + --conf spark.sql.catalog.my_catalog.ecs.s3.access-key-id=test \ + --conf spark.sql.catalog.my_catalog.ecs.s3.secret-access-key=xxxxxxxxxxxxxxxx +``` + +```python +from pyspark.sql import SparkSession + +spark = SparkSession.builder\ + .config("spark.jars.packages", "org.apache.iceberg:iceberg-spark-runtime-3.2_2.12:0.14.0,com.emc.ecs:object-client-bundle:3.3.2")\ + .config("spark.sql.extensions", "org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions")\ + .config("spark.sql.catalog.my_catalog", "org.apache.iceberg.spark.SparkCatalog")\ + .config("spark.sql.catalog.my_catalog.warehouse", "ecs://bucket-a/namespace-a")\ + .config("spark.sql.catalog.my_catalog.catalog-impl", "org.apache.iceberg.dell.ecs.EcsCatalog")\ + .config("spark.sql.catalog.my_catalog.ecs.s3.endpoint", "http://10.x.x.x:9020")\ + .config("spark.sql.catalog.my_catalog.ecs.s3.access-key-id", "test")\ + .config("spark.sql.catalog.my_catalog.ecs.s3.secret-access-key", "xxxxxxxxxxxxxxxx")\ + .getOrCreate() +``` + +Then, use `my_catalog` to access the data in ECS. You can use `SHOW NAMESPACES IN my_catalog` and `SHOW TABLES IN my_catalog` to fetch the namespaces and tables of the catalog. + +The related problems of catalog usage: + +1. The [pyspark.sql.SparkSession.catalog](https://spark.apache.org/docs/latest/api/python/reference/api/pyspark.sql.SparkSession.catalog.html#pyspark.sql.SparkSession.catalog) won't access the 3rd-party catalog of Spark, so please use DDL SQL to list all tables and namespaces. + + +### Flink + +For example, to use the Dell ECS catalog with Flink 1.14, you should create a Flink environment like: + +```sh +wget https://repo1.maven.org/maven2/org/apache/iceberg/iceberg-flink-runtime-1.14/0.14.0/iceberg-flink-runtime-1.14-0.14.0.jar +wget https://repo1.maven.org/maven2/com/emc/ecs/object-client-bundle/3.3.2/object-client-bundle-3.3.2.jar + +sql-client.sh embedded -j iceberg-flink-runtime-1.14-0.14.0.jar -j object-client-bundle-3.3.2.jar shell +``` + +```python +import requests +from pyflink.datastream import StreamExecutionEnvironment +from pyflink.table import StreamTableEnvironment + +# Set your workspace +work_space = "/" + +# Download libraries +maven_url="https://repo1.maven.org/maven2" +with open(f"{work_space}/iceberg-flink-runtime-1.14-0.14.0.jar", "wb") as f: + f.write(requests.get(f"{maven_url}/org/apache/iceberg/iceberg-flink-runtime-1.14/0.14.0/iceberg-flink-runtime-1.14-0.14.0.jar").content) +with open(f"{work_space}/object-client-bundle-3.3.2.jar", "wb") as f: + f.write(requests.get(f"{maven_url}/com/emc/ecs/object-client-bundle/3.3.2/object-client-bundle-3.3.2.jar").content) + +jars = ["iceberg-flink-runtime-1.14-0.14.0.jar", "object-client-bundle-3.3.2.jar"] +pipeline_jars = [f"file://{work_space}/{jar}" for jar in jars] + +# Setup Flink session +env = StreamExecutionEnvironment.get_execution_environment() +env.add_jars(*pipeline_jars) +t_env = StreamTableEnvironment.create(env) +``` + +Then, use Flink SQL to create a catalog named `my_catalog`: + +```SQL +CREATE CATALOG my_catalog WITH ( + 'type'='iceberg', + 'warehouse' = 'ecs://bucket-a/namespace-a', + 'catalog-impl'='org.apache.iceberg.dell.ecs.EcsCatalog', + 'ecs.s3.endpoint' = 'http://10.x.x.x:9020', + 'ecs.s3.access-key-id' = 'test', + 'ecs.s3.secret-access-key' = 'xxxxxxxxxxxxxxxx') +``` + +Then, `USE CATALOG my_catalog`, `SHOW DATABASES`, and `SHOW TABLES` to fetch the namespaces and tables of the catalog. Review Comment: Then, **you can run** `USE CATALOG my_catalog`, `SHOW DATABASES`, and `SHOW TABLES` to fetch the namespaces and tables in the catalog. -- 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]
