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/08/17 07:10:20 UTC
[GitHub] [hudi] liujinhui1994 opened a new pull request #3488: [HUDI-1674] Add partition level delete example
liujinhui1994 opened a new pull request #3488:
URL: https://github.com/apache/hudi/pull/3488
## *Tips*
- *Thank you very much for contributing to Apache Hudi.*
- *Please review https://hudi.apache.org/contribute/how-to-contribute before opening a pull request.*
## What is the purpose of the pull request
add partition level delete example
## Committer checklist
- [ ] Has a corresponding JIRA in PR title & commit
- [ ] Commit message is descriptive of the change
- [ ] CI is green
- [ ] Necessary doc changes done or have another open PR
- [ ] 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] hudi-bot edited a comment on pull request #3488: [HUDI-1674] Add partition level delete example
Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3488:
URL: https://github.com/apache/hudi/pull/3488#issuecomment-900054254
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "45d776abc498c933b12c2d4d866f2d14062093d0",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1782",
"triggerID" : "45d776abc498c933b12c2d4d866f2d14062093d0",
"triggerType" : "PUSH"
}, {
"hash" : "5670c5bcdde29b1d4ae04e61ccc691662aa71264",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1792",
"triggerID" : "5670c5bcdde29b1d4ae04e61ccc691662aa71264",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 45d776abc498c933b12c2d4d866f2d14062093d0 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1782)
* 5670c5bcdde29b1d4ae04e61ccc691662aa71264 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1792)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
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] liujinhui1994 commented on pull request #3488: [HUDI-1674] Add partition level delete example
Posted by GitBox <gi...@apache.org>.
liujinhui1994 commented on pull request #3488:
URL: https://github.com/apache/hudi/pull/3488#issuecomment-900757132
@wangxianghu please review
--
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] hudi-bot edited a comment on pull request #3488: [HUDI-1674] Add partition level delete example
Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3488:
URL: https://github.com/apache/hudi/pull/3488#issuecomment-900054254
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "45d776abc498c933b12c2d4d866f2d14062093d0",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1782",
"triggerID" : "45d776abc498c933b12c2d4d866f2d14062093d0",
"triggerType" : "PUSH"
}, {
"hash" : "5670c5bcdde29b1d4ae04e61ccc691662aa71264",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "5670c5bcdde29b1d4ae04e61ccc691662aa71264",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 45d776abc498c933b12c2d4d866f2d14062093d0 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1782)
* 5670c5bcdde29b1d4ae04e61ccc691662aa71264 UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
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] hudi-bot edited a comment on pull request #3488: [HUDI-1674] Add partition level delete example
Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3488:
URL: https://github.com/apache/hudi/pull/3488#issuecomment-900054254
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "45d776abc498c933b12c2d4d866f2d14062093d0",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1782",
"triggerID" : "45d776abc498c933b12c2d4d866f2d14062093d0",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 45d776abc498c933b12c2d4d866f2d14062093d0 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1782)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
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] hudi-bot edited a comment on pull request #3488: [HUDI-1674] Add partition level delete example
Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3488:
URL: https://github.com/apache/hudi/pull/3488#issuecomment-900054254
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "45d776abc498c933b12c2d4d866f2d14062093d0",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1782",
"triggerID" : "45d776abc498c933b12c2d4d866f2d14062093d0",
"triggerType" : "PUSH"
}, {
"hash" : "5670c5bcdde29b1d4ae04e61ccc691662aa71264",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1792",
"triggerID" : "5670c5bcdde29b1d4ae04e61ccc691662aa71264",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5670c5bcdde29b1d4ae04e61ccc691662aa71264 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1792)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
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] hudi-bot edited a comment on pull request #3488: [HUDI-1674] Add partition level delete example
Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3488:
URL: https://github.com/apache/hudi/pull/3488#issuecomment-900054254
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "45d776abc498c933b12c2d4d866f2d14062093d0",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1782",
"triggerID" : "45d776abc498c933b12c2d4d866f2d14062093d0",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 45d776abc498c933b12c2d4d866f2d14062093d0 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1782)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
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] wangxianghu merged pull request #3488: [HUDI-1674] Add partition level delete example
Posted by GitBox <gi...@apache.org>.
wangxianghu merged pull request #3488:
URL: https://github.com/apache/hudi/pull/3488
--
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] wangxianghu merged pull request #3488: [HUDI-1674] Add partition level delete example
Posted by GitBox <gi...@apache.org>.
wangxianghu merged pull request #3488:
URL: https://github.com/apache/hudi/pull/3488
--
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] liujinhui1994 commented on pull request #3488: [HUDI-1674] Add partition level delete example
Posted by GitBox <gi...@apache.org>.
liujinhui1994 commented on pull request #3488:
URL: https://github.com/apache/hudi/pull/3488#issuecomment-900757132
@wangxianghu please review
--
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] wangxianghu commented on a change in pull request #3488: [HUDI-1674] Add partition level delete example
Posted by GitBox <gi...@apache.org>.
wangxianghu commented on a change in pull request #3488:
URL: https://github.com/apache/hudi/pull/3488#discussion_r690429352
##########
File path: hudi-examples/src/main/scala/org/apache/hudi/examples/spark/HoodieDataSourceExample.scala
##########
@@ -129,6 +130,43 @@ object HoodieDataSourceExample {
save(tablePath)
}
+ /**
+ * Deleta data based in data information
Review comment:
please and a "." to the end of docs
--
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] hudi-bot commented on pull request #3488: [HUDI-1674] Add partition level delete example
Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #3488:
URL: https://github.com/apache/hudi/pull/3488#issuecomment-900054254
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "45d776abc498c933b12c2d4d866f2d14062093d0",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "45d776abc498c933b12c2d4d866f2d14062093d0",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 45d776abc498c933b12c2d4d866f2d14062093d0 UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
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] hudi-bot edited a comment on pull request #3488: [HUDI-1674] Add partition level delete example
Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3488:
URL: https://github.com/apache/hudi/pull/3488#issuecomment-900054254
--
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] wangxianghu commented on a change in pull request #3488: [HUDI-1674] Add partition level delete example
Posted by GitBox <gi...@apache.org>.
wangxianghu commented on a change in pull request #3488:
URL: https://github.com/apache/hudi/pull/3488#discussion_r690429555
##########
File path: hudi-examples/src/main/scala/org/apache/hudi/examples/spark/HoodieDataSourceExample.scala
##########
@@ -129,6 +130,43 @@ object HoodieDataSourceExample {
save(tablePath)
}
+ /**
+ * Deleta data based in data information
+ */
+ def delete(spark: SparkSession, tablePath: String, tableName: String): Unit = {
+
+ val roViewDF = spark.read.format("org.apache.hudi").load(tablePath + "/*/*/*/*")
+ roViewDF.createOrReplaceTempView("hudi_ro_table")
+ val df = spark.sql("select uuid, partitionpath, ts from hudi_ro_table limit 2")
+
+ df.write.format("org.apache.hudi").
+ options(getQuickstartWriteConfigs).
+ option(PRECOMBINE_FIELD.key, "ts").
+ option(RECORDKEY_FIELD.key, "uuid").
+ option(PARTITIONPATH_FIELD.key, "partitionpath").
+ option(TABLE_NAME.key, tableName).
+ option(OPERATION.key, DELETE_OPERATION_OPT_VAL).
+ mode(Append).
+ save(tablePath)
+ }
+
+ /**
+ * Delete the data of a single or multiple partitions
Review comment:
same here
--
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