You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "fhan688 (via GitHub)" <gi...@apache.org> on 2024/12/03 13:16:56 UTC
[PR] [HUDI-8639] Support filter by partitions in ShowInvalidParquetProcedure [hudi]
fhan688 opened a new pull request, #12410:
URL: https://github.com/apache/hudi/pull/12410
### Change Logs
add new parameter in ShowInvalidParquetProcedure, support specifying 'partitions' and filter invalid parquet files by partitions.
### Impact
hudi-spark-datasource
### Risk level (write none, low medium or high below)
Low
### Documentation Update
None
### Contributor's checklist
- [ ] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute)
- [ ] Change Logs and Impact were stated clearly
- [ ] Adequate tests were added if applicable
- [ ] CI passed
--
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
Re: [PR] [HUDI-8639] Support filter by partitions in ShowInvalidParquetProcedure [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #12410:
URL: https://github.com/apache/hudi/pull/12410#issuecomment-2516611431
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "0b5be722e8918482f9e35566da0f0b20e0dd059a",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=2238",
"triggerID" : "0b5be722e8918482f9e35566da0f0b20e0dd059a",
"triggerType" : "PUSH"
}, {
"hash" : "5cb809a94c66af777a4b1236c79140193fc12535",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "5cb809a94c66af777a4b1236c79140193fc12535",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 0b5be722e8918482f9e35566da0f0b20e0dd059a Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=2238)
* 5cb809a94c66af777a4b1236c79140193fc12535 UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@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
Re: [PR] [HUDI-8639] Support filter by partitions in ShowInvalidParquetProcedure [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #12410:
URL: https://github.com/apache/hudi/pull/12410#issuecomment-2514727358
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "0b5be722e8918482f9e35566da0f0b20e0dd059a",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=2238",
"triggerID" : "0b5be722e8918482f9e35566da0f0b20e0dd059a",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 0b5be722e8918482f9e35566da0f0b20e0dd059a Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=2238)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@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
Re: [PR] [HUDI-8639] Support filter by partitions in ShowInvalidParquetProcedure [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #12410:
URL: https://github.com/apache/hudi/pull/12410#issuecomment-2516615460
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "0b5be722e8918482f9e35566da0f0b20e0dd059a",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=2238",
"triggerID" : "0b5be722e8918482f9e35566da0f0b20e0dd059a",
"triggerType" : "PUSH"
}, {
"hash" : "5cb809a94c66af777a4b1236c79140193fc12535",
"status" : "PENDING",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=2262",
"triggerID" : "5cb809a94c66af777a4b1236c79140193fc12535",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 0b5be722e8918482f9e35566da0f0b20e0dd059a Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=2238)
* 5cb809a94c66af777a4b1236c79140193fc12535 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=2262)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@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
Re: [PR] [HUDI-8639] Support filter by partitions in ShowInvalidParquetProcedure [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #12410:
URL: https://github.com/apache/hudi/pull/12410#issuecomment-2514536648
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "0b5be722e8918482f9e35566da0f0b20e0dd059a",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "0b5be722e8918482f9e35566da0f0b20e0dd059a",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 0b5be722e8918482f9e35566da0f0b20e0dd059a UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@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
Re: [PR] [HUDI-8639] Support filter by partitions in ShowInvalidParquetProcedure [hudi]
Posted by "zhangyue19921010 (via GitHub)" <gi...@apache.org>.
zhangyue19921010 commented on code in PR #12410:
URL: https://github.com/apache/hudi/pull/12410#discussion_r1868910587
##########
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/procedures/ShowInvalidParquetProcedure.scala:
##########
@@ -52,11 +54,14 @@ class ShowInvalidParquetProcedure extends BaseProcedure with ProcedureBuilder {
val srcPath = getArgValueOrDefault(args, PARAMETERS(0)).get.asInstanceOf[String]
val limit = getArgValueOrDefault(args, PARAMETERS(1))
val needDelete = getArgValueOrDefault(args, PARAMETERS(2)).get.asInstanceOf[Boolean]
+ val partitions = getArgValueOrDefault(args, PARAMETERS(3)).map(_.toString).getOrElse("")
val storageConf = HadoopFSUtils.getStorageConfWithCopy(jsc.hadoopConfiguration())
val storage = new HoodieHadoopStorage(srcPath, storageConf)
- val partitionPaths: java.util.List[String] = FSUtils.getAllPartitionPaths(
- new HoodieSparkEngineContext(jsc), storage, srcPath, false)
- val javaRdd: JavaRDD[String] = jsc.parallelize(partitionPaths, partitionPaths.size())
+ val metadataConfig = HoodieMetadataConfig.newBuilder.enable(false).build
+ val metadata = HoodieTableMetadata.create(new HoodieSparkEngineContext(jsc), storage, metadataConfig, srcPath)
+ val partitionPaths: java.util.List[String] = metadata.getPartitionPathWithPathPrefixes(partitions.split(",").toList.asJava)
Review Comment:
We should use original `FSUtils.getAllPartitionPaths(
new HoodieSparkEngineContext(jsc), storage, srcPath, false)` when users didn't set `partitions` config
--
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
Re: [PR] [HUDI-8639] Support filter by partitions in ShowInvalidParquetProcedure [hudi]
Posted by "fhan688 (via GitHub)" <gi...@apache.org>.
fhan688 commented on code in PR #12410:
URL: https://github.com/apache/hudi/pull/12410#discussion_r1868927763
##########
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/procedures/ShowInvalidParquetProcedure.scala:
##########
@@ -52,11 +54,14 @@ class ShowInvalidParquetProcedure extends BaseProcedure with ProcedureBuilder {
val srcPath = getArgValueOrDefault(args, PARAMETERS(0)).get.asInstanceOf[String]
val limit = getArgValueOrDefault(args, PARAMETERS(1))
val needDelete = getArgValueOrDefault(args, PARAMETERS(2)).get.asInstanceOf[Boolean]
+ val partitions = getArgValueOrDefault(args, PARAMETERS(3)).map(_.toString).getOrElse("")
val storageConf = HadoopFSUtils.getStorageConfWithCopy(jsc.hadoopConfiguration())
val storage = new HoodieHadoopStorage(srcPath, storageConf)
- val partitionPaths: java.util.List[String] = FSUtils.getAllPartitionPaths(
- new HoodieSparkEngineContext(jsc), storage, srcPath, false)
- val javaRdd: JavaRDD[String] = jsc.parallelize(partitionPaths, partitionPaths.size())
+ val metadataConfig = HoodieMetadataConfig.newBuilder.enable(false).build
+ val metadata = HoodieTableMetadata.create(new HoodieSparkEngineContext(jsc), storage, metadataConfig, srcPath)
+ val partitionPaths: java.util.List[String] = metadata.getPartitionPathWithPathPrefixes(partitions.split(",").toList.asJava)
Review Comment:
`getPartitionPathWithPathPrefixes(partitions)` will return all partitionPaths when `partitions` are empty.
--
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
Re: [PR] [HUDI-8639] Support filter by partitions in ShowInvalidParquetProcedure [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #12410:
URL: https://github.com/apache/hudi/pull/12410#issuecomment-2518667933
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "0b5be722e8918482f9e35566da0f0b20e0dd059a",
"status" : "DELETED",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=2238",
"triggerID" : "0b5be722e8918482f9e35566da0f0b20e0dd059a",
"triggerType" : "PUSH"
}, {
"hash" : "5cb809a94c66af777a4b1236c79140193fc12535",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=2262",
"triggerID" : "5cb809a94c66af777a4b1236c79140193fc12535",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5cb809a94c66af777a4b1236c79140193fc12535 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=2262)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@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
Re: [PR] [HUDI-8639] Support filter by partitions in ShowInvalidParquetProcedure [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #12410:
URL: https://github.com/apache/hudi/pull/12410#issuecomment-2514540084
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "0b5be722e8918482f9e35566da0f0b20e0dd059a",
"status" : "PENDING",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=2238",
"triggerID" : "0b5be722e8918482f9e35566da0f0b20e0dd059a",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 0b5be722e8918482f9e35566da0f0b20e0dd059a Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=2238)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@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
Re: [PR] [HUDI-8639] Support filter by partitions in ShowInvalidParquetProcedure [hudi]
Posted by "zhangyue19921010 (via GitHub)" <gi...@apache.org>.
zhangyue19921010 commented on code in PR #12410:
URL: https://github.com/apache/hudi/pull/12410#discussion_r1868910587
##########
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/procedures/ShowInvalidParquetProcedure.scala:
##########
@@ -52,11 +54,14 @@ class ShowInvalidParquetProcedure extends BaseProcedure with ProcedureBuilder {
val srcPath = getArgValueOrDefault(args, PARAMETERS(0)).get.asInstanceOf[String]
val limit = getArgValueOrDefault(args, PARAMETERS(1))
val needDelete = getArgValueOrDefault(args, PARAMETERS(2)).get.asInstanceOf[Boolean]
+ val partitions = getArgValueOrDefault(args, PARAMETERS(3)).map(_.toString).getOrElse("")
val storageConf = HadoopFSUtils.getStorageConfWithCopy(jsc.hadoopConfiguration())
val storage = new HoodieHadoopStorage(srcPath, storageConf)
- val partitionPaths: java.util.List[String] = FSUtils.getAllPartitionPaths(
- new HoodieSparkEngineContext(jsc), storage, srcPath, false)
- val javaRdd: JavaRDD[String] = jsc.parallelize(partitionPaths, partitionPaths.size())
+ val metadataConfig = HoodieMetadataConfig.newBuilder.enable(false).build
+ val metadata = HoodieTableMetadata.create(new HoodieSparkEngineContext(jsc), storage, metadataConfig, srcPath)
+ val partitionPaths: java.util.List[String] = metadata.getPartitionPathWithPathPrefixes(partitions.split(",").toList.asJava)
Review Comment:
Should we use original `FSUtils.getAllPartitionPaths(
new HoodieSparkEngineContext(jsc), storage, srcPath, false)` when users didn't set `partitions` config
--
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
Re: [PR] [HUDI-8639] Support filter by partitions in ShowInvalidParquetProcedure [hudi]
Posted by "zhangyue19921010 (via GitHub)" <gi...@apache.org>.
zhangyue19921010 merged PR #12410:
URL: https://github.com/apache/hudi/pull/12410
--
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