You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2021/11/16 23:37:01 UTC
[GitHub] [hudi] kywe665 opened a new pull request #4010: [HUDI-2770] - Docs for (HUDI-2737) - Use earliest instant for async compaction and clustering
kywe665 opened a new pull request #4010:
URL: https://github.com/apache/hudi/pull/4010
## What is the purpose of the pull request
In PR: https://github.com/apache/hudi/pull/3991, the --instant-time is no longer required for Hudi compaction and clustering utilities. As I made the simple change for this I also discovered that the compaction docs were unclear on how to schedule and then separately execute compaction asynchronously.
## Brief change log
- Added note about --instant-time no longer being required in clustering.md
- Added note about --instant-time no longer being required in compaction.md
- Reworded and expanded compaction doc to make scheduling vs execution clear
## Verify this pull request
This pull request is doc changes only.
## Committer checklist
- [ X] Has a corresponding JIRA in PR title & commit
- [X ] Commit message is descriptive of the change
- [ X] CI is green
- [X ] Necessary doc changes done or have another open PR
- [ X] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] kywe665 commented on pull request #4010: [HUDI-2770] - Docs for (HUDI-2737) - Use earliest instant for async compaction and clustering
Posted by GitBox <gi...@apache.org>.
kywe665 commented on pull request #4010:
URL: https://github.com/apache/hudi/pull/4010#issuecomment-970849392
@yihua take a look to see if this covers your updates in PR: https://github.com/apache/hudi/pull/3991
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] kywe665 commented on a change in pull request #4010: [HUDI-2770] - Docs for (HUDI-2737) - Use earliest instant for async compaction and clustering
Posted by GitBox <gi...@apache.org>.
kywe665 commented on a change in pull request #4010:
URL: https://github.com/apache/hudi/pull/4010#discussion_r754609207
##########
File path: website/docs/compaction.md
##########
@@ -71,24 +71,25 @@ spark-submit --packages org.apache.hudi:hudi-utilities-bundle_2.11:0.6.0 \
After compactions have been asynchronously scheduled on the Hudi Timeline, you can now execute those compactions with one of the following options
### Hudi Compactor Utility
-Hudi provides a standalone tool to execute specific compactions asynchronously. Below is an example and you can read more in the [deployment guide](/docs/deployment#compactions)
-
-:::info
-Note: As of version 0.10.0, the `instant-time` parameter is no longer required for the Hudi Compactor Utility. Each spark-submit will execute the earliest scheduled compaction on the Hudi timeline.
-:::
+Hudi provides a standalone tool to execute specific compactions asynchronously. Below is an example and you can read more in the [deployment guide](/docs/cli#compactions)
Review comment:
Good call, I updated
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] kywe665 commented on a change in pull request #4010: [HUDI-2770] - Docs for (HUDI-2737) - Use earliest instant for async compaction and clustering
Posted by GitBox <gi...@apache.org>.
kywe665 commented on a change in pull request #4010:
URL: https://github.com/apache/hudi/pull/4010#discussion_r754745374
##########
File path: website/docs/compaction.md
##########
@@ -1,33 +1,26 @@
---
title: Compaction
-summary: "In this page, we describe async compaction in Hudi."
toc: true
last_modified_at:
---
-For Merge-On-Read table, data is stored using a combination of columnar (e.g parquet) + row based (e.g avro) file formats.
-Updates are logged to delta files & later compacted to produce new versions of columnar files synchronously or
-asynchronously. One of the main motivations behind Merge-On-Read is to reduce data latency when ingesting records.
-Hence, it makes sense to run compaction asynchronously without blocking ingestion.
-
+Compaction is executed asynchronously with Hudi by default.
## Async Compaction
-
Async Compaction is performed in 2 steps:
1. ***Compaction Scheduling***: This is done by the ingestion job. In this step, Hudi scans the partitions and selects **file
slices** to be compacted. A compaction plan is finally written to Hudi timeline.
1. ***Compaction Execution***: A separate process reads the compaction plan and performs compaction of file slices.
+## Scheduling Async Compaction
-## Deployment Models
-
-There are few ways by which we can execute compactions asynchronously.
+There are few ways by which we can schedule compactions to the Hudi timeline to be executed later asynchronously.
-### Spark Structured Streaming
+### Schedule compaction with Spark Structured Streaming
Review comment:
nice catch, I reverted these changes
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] bhasudha commented on a change in pull request #4010: [HUDI-2770] - Docs for (HUDI-2737) - Use earliest instant for async compaction and clustering
Posted by GitBox <gi...@apache.org>.
bhasudha commented on a change in pull request #4010:
URL: https://github.com/apache/hudi/pull/4010#discussion_r754709839
##########
File path: website/versioned_docs/version-0.9.0/cli.md
##########
@@ -0,0 +1,357 @@
+---
Review comment:
Is this file an intended change ? It looks like it belongs to version 0.9.0 already?
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] bhasudha merged pull request #4010: [HUDI-2770] - Docs for (HUDI-2737) - Use earliest instant for async compaction and clustering
Posted by GitBox <gi...@apache.org>.
bhasudha merged pull request #4010:
URL: https://github.com/apache/hudi/pull/4010
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] yihua commented on a change in pull request #4010: [HUDI-2770] - Docs for (HUDI-2737) - Use earliest instant for async compaction and clustering
Posted by GitBox <gi...@apache.org>.
yihua commented on a change in pull request #4010:
URL: https://github.com/apache/hudi/pull/4010#discussion_r754716809
##########
File path: website/docs/compaction.md
##########
@@ -74,22 +67,47 @@ spark-submit --packages org.apache.hudi:hudi-utilities-bundle_2.11:0.6.0 \
--continous
```
-### Hudi CLI
-Hudi CLI is yet another way to execute specific compactions asynchronously. Here is an example
+## Executing Async Compaction
+After compactions have been asynchronously scheduled on the Hudi Timeline, you can now execute those compactions with one of the following options
Review comment:
I guess the discussion I had with @kywe665 caused the confusion here. In Hudi Kafka Connect Sink, the compaction/clustering is only scheduled and it's upon these separate utilities to do the actual services (I'll also see if this gap should be bridged).
In terms of Deltastreamer, from the existing docs, it was not clear to me if it does both scheduling and execution as I was reading the docs at the first glance. We should call that out.
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] kywe665 commented on a change in pull request #4010: [HUDI-2770] - Docs for (HUDI-2737) - Use earliest instant for async compaction and clustering
Posted by GitBox <gi...@apache.org>.
kywe665 commented on a change in pull request #4010:
URL: https://github.com/apache/hudi/pull/4010#discussion_r754725865
##########
File path: website/docs/clustering.md
##########
@@ -161,11 +161,11 @@ Users can leverage [HoodieClusteringJob](https://cwiki.apache.org/confluence/dis
to setup 2-step asynchronous clustering.
### HoodieClusteringJob
-With the release of Hudi version 0.9.0, we can schedule as well as execute clustering in the same step. We just need to
+You can schedule as well as execute clustering in the same step. You just need to
Review comment:
Done
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] yihua commented on a change in pull request #4010: [HUDI-2770] - Docs for (HUDI-2737) - Use earliest instant for async compaction and clustering
Posted by GitBox <gi...@apache.org>.
yihua commented on a change in pull request #4010:
URL: https://github.com/apache/hudi/pull/4010#discussion_r752521510
##########
File path: website/docs/clustering.md
##########
@@ -165,7 +165,8 @@ With the release of Hudi version 0.9.0, we can schedule as well as execute clust
specify the `—mode` or `-m` option. There are three modes:
1. `schedule`: Make a clustering plan. This gives an instant which can be passed in execute mode.
-2. `execute`: Execute a clustering plan at given instant which means --instant-time is required here.
+2. `execute`: Execute a clustering plan at a given instant which means --instant-time is required.
Review comment:
@nsivabalan are the docs forward-looking, or do they have to capture nuances of all versions as well? I'm wondering if docs are only looking forward, we don't have to mention that `--instant-time is required` for older versions.
##########
File path: website/docs/compaction.md
##########
@@ -74,22 +67,46 @@ spark-submit --packages org.apache.hudi:hudi-utilities-bundle_2.11:0.6.0 \
--continous
```
-### Hudi CLI
-Hudi CLI is yet another way to execute specific compactions asynchronously. Here is an example
+## Executing Async Compaction
+After compactions have been asynchronously scheduled on the Hudi Timeline, you can now execute those compactions with one of the following options
-```properties
-hudi:trips->compaction run --tableName <table_name> --parallelism <parallelism> --compactionInstant <InstantTime>
-...
-```
+### Hudi Compactor Utility
+Hudi provides a standalone tool to execute specific compactions asynchronously. Below is an example and you can read more in the [deployment guide](/docs/deployment#compactions)
-### Hudi Compactor Script
-Hudi provides a standalone tool to also execute specific compactions asynchronously. Below is an example and you can read more in the [deployment guide](/docs/next/deployment#compactions)
+:::info
+Note: As of version 0.10.0, the `instant-time` parameter is no longer required for the Hudi Compactor Utility. Each spark-submit will execute the earliest scheduled compaction on the Hudi timeline.
+:::
```properties
spark-submit --packages org.apache.hudi:hudi-utilities-bundle_2.11:0.6.0 \
--class org.apache.hudi.utilities.HoodieCompactor \
--base-path <base_path> \
--table-name <table_name> \
---instant-time <compaction_instant> \
---schema-file <schema_file>
+--schema-file <schema_file>\
+--instant-time <compaction_instant>
```
+
+### Hudi CLI
+Hudi CLI is yet another way to execute specific compactions asynchronously. Here is an example and you can read more in the [deployment guide](/docs/deployment#compactions)
+
+```properties
+hudi:trips->compaction run --tableName <table_name> --parallelism <parallelism> --compactionInstant <InstantTime>
+...
+```
+
Review comment:
Shall we add a link here to refer to other compaction commands in hudi-cli (https://hudi.apache.org/docs/next/cli#compactions)? Especially when the user would like to find the compaction instant, `compactions show` commands are helpful.
##########
File path: website/docs/compaction.md
##########
@@ -74,22 +67,46 @@ spark-submit --packages org.apache.hudi:hudi-utilities-bundle_2.11:0.6.0 \
--continous
```
-### Hudi CLI
-Hudi CLI is yet another way to execute specific compactions asynchronously. Here is an example
+## Executing Async Compaction
+After compactions have been asynchronously scheduled on the Hudi Timeline, you can now execute those compactions with one of the following options
-```properties
-hudi:trips->compaction run --tableName <table_name> --parallelism <parallelism> --compactionInstant <InstantTime>
-...
-```
+### Hudi Compactor Utility
+Hudi provides a standalone tool to execute specific compactions asynchronously. Below is an example and you can read more in the [deployment guide](/docs/deployment#compactions)
-### Hudi Compactor Script
-Hudi provides a standalone tool to also execute specific compactions asynchronously. Below is an example and you can read more in the [deployment guide](/docs/next/deployment#compactions)
+:::info
+Note: As of version 0.10.0, the `instant-time` parameter is no longer required for the Hudi Compactor Utility. Each spark-submit will execute the earliest scheduled compaction on the Hudi timeline.
+:::
```properties
spark-submit --packages org.apache.hudi:hudi-utilities-bundle_2.11:0.6.0 \
--class org.apache.hudi.utilities.HoodieCompactor \
--base-path <base_path> \
--table-name <table_name> \
---instant-time <compaction_instant> \
---schema-file <schema_file>
+--schema-file <schema_file>\
Review comment:
nit: space before backslash
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] kywe665 commented on a change in pull request #4010: [HUDI-2770] - Docs for (HUDI-2737) - Use earliest instant for async compaction and clustering
Posted by GitBox <gi...@apache.org>.
kywe665 commented on a change in pull request #4010:
URL: https://github.com/apache/hudi/pull/4010#discussion_r752668955
##########
File path: website/docs/compaction.md
##########
@@ -74,22 +67,46 @@ spark-submit --packages org.apache.hudi:hudi-utilities-bundle_2.11:0.6.0 \
--continous
```
-### Hudi CLI
-Hudi CLI is yet another way to execute specific compactions asynchronously. Here is an example
+## Executing Async Compaction
+After compactions have been asynchronously scheduled on the Hudi Timeline, you can now execute those compactions with one of the following options
-```properties
-hudi:trips->compaction run --tableName <table_name> --parallelism <parallelism> --compactionInstant <InstantTime>
-...
-```
+### Hudi Compactor Utility
+Hudi provides a standalone tool to execute specific compactions asynchronously. Below is an example and you can read more in the [deployment guide](/docs/deployment#compactions)
-### Hudi Compactor Script
-Hudi provides a standalone tool to also execute specific compactions asynchronously. Below is an example and you can read more in the [deployment guide](/docs/next/deployment#compactions)
+:::info
+Note: As of version 0.10.0, the `instant-time` parameter is no longer required for the Hudi Compactor Utility. Each spark-submit will execute the earliest scheduled compaction on the Hudi timeline.
+:::
```properties
spark-submit --packages org.apache.hudi:hudi-utilities-bundle_2.11:0.6.0 \
--class org.apache.hudi.utilities.HoodieCompactor \
--base-path <base_path> \
--table-name <table_name> \
---instant-time <compaction_instant> \
---schema-file <schema_file>
+--schema-file <schema_file>\
+--instant-time <compaction_instant>
```
+
+### Hudi CLI
+Hudi CLI is yet another way to execute specific compactions asynchronously. Here is an example and you can read more in the [deployment guide](/docs/deployment#compactions)
+
+```properties
+hudi:trips->compaction run --tableName <table_name> --parallelism <parallelism> --compactionInstant <InstantTime>
+...
+```
+
Review comment:
I have it linked just above this
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] kywe665 commented on a change in pull request #4010: [HUDI-2770] - Docs for (HUDI-2737) - Use earliest instant for async compaction and clustering
Posted by GitBox <gi...@apache.org>.
kywe665 commented on a change in pull request #4010:
URL: https://github.com/apache/hudi/pull/4010#discussion_r754745664
##########
File path: website/docs/compaction.md
##########
@@ -74,22 +67,47 @@ spark-submit --packages org.apache.hudi:hudi-utilities-bundle_2.11:0.6.0 \
--continous
```
-### Hudi CLI
-Hudi CLI is yet another way to execute specific compactions asynchronously. Here is an example
+## Executing Async Compaction
+After compactions have been asynchronously scheduled on the Hudi Timeline, you can now execute those compactions with one of the following options
Review comment:
Thanks for catching this @bhasudha, yes I think @yihua and I mixed up two conversations. I reverted the changes so it stays as scheduled and executed together
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] bhasudha commented on a change in pull request #4010: [HUDI-2770] - Docs for (HUDI-2737) - Use earliest instant for async compaction and clustering
Posted by GitBox <gi...@apache.org>.
bhasudha commented on a change in pull request #4010:
URL: https://github.com/apache/hudi/pull/4010#discussion_r754694364
##########
File path: website/docs/clustering.md
##########
@@ -161,11 +161,11 @@ Users can leverage [HoodieClusteringJob](https://cwiki.apache.org/confluence/dis
to setup 2-step asynchronous clustering.
### HoodieClusteringJob
-With the release of Hudi version 0.9.0, we can schedule as well as execute clustering in the same step. We just need to
+You can schedule as well as execute clustering in the same step. You just need to
Review comment:
Can we rephrase like this - ```By specifying the `scheduleAndExecute` mode both schedule as well as clustering can be achieved in the same step. The appropriate mode can be specified using `-mode` or `-m` option. There are three modes: ```
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] bhasudha commented on a change in pull request #4010: [HUDI-2770] - Docs for (HUDI-2737) - Use earliest instant for async compaction and clustering
Posted by GitBox <gi...@apache.org>.
bhasudha commented on a change in pull request #4010:
URL: https://github.com/apache/hudi/pull/4010#discussion_r754707272
##########
File path: website/docs/compaction.md
##########
@@ -74,22 +67,47 @@ spark-submit --packages org.apache.hudi:hudi-utilities-bundle_2.11:0.6.0 \
--continous
```
-### Hudi CLI
-Hudi CLI is yet another way to execute specific compactions asynchronously. Here is an example
+## Executing Async Compaction
+After compactions have been asynchronously scheduled on the Hudi Timeline, you can now execute those compactions with one of the following options
Review comment:
Related to above comments - When using Deltastreamer and Spark Streaming we dont need to use these tools separately to execute compactions.
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] kywe665 commented on a change in pull request #4010: [HUDI-2770] - Docs for (HUDI-2737) - Use earliest instant for async compaction and clustering
Posted by GitBox <gi...@apache.org>.
kywe665 commented on a change in pull request #4010:
URL: https://github.com/apache/hudi/pull/4010#discussion_r754609062
##########
File path: website/docs/cli.md
##########
@@ -283,9 +283,9 @@ Description: Run Compaction for given instant time
Keyword: compactionInstant
Help: Base path for the target hoodie table
- Mandatory: true
+ Mandatory: false
Default if specified: '__NULL__'
- Default if unspecified: '__NULL__'
+ Default if unspecified: Earliest instant on the Hudi timeline
Review comment:
Good catch thanks, I updated
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] kywe665 commented on a change in pull request #4010: [HUDI-2770] - Docs for (HUDI-2737) - Use earliest instant for async compaction and clustering
Posted by GitBox <gi...@apache.org>.
kywe665 commented on a change in pull request #4010:
URL: https://github.com/apache/hudi/pull/4010#discussion_r752668509
##########
File path: website/docs/clustering.md
##########
@@ -165,7 +165,8 @@ With the release of Hudi version 0.9.0, we can schedule as well as execute clust
specify the `—mode` or `-m` option. There are three modes:
1. `schedule`: Make a clustering plan. This gives an instant which can be passed in execute mode.
-2. `execute`: Execute a clustering plan at given instant which means --instant-time is required here.
+2. `execute`: Execute a clustering plan at a given instant which means --instant-time is required.
Review comment:
Good call, since docs are versioned, the doc needs to describe current state, those that want to understand previous versions go to old versions of docs. I updated, thanks
##########
File path: website/docs/compaction.md
##########
@@ -74,22 +67,46 @@ spark-submit --packages org.apache.hudi:hudi-utilities-bundle_2.11:0.6.0 \
--continous
```
-### Hudi CLI
-Hudi CLI is yet another way to execute specific compactions asynchronously. Here is an example
+## Executing Async Compaction
+After compactions have been asynchronously scheduled on the Hudi Timeline, you can now execute those compactions with one of the following options
-```properties
-hudi:trips->compaction run --tableName <table_name> --parallelism <parallelism> --compactionInstant <InstantTime>
-...
-```
+### Hudi Compactor Utility
+Hudi provides a standalone tool to execute specific compactions asynchronously. Below is an example and you can read more in the [deployment guide](/docs/deployment#compactions)
-### Hudi Compactor Script
-Hudi provides a standalone tool to also execute specific compactions asynchronously. Below is an example and you can read more in the [deployment guide](/docs/next/deployment#compactions)
+:::info
+Note: As of version 0.10.0, the `instant-time` parameter is no longer required for the Hudi Compactor Utility. Each spark-submit will execute the earliest scheduled compaction on the Hudi timeline.
+:::
```properties
spark-submit --packages org.apache.hudi:hudi-utilities-bundle_2.11:0.6.0 \
--class org.apache.hudi.utilities.HoodieCompactor \
--base-path <base_path> \
--table-name <table_name> \
---instant-time <compaction_instant> \
---schema-file <schema_file>
+--schema-file <schema_file>\
Review comment:
fixed
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] kywe665 commented on a change in pull request #4010: [HUDI-2770] - Docs for (HUDI-2737) - Use earliest instant for async compaction and clustering
Posted by GitBox <gi...@apache.org>.
kywe665 commented on a change in pull request #4010:
URL: https://github.com/apache/hudi/pull/4010#discussion_r754745902
##########
File path: website/versioned_docs/version-0.9.0/cli.md
##########
@@ -0,0 +1,357 @@
+---
Review comment:
Added the same file to v0.9.0 so build doesn't break because it is a net new file to /docs/next
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] kywe665 commented on pull request #4010: [HUDI-2770] - Docs for (HUDI-2737) - Use earliest instant for async compaction and clustering
Posted by GitBox <gi...@apache.org>.
kywe665 commented on pull request #4010:
URL: https://github.com/apache/hudi/pull/4010#issuecomment-976085684
Thanks @bhasudha, I made the corresponding updates
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] bhasudha commented on a change in pull request #4010: [HUDI-2770] - Docs for (HUDI-2737) - Use earliest instant for async compaction and clustering
Posted by GitBox <gi...@apache.org>.
bhasudha commented on a change in pull request #4010:
URL: https://github.com/apache/hudi/pull/4010#discussion_r754706629
##########
File path: website/docs/compaction.md
##########
@@ -1,33 +1,26 @@
---
title: Compaction
-summary: "In this page, we describe async compaction in Hudi."
toc: true
last_modified_at:
---
-For Merge-On-Read table, data is stored using a combination of columnar (e.g parquet) + row based (e.g avro) file formats.
-Updates are logged to delta files & later compacted to produce new versions of columnar files synchronously or
-asynchronously. One of the main motivations behind Merge-On-Read is to reduce data latency when ingesting records.
-Hence, it makes sense to run compaction asynchronously without blocking ingestion.
-
+Compaction is executed asynchronously with Hudi by default.
## Async Compaction
-
Async Compaction is performed in 2 steps:
1. ***Compaction Scheduling***: This is done by the ingestion job. In this step, Hudi scans the partitions and selects **file
slices** to be compacted. A compaction plan is finally written to Hudi timeline.
1. ***Compaction Execution***: A separate process reads the compaction plan and performs compaction of file slices.
+## Scheduling Async Compaction
-## Deployment Models
-
-There are few ways by which we can execute compactions asynchronously.
+There are few ways by which we can schedule compactions to the Hudi timeline to be executed later asynchronously.
-### Spark Structured Streaming
+### Schedule compaction with Spark Structured Streaming
Review comment:
@kywe665 I feel this is bit confusing. Both Spark Structured Streaming and DeltaStreamer Continuous Mode allows you to run async compactions (scheduled and executed internally). From users perspective they dont need to schedule and execute separately from CLI or compactor script later when they are using Deltastreamer or Spark Streaming. CLI and Compactor scripts are other utilities to run compactions asynchronously.
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] bhasudha commented on a change in pull request #4010: [HUDI-2770] - Docs for (HUDI-2737) - Use earliest instant for async compaction and clustering
Posted by GitBox <gi...@apache.org>.
bhasudha commented on a change in pull request #4010:
URL: https://github.com/apache/hudi/pull/4010#discussion_r754706701
##########
File path: website/docs/compaction.md
##########
@@ -56,10 +49,10 @@ import org.apache.spark.sql.streaming.ProcessingTime;
writer.trigger(new ProcessingTime(30000)).start(tablePath);
```
-### DeltaStreamer Continuous Mode
+### Scheduling Compaction with DeltaStreamer Continuous Mode
Review comment:
same as above
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] nsivabalan commented on a change in pull request #4010: [HUDI-2770] - Docs for (HUDI-2737) - Use earliest instant for async compaction and clustering
Posted by GitBox <gi...@apache.org>.
nsivabalan commented on a change in pull request #4010:
URL: https://github.com/apache/hudi/pull/4010#discussion_r754634676
##########
File path: website/docs/clustering.md
##########
@@ -165,7 +165,8 @@ With the release of Hudi version 0.9.0, we can schedule as well as execute clust
specify the `—mode` or `-m` option. There are three modes:
1. `schedule`: Make a clustering plan. This gives an instant which can be passed in execute mode.
-2. `execute`: Execute a clustering plan at given instant which means --instant-time is required here.
+2. `execute`: Execute a clustering plan at a given instant which means --instant-time is required.
Review comment:
yes. we have versioned docs. so should be ok.
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] yihua commented on a change in pull request #4010: [HUDI-2770] - Docs for (HUDI-2737) - Use earliest instant for async compaction and clustering
Posted by GitBox <gi...@apache.org>.
yihua commented on a change in pull request #4010:
URL: https://github.com/apache/hudi/pull/4010#discussion_r752826724
##########
File path: website/docs/compaction.md
##########
@@ -71,24 +71,25 @@ spark-submit --packages org.apache.hudi:hudi-utilities-bundle_2.11:0.6.0 \
After compactions have been asynchronously scheduled on the Hudi Timeline, you can now execute those compactions with one of the following options
### Hudi Compactor Utility
-Hudi provides a standalone tool to execute specific compactions asynchronously. Below is an example and you can read more in the [deployment guide](/docs/deployment#compactions)
-
-:::info
-Note: As of version 0.10.0, the `instant-time` parameter is no longer required for the Hudi Compactor Utility. Each spark-submit will execute the earliest scheduled compaction on the Hudi timeline.
-:::
+Hudi provides a standalone tool to execute specific compactions asynchronously. Below is an example and you can read more in the [deployment guide](/docs/cli#compactions)
Review comment:
Here we can use `/docs/deployment#compactions` link since `HoodieCompactor` is different from Hudi CLI.
##########
File path: website/docs/cli.md
##########
@@ -283,9 +283,9 @@ Description: Run Compaction for given instant time
Keyword: compactionInstant
Help: Base path for the target hoodie table
- Mandatory: true
+ Mandatory: false
Default if specified: '__NULL__'
- Default if unspecified: '__NULL__'
+ Default if unspecified: Earliest instant on the Hudi timeline
Review comment:
One thing to clarify, for `compaction run` command in Hudi CLI, the `compactionInstant` argument is still needed. I haven't changed the logic of Hudi CLI in the corresponding PR.
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org