vinishjail97 commented on code in PR #995:
URL: https://github.com/apache/incubator-xtable/pull/995#discussion_r4672673686


##########
website/docs/features-and-limitations.md:
##########
@@ -27,15 +27,33 @@ In addition to synchronizing table format metadata, Apache 
XTable™ (Incubating
 This reduces friction by eliminating the manual step of registering tables in 
multiple catalogs and enhances flexibility by avoiding catalog lock-in.
 HMS and AWS Glue are the two catalogs supported right now, support for other 
catalogs (Unity, Apache Polaris, Apache Gravitino, DataHub) coming soon. 
 
+### Secondary index for Iceberg tables
+A sync to a Hudi target can build a secondary index on a column of an Iceberg 
source table and keep it current on each later sync.

Review Comment:
   Simplified in bb974cba to "each later sync updates the index".



##########
website/docs/features-and-limitations.md:
##########
@@ -27,15 +27,33 @@ In addition to synchronizing table format metadata, Apache 
XTable™ (Incubating
 This reduces friction by eliminating the manual step of registering tables in 
multiple catalogs and enhances flexibility by avoiding catalog lock-in.
 HMS and AWS Glue are the two catalogs supported right now, support for other 
catalogs (Unity, Apache Polaris, Apache Gravitino, DataHub) coming soon. 
 
+### Secondary index for Iceberg tables
+A sync to a Hudi target can build a secondary index on a column of an Iceberg 
source table and keep it current on each later sync.
+The index is stored as a Hudi metadata table in the data folder of the table, 
and Spark sessions with the XTable Spark SQL extensions use it to read only the 
files that hold the values of a point lookup.

Review Comment:
   Changed to "data path" in bb974cba, here and on the index page.



##########
website/docs/features-and-limitations.md:
##########
@@ -27,15 +27,33 @@ In addition to synchronizing table format metadata, Apache 
XTable™ (Incubating
 This reduces friction by eliminating the manual step of registering tables in 
multiple catalogs and enhances flexibility by avoiding catalog lock-in.
 HMS and AWS Glue are the two catalogs supported right now, support for other 
catalogs (Unity, Apache Polaris, Apache Gravitino, DataHub) coming soon. 
 
+### Secondary index for Iceberg tables
+A sync to a Hudi target can build a secondary index on a column of an Iceberg 
source table and keep it current on each later sync.
+The index is stored as a Hudi metadata table in the data folder of the table, 
and Spark sessions with the XTable Spark SQL extensions use it to read only the 
files that hold the values of a point lookup.

Review Comment:
   Reworded in bb974cba: for a point lookup the index returns the exact data 
files that hold the matching rows, so Spark reads only those files.



##########
website/docs/how-to-iceberg-table-format.md:
##########
@@ -0,0 +1,112 @@
+---
+sidebar_position: 5
+title: "Write Hudi tables as Iceberg tables"
+---
+
+# Write Hudi tables as Iceberg tables
+
+Apache Hudi 1.1 added pluggable table formats 
([RFC-93](https://github.com/apache/hudi/blob/master/rfc/rfc-93/rfc-93.md)):
+a Hudi writer can keep the metadata of another table format next to its own, 
in the same commit.
+Apache XTable™ (Incubating) provides the Apache Iceberg implementation in the
+`xtable-iceberg-pluggable-tf` module. With it, every Hudi write, clean, 
rollback, savepoint and
+archive also commits an Iceberg snapshot in the table folder, so the table 
reads as a standard
+Iceberg table right after the write, without a separate sync job.
+
+Iceberg decides which Hudi commits are visible: a Hudi commit whose Iceberg 
snapshot was not

Review Comment:
   Added in bb974cba: the Iceberg metadata is the source of truth, and a Hudi 
commit is visible only after its Iceberg snapshot is committed.



##########
website/docs/how-to-iceberg-table-format.md:
##########
@@ -0,0 +1,112 @@
+---
+sidebar_position: 5
+title: "Write Hudi tables as Iceberg tables"
+---
+
+# Write Hudi tables as Iceberg tables
+
+Apache Hudi 1.1 added pluggable table formats 
([RFC-93](https://github.com/apache/hudi/blob/master/rfc/rfc-93/rfc-93.md)):
+a Hudi writer can keep the metadata of another table format next to its own, 
in the same commit.
+Apache XTable™ (Incubating) provides the Apache Iceberg implementation in the
+`xtable-iceberg-pluggable-tf` module. With it, every Hudi write, clean, 
rollback, savepoint and
+archive also commits an Iceberg snapshot in the table folder, so the table 
reads as a standard
+Iceberg table right after the write, without a separate sync job.
+
+Iceberg decides which Hudi commits are visible: a Hudi commit whose Iceberg 
snapshot was not
+committed is treated as pending and is rolled back by the next write, and a 
failed Iceberg commit
+fails the Hudi operation.
+
+## Setting up Spark
+
+You need Hudi 1.2.x for this. Alongside the Hudi Spark bundle your job already 
uses, add four

Review Comment:
   Rewritten in bb974cba as "The Iceberg table format requires Apache Hudi 
1.2.x".



##########
website/docs/how-to-iceberg-table-format.md:
##########
@@ -0,0 +1,112 @@
+---
+sidebar_position: 5
+title: "Write Hudi tables as Iceberg tables"
+---
+
+# Write Hudi tables as Iceberg tables
+
+Apache Hudi 1.1 added pluggable table formats 
([RFC-93](https://github.com/apache/hudi/blob/master/rfc/rfc-93/rfc-93.md)):
+a Hudi writer can keep the metadata of another table format next to its own, 
in the same commit.
+Apache XTable™ (Incubating) provides the Apache Iceberg implementation in the
+`xtable-iceberg-pluggable-tf` module. With it, every Hudi write, clean, 
rollback, savepoint and
+archive also commits an Iceberg snapshot in the table folder, so the table 
reads as a standard
+Iceberg table right after the write, without a separate sync job.
+
+Iceberg decides which Hudi commits are visible: a Hudi commit whose Iceberg 
snapshot was not
+committed is treated as pending and is rolled back by the next write, and a 
failed Iceberg commit
+fails the Hudi operation.
+
+## Setting up Spark
+
+You need Hudi 1.2.x for this. Alongside the Hudi Spark bundle your job already 
uses, add four
+XTable jars and the Iceberg Spark runtime. The XTable jars are on Maven 
Central from 0.5.0, so you

Review Comment:
   Changed in bb974cba to the `xtable-iceberg-pluggable-tf` jar and its XTable 
dependencies, named explicitly.



##########
website/docs/how-to-iceberg-table-format.md:
##########
@@ -0,0 +1,112 @@
+---
+sidebar_position: 5
+title: "Write Hudi tables as Iceberg tables"
+---
+
+# Write Hudi tables as Iceberg tables
+
+Apache Hudi 1.1 added pluggable table formats 
([RFC-93](https://github.com/apache/hudi/blob/master/rfc/rfc-93/rfc-93.md)):
+a Hudi writer can keep the metadata of another table format next to its own, 
in the same commit.
+Apache XTable™ (Incubating) provides the Apache Iceberg implementation in the
+`xtable-iceberg-pluggable-tf` module. With it, every Hudi write, clean, 
rollback, savepoint and
+archive also commits an Iceberg snapshot in the table folder, so the table 
reads as a standard
+Iceberg table right after the write, without a separate sync job.
+
+Iceberg decides which Hudi commits are visible: a Hudi commit whose Iceberg 
snapshot was not
+committed is treated as pending and is rolled back by the next write, and a 
failed Iceberg commit
+fails the Hudi operation.
+
+## Setting up Spark
+
+You need Hudi 1.2.x for this. Alongside the Hudi Spark bundle your job already 
uses, add four
+XTable jars and the Iceberg Spark runtime. The XTable jars are on Maven 
Central from 0.5.0, so you
+can download them directly:
+
+```shell md title="shell"
+REPO=https://repo1.maven.org/maven2/org/apache/xtable
+VERSION=0.5.0-incubating
+curl -O 
$REPO/xtable-iceberg-pluggable-tf_2.12/$VERSION/xtable-iceberg-pluggable-tf_2.12-$VERSION.jar
+curl -O $REPO/xtable-core_2.12/$VERSION/xtable-core_2.12-$VERSION.jar
+curl -O $REPO/xtable-api/$VERSION/xtable-api-$VERSION.jar
+curl -O 
$REPO/xtable-hudi-support-utils/$VERSION/xtable-hudi-support-utils-$VERSION.jar
+```
+
+The Iceberg Spark runtime is there because the XTable jars don't bundle 
Iceberg. Your writer uses

Review Comment:
   Changed to "the Hudi writer" in bb974cba, and removed the other uses of 
"you" and "your" on this page.



##########
website/docs/how-to-iceberg-table-format.md:
##########
@@ -0,0 +1,112 @@
+---
+sidebar_position: 5
+title: "Write Hudi tables as Iceberg tables"
+---
+
+# Write Hudi tables as Iceberg tables
+
+Apache Hudi 1.1 added pluggable table formats 
([RFC-93](https://github.com/apache/hudi/blob/master/rfc/rfc-93/rfc-93.md)):
+a Hudi writer can keep the metadata of another table format next to its own, 
in the same commit.
+Apache XTable™ (Incubating) provides the Apache Iceberg implementation in the
+`xtable-iceberg-pluggable-tf` module. With it, every Hudi write, clean, 
rollback, savepoint and
+archive also commits an Iceberg snapshot in the table folder, so the table 
reads as a standard
+Iceberg table right after the write, without a separate sync job.
+
+Iceberg decides which Hudi commits are visible: a Hudi commit whose Iceberg 
snapshot was not
+committed is treated as pending and is rolled back by the next write, and a 
failed Iceberg commit
+fails the Hudi operation.
+
+## Setting up Spark
+
+You need Hudi 1.2.x for this. Alongside the Hudi Spark bundle your job already 
uses, add four
+XTable jars and the Iceberg Spark runtime. The XTable jars are on Maven 
Central from 0.5.0, so you
+can download them directly:
+
+```shell md title="shell"
+REPO=https://repo1.maven.org/maven2/org/apache/xtable
+VERSION=0.5.0-incubating
+curl -O 
$REPO/xtable-iceberg-pluggable-tf_2.12/$VERSION/xtable-iceberg-pluggable-tf_2.12-$VERSION.jar
+curl -O $REPO/xtable-core_2.12/$VERSION/xtable-core_2.12-$VERSION.jar
+curl -O $REPO/xtable-api/$VERSION/xtable-api-$VERSION.jar
+curl -O 
$REPO/xtable-hudi-support-utils/$VERSION/xtable-hudi-support-utils-$VERSION.jar
+```
+
+The Iceberg Spark runtime is there because the XTable jars don't bundle 
Iceberg. Your writer uses
+it to commit each snapshot, and you can read the table back as Iceberg in the 
same session. The
+example below is for Spark 3.5, so pick the bundles that match your Spark 
version.
+
+```shell md title="shell"
+XTABLE_JARS=xtable-iceberg-pluggable-tf_2.12-$VERSION.jar,\
+xtable-core_2.12-$VERSION.jar,\
+xtable-api-$VERSION.jar,\
+xtable-hudi-support-utils-$VERSION.jar
+
+spark-shell \
+  --jars 
$XTABLE_JARS,hudi-spark3.5-bundle_2.12-1.2.1.jar,iceberg-spark-runtime-3.5_2.12-1.9.2.jar
 \
+  --conf spark.serializer=org.apache.spark.serializer.KryoSerializer \
+  --conf 
spark.sql.extensions=org.apache.spark.sql.hudi.HoodieSparkSessionExtension \
+  --conf spark.kryo.registrator=org.apache.spark.HoodieSparkKryoRegistrar
+```
+
+`spark-submit` takes the same `--jars` and `--conf` options.
+
+Each commit can log a warning, `Skipping a ConversionTarget whose engine 
library is not on the
+classpath`, for the Delta targets of `xtable-core`. The Iceberg format does 
not use them, so you
+can ignore it.

Review Comment:
   Removed in bb974cba.



-- 
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]

Reply via email to