Skip to content

[HUDI-1252] Remove unused code in DataSourceTestUtils#2054

Merged
xushiyan merged 1 commit intoapache:masterfrom
wangxianghu:HUDI-1252
Aug 31, 2020
Merged

[HUDI-1252] Remove unused code in DataSourceTestUtils#2054
xushiyan merged 1 commit intoapache:masterfrom
wangxianghu:HUDI-1252

Conversation

@wangxianghu
Copy link
Contributor

@wangxianghu wangxianghu commented Aug 30, 2020

…ceTestUtils

Tips

What is the purpose of the pull request

DataSourceTestUtils's inner class NoOpBulkInsertPartitioner was not used anywhere, we can remove it.

Brief change log

Remove unused class NoOpBulkInsertPartitioner in DataSourceTestUtils

Verify this pull request

(Please pick either of the following options)

This pull request is a trivial rework / code cleanup without any test coverage.

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.

@wangxianghu
Copy link
Contributor Author

@yanghua @xushiyan please take a look when free

@wangxianghu wangxianghu force-pushed the HUDI-1252 branch 2 times, most recently from 3bf8960 to 3ff4ee4 Compare August 30, 2020 11:38
@xushiyan
Copy link
Member

Hi @wangxianghu the removal looks good. Good catch!

While you're here, could you also clean up other unused methods in this class? namely

org.apache.hudi.testutils.DataSourceTestUtils#convertToString
org.apache.hudi.testutils.DataSourceTestUtils#convertToStringList
org.apache.hudi.testutils.DataSourceTestUtils#convertKeysToStringList

These must have been leftover during a rebase in the past. these methods have been migrated to

org.apache.hudi.common.testutils.RawTripTestPayload#recordToString
org.apache.hudi.common.testutils.RawTripTestPayload#recordsToStrings

and convertKeysToStringList merged to

.map(hr -> "{\"_row_key\":\"" + hr.getRecordKey() + "\",\"partition\":\"" + hr.getPartitionPath() + "\"}")

@wangxianghu
Copy link
Contributor Author

Hi @wangxianghu the removal looks good. Good catch!

While you're here, could you also clean up other unused methods in this class? namely

org.apache.hudi.testutils.DataSourceTestUtils#convertToString
org.apache.hudi.testutils.DataSourceTestUtils#convertToStringList
org.apache.hudi.testutils.DataSourceTestUtils#convertKeysToStringList

These must have been leftover during a rebase in the past. these methods have been migrated to

org.apache.hudi.common.testutils.RawTripTestPayload#recordToString
org.apache.hudi.common.testutils.RawTripTestPayload#recordsToStrings

and convertKeysToStringList merged to

.map(hr -> "{\"_row_key\":\"" + hr.getRecordKey() + "\",\"partition\":\"" + hr.getPartitionPath() + "\"}")

@xushiyan thanks for your review. I have removed the methods you mentioned, PTAL :)

@wangxianghu wangxianghu changed the title [HUDI-1252] Remove unused class NoOpBulkInsertPartitioner in DataSour… [HUDI-1252] Remove unused code in DataSourceTestUtils Aug 31, 2020
@xushiyan xushiyan self-assigned this Aug 31, 2020
@xushiyan xushiyan self-requested a review August 31, 2020 02:19
Copy link
Member

@xushiyan xushiyan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM..will merge after CI passes.

@xushiyan xushiyan merged commit 6df8f88 into apache:master Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants