[
https://issues.apache.org/jira/browse/HUDI-2177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17389080#comment-17389080
]
ASF GitHub Bot commented on HUDI-2177:
--------------------------------------
nsivabalan commented on a change in pull request #3315:
URL: https://github.com/apache/hudi/pull/3315#discussion_r678660798
##########
File path:
hudi-common/src/main/java/org/apache/hudi/common/util/SpillableMapUtils.java
##########
@@ -110,8 +110,15 @@ public static long generateChecksum(byte[] data) {
* Utility method to convert bytes to HoodieRecord using schema and payload
class.
*/
public static <R> R convertToHoodieRecordPayload(GenericRecord rec, String
payloadClazz) {
- String recKey = rec.get(HoodieRecord.RECORD_KEY_METADATA_FIELD).toString();
- String partitionPath =
rec.get(HoodieRecord.PARTITION_PATH_METADATA_FIELD).toString();
+ return convertToHoodieRecordPayload(rec, payloadClazz,
HoodieRecord.RECORD_KEY_METADATA_FIELD,
HoodieRecord.PARTITION_PATH_METADATA_FIELD);
Review comment:
I had this dilemma too and this was my reasoning. Conversion of
genRecord to HoodieRecord is confined within SpillableMapUtils. and hence felt
it makes sense that this class decides whether to use
HoodieRecord.RECORD_KEY_METADATA_FIELD or what the caller has passed in.
If not, then HoodieRecord.RECORD_KEY_METADATA_FIELD has to be passed in by
all N callers to this method. Felt we are leaking this hoodie's meta field into
to other classes.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
> Virtual keys support for Compaction
> -----------------------------------
>
> Key: HUDI-2177
> URL: https://issues.apache.org/jira/browse/HUDI-2177
> Project: Apache Hudi
> Issue Type: Sub-task
> Components: Writer Core
> Reporter: sivabalan narayanan
> Assignee: sivabalan narayanan
> Priority: Major
> Labels: pull-request-available
> Fix For: 0.9.0
>
>
> Virtual keys support for Compaction
--
This message was sent by Atlassian Jira
(v8.3.4#803005)