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/12/30 02:38:17 UTC
[GitHub] [hudi] nsivabalan opened a new pull request #4473: [HUDI-2590] Adding tests to validate different key generators
nsivabalan opened a new pull request #4473:
URL: https://github.com/apache/hudi/pull/4473
## What is the purpose of the pull request
Added tests to validate COW table for different queries for different key generators
## Brief change log
*(for example:)*
- *Modify AnnotationLocation checkstyle rule in checkstyle.xml*
## Verify this pull request
*(Please pick either of the following options)*
This pull request is a trivial rework / code cleanup without any test coverage.
*(or)*
This pull request is already covered by existing tests, such as *(please describe tests)*.
(or)
This change added tests and can be verified as follows:
*(example:)*
- *Added integration tests for end-to-end.*
- *Added HoodieClientWriteTest to verify the change.*
- *Manually verified the change by running a job locally.*
## 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 removed a comment on pull request #4473: [HUDI-2590] Adding tests to validate different key generators
Posted by GitBox <gi...@apache.org>.
hudi-bot removed a comment on pull request #4473:
URL: https://github.com/apache/hudi/pull/4473#issuecomment-1002848366
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "35841cdbffb0edd8d7e1f114147b12ee3daf0872",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "35841cdbffb0edd8d7e1f114147b12ee3daf0872",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 35841cdbffb0edd8d7e1f114147b12ee3daf0872 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
[GitHub] [hudi] codope merged pull request #4473: [HUDI-2590] Adding tests to validate different key generators
Posted by GitBox <gi...@apache.org>.
codope merged pull request #4473:
URL: https://github.com/apache/hudi/pull/4473
--
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 removed a comment on pull request #4473: [HUDI-2590] Adding tests to validate different key generators
Posted by GitBox <gi...@apache.org>.
hudi-bot removed a comment on pull request #4473:
URL: https://github.com/apache/hudi/pull/4473#issuecomment-1002848920
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "35841cdbffb0edd8d7e1f114147b12ee3daf0872",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "35841cdbffb0edd8d7e1f114147b12ee3daf0872",
"triggerType" : "PUSH"
}, {
"hash" : "b91d9c4a42a05e01ee5a75449e861d9bf88b69c7",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "b91d9c4a42a05e01ee5a75449e861d9bf88b69c7",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 35841cdbffb0edd8d7e1f114147b12ee3daf0872 UNKNOWN
* b91d9c4a42a05e01ee5a75449e861d9bf88b69c7 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
[GitHub] [hudi] hudi-bot removed a comment on pull request #4473: [HUDI-2590] Adding tests to validate different key generators
Posted by GitBox <gi...@apache.org>.
hudi-bot removed a comment on pull request #4473:
URL: https://github.com/apache/hudi/pull/4473#issuecomment-1002849419
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "35841cdbffb0edd8d7e1f114147b12ee3daf0872",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "35841cdbffb0edd8d7e1f114147b12ee3daf0872",
"triggerType" : "PUSH"
}, {
"hash" : "b91d9c4a42a05e01ee5a75449e861d9bf88b69c7",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=4807",
"triggerID" : "b91d9c4a42a05e01ee5a75449e861d9bf88b69c7",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 35841cdbffb0edd8d7e1f114147b12ee3daf0872 UNKNOWN
* b91d9c4a42a05e01ee5a75449e861d9bf88b69c7 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=4807)
<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
[GitHub] [hudi] codope commented on a change in pull request #4473: [HUDI-2590] Adding tests to validate different key generators
Posted by GitBox <gi...@apache.org>.
codope commented on a change in pull request #4473:
URL: https://github.com/apache/hudi/pull/4473#discussion_r776919486
##########
File path: hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/hudi/functional/TestCOWDataSourceStorage.scala
##########
@@ -100,8 +120,26 @@ class TestCOWDataSourceStorage extends SparkClientFunctionalTestHarness {
assertEquals(updatedVerificationVal, snapshotDF2.filter(col("_row_key") === verificationRowKey).select(verificationCol).first.getString(0))
// Upsert Operation without Hudi metadata columns
- val records2 = recordsToStrings(dataGen.generateUpdates("001", 100)).toList
- val inputDF2 = spark.read.json(spark.sparkContext.parallelize(records2 , 2))
+ val records2 = recordsToStrings(dataGen.generateUpdates("002", 100)).toList
+ var inputDF2 = spark.read.json(spark.sparkContext.parallelize(records2, 2))
+
+ if (classOf[TimestampBasedKeyGenerator].getName.equals(keyGenClass)) {
+ // incase of Timestamp based key gen, current_ts should not be updated. but dataGen.generateUpdates() would have updated
Review comment:
So this was the issue with the test datagen. Would special handling of timestamp keygen in the datagen itself be better than doing it here in a test case?
--
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 #4473: [HUDI-2590] Adding tests to validate different key generators
Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #4473:
URL: https://github.com/apache/hudi/pull/4473#issuecomment-1002860504
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "35841cdbffb0edd8d7e1f114147b12ee3daf0872",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "35841cdbffb0edd8d7e1f114147b12ee3daf0872",
"triggerType" : "PUSH"
}, {
"hash" : "b91d9c4a42a05e01ee5a75449e861d9bf88b69c7",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=4807",
"triggerID" : "b91d9c4a42a05e01ee5a75449e861d9bf88b69c7",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 35841cdbffb0edd8d7e1f114147b12ee3daf0872 UNKNOWN
* b91d9c4a42a05e01ee5a75449e861d9bf88b69c7 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=4807)
<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
[GitHub] [hudi] codope commented on a change in pull request #4473: [HUDI-2590] Adding tests to validate different key generators
Posted by GitBox <gi...@apache.org>.
codope commented on a change in pull request #4473:
URL: https://github.com/apache/hudi/pull/4473#discussion_r777829954
##########
File path: hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/hudi/functional/TestCOWDataSourceStorage.scala
##########
@@ -100,8 +120,26 @@ class TestCOWDataSourceStorage extends SparkClientFunctionalTestHarness {
assertEquals(updatedVerificationVal, snapshotDF2.filter(col("_row_key") === verificationRowKey).select(verificationCol).first.getString(0))
// Upsert Operation without Hudi metadata columns
- val records2 = recordsToStrings(dataGen.generateUpdates("001", 100)).toList
- val inputDF2 = spark.read.json(spark.sparkContext.parallelize(records2 , 2))
+ val records2 = recordsToStrings(dataGen.generateUpdates("002", 100)).toList
+ var inputDF2 = spark.read.json(spark.sparkContext.parallelize(records2, 2))
+
+ if (classOf[TimestampBasedKeyGenerator].getName.equals(keyGenClass)) {
+ // incase of Timestamp based key gen, current_ts should not be updated. but dataGen.generateUpdates() would have updated
Review comment:
Sounds good. Will land 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] hudi-bot commented on pull request #4473: [HUDI-2590] Adding tests to validate different key generators
Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #4473:
URL: https://github.com/apache/hudi/pull/4473#issuecomment-1002849419
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "35841cdbffb0edd8d7e1f114147b12ee3daf0872",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "35841cdbffb0edd8d7e1f114147b12ee3daf0872",
"triggerType" : "PUSH"
}, {
"hash" : "b91d9c4a42a05e01ee5a75449e861d9bf88b69c7",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=4807",
"triggerID" : "b91d9c4a42a05e01ee5a75449e861d9bf88b69c7",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 35841cdbffb0edd8d7e1f114147b12ee3daf0872 UNKNOWN
* b91d9c4a42a05e01ee5a75449e861d9bf88b69c7 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=4807)
<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
[GitHub] [hudi] hudi-bot commented on pull request #4473: [HUDI-2590] Adding tests to validate different key generators
Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #4473:
URL: https://github.com/apache/hudi/pull/4473#issuecomment-1002848920
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "35841cdbffb0edd8d7e1f114147b12ee3daf0872",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "35841cdbffb0edd8d7e1f114147b12ee3daf0872",
"triggerType" : "PUSH"
}, {
"hash" : "b91d9c4a42a05e01ee5a75449e861d9bf88b69c7",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "b91d9c4a42a05e01ee5a75449e861d9bf88b69c7",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 35841cdbffb0edd8d7e1f114147b12ee3daf0872 UNKNOWN
* b91d9c4a42a05e01ee5a75449e861d9bf88b69c7 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
[GitHub] [hudi] hudi-bot commented on pull request #4473: [HUDI-2590] Adding tests to validate different key generators
Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #4473:
URL: https://github.com/apache/hudi/pull/4473#issuecomment-1002848366
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "35841cdbffb0edd8d7e1f114147b12ee3daf0872",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "35841cdbffb0edd8d7e1f114147b12ee3daf0872",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 35841cdbffb0edd8d7e1f114147b12ee3daf0872 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
[GitHub] [hudi] nsivabalan commented on a change in pull request #4473: [HUDI-2590] Adding tests to validate different key generators
Posted by GitBox <gi...@apache.org>.
nsivabalan commented on a change in pull request #4473:
URL: https://github.com/apache/hudi/pull/4473#discussion_r777784743
##########
File path: hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/hudi/functional/TestCOWDataSourceStorage.scala
##########
@@ -100,8 +120,26 @@ class TestCOWDataSourceStorage extends SparkClientFunctionalTestHarness {
assertEquals(updatedVerificationVal, snapshotDF2.filter(col("_row_key") === verificationRowKey).select(verificationCol).first.getString(0))
// Upsert Operation without Hudi metadata columns
- val records2 = recordsToStrings(dataGen.generateUpdates("001", 100)).toList
- val inputDF2 = spark.read.json(spark.sparkContext.parallelize(records2 , 2))
+ val records2 = recordsToStrings(dataGen.generateUpdates("002", 100)).toList
+ var inputDF2 = spark.read.json(spark.sparkContext.parallelize(records2, 2))
+
+ if (classOf[TimestampBasedKeyGenerator].getName.equals(keyGenClass)) {
+ // incase of Timestamp based key gen, current_ts should not be updated. but dataGen.generateUpdates() would have updated
Review comment:
I did take a stab, looks like we have to touch lot of methods in HoodieTestDataGenerator. Will take it as a follow up https://issues.apache.org/jira/browse/HUDI-3152
--
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