Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HUDI-113]: Use Pair over # delimited string #672

Merged

Conversation

pseudomuto
Copy link
Contributor

@pseudomuto pseudomuto commented May 10, 2019

@vinothchandar

As outlined in HUDI-113, I've updated the bloom index to use a Pair rather than "#" as the separator.

@pseudomuto pseudomuto force-pushed the tuple_over_hash_delimited_string branch 6 times, most recently from b79c121 to 81c2ad7 Compare May 13, 2019 13:25
@vinothchandar
Copy link
Member

Caused by: org.apache.spark.SparkException: 
Job aborted due to stage failure: Task 1 in stage 40.0 failed 1 times, most recent failure: Lost task 1.0 in stage 40.0 (TID 56, localhost, executor driver): java.lang.ClassCastException: scala.Tuple2 cannot be cast to java.lang.String
	at com.uber.hoodie.index.bloom.BucketizedBloomCheckPartitioner.getPartition(BucketizedBloomCheckPartitioner.java:142)
	at org.apache.spark.shuffle.sort.BypassMergeSortShuffleWriter.write(BypassMergeSortShuffleWriter.java:152)
	at org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:96)
	at org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:53)

See some errors due to casting mismatch..

High level question... I see that sorting a List already provides records ordering by the first and second level (in that order). So, can we just go back to Tuple2<String, HoodieKey> or if we have to use a custom comparator, can it just work off that?

@vinothchandar
Copy link
Member

Essentially, I saying the following should be sufficient information?

new Tuple2<>(matchingFile,  new HoodieKey(recordKey, partitionPath));

This will also reduce shuffled data.. a nice bonus..

@pseudomuto pseudomuto changed the title [HUDI-113]: Use Tuple2 over # delimited string [HUDI-113]: WIP Use Tuple2 over # delimited string May 14, 2019
@pseudomuto pseudomuto force-pushed the tuple_over_hash_delimited_string branch from 81c2ad7 to 507c2fe Compare May 15, 2019 17:53
Copy link
Member

@vinothchandar vinothchandar left a comment

Choose a reason for hiding this comment

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

Minor style nits. lgtm otherwise. Can merge into the next release if you can confirm these

});
return recordComparisons;
}).flatMapToPair(List::iterator);

Copy link
Member

Choose a reason for hiding this comment

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

nice clean up

@pseudomuto pseudomuto force-pushed the tuple_over_hash_delimited_string branch from 507c2fe to c60a001 Compare May 17, 2019 17:00
@pseudomuto pseudomuto changed the title [HUDI-113]: WIP Use Tuple2 over # delimited string [HUDI-113]: Use Pair over # delimited string May 17, 2019
@pseudomuto pseudomuto force-pushed the tuple_over_hash_delimited_string branch from e554ea9 to e8ddc55 Compare May 21, 2019 14:37
@pseudomuto
Copy link
Contributor Author

Apologies for the number of rebases. At this point, I think this is good. Settled on using Pair<String, String> and updated the partitioner accordingly.

@vinothchandar vinothchandar merged commit 3fd2fd6 into apache:master May 21, 2019
@pseudomuto pseudomuto deleted the tuple_over_hash_delimited_string branch May 22, 2019 00:04
nsivabalan pushed a commit to nsivabalan/hudi that referenced this pull request Apr 26, 2024
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