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

Protobuf as bytearray for spark conf #76

Merged
merged 4 commits into from
Dec 20, 2019
Merged

Conversation

mlathara
Copy link
Contributor

We were passing in protobuf as json string in for spark. It turns out that Google's python protobuf sends in int64 as string (for reasons specified in many places, for instance here)

So this moves us to expect protobuf bytestream instead. Since we use hadoop configuration to pass the config, it gets encoded as a base64 string on the sender side - so the receiver decodes that first before ingesting the protobuf object.

Also, a few annoying travis Mac OS changes.

@mlathara mlathara changed the base branch from master to develop December 18, 2019 23:22
@codecov
Copy link

codecov bot commented Dec 18, 2019

Codecov Report

Merging #76 into develop will decrease coverage by 28.36%.
The diff coverage is 63.63%.

Impacted file tree graph

@@              Coverage Diff               @@
##             develop      #76       +/-   ##
==============================================
- Coverage      77.49%   49.13%   -28.37%     
- Complexity         0      412      +412     
==============================================
  Files            117      111        -6     
  Lines          16062    14974     -1088     
  Branches         330      330               
==============================================
- Hits           12447     7357     -5090     
- Misses          3426     7431     +4005     
+ Partials         189      186        -3
Impacted Files Coverage Δ Complexity Δ
...a/org/genomicsdb/reader/GenomicsDBQueryStream.java 48.71% <ø> (ø) 10 <0> (+10) ⬆️
...g/genomicsdb/reader/GenomicsDBFeatureIterator.java 79.26% <ø> (ø) 17 <0> (+17) ⬆️
...csdb/importer/extensions/CallSetMapExtensions.java 40% <ø> (-21.34%) 8 <0> (+8)
...ain/java/org/genomicsdb/spark/GenomicsDBInput.java 62.31% <100%> (-4.98%) 41 <0> (+41)
.../org/genomicsdb/spark/GenomicsDBConfiguration.java 57.33% <50%> (-2.81%) 20 <0> (+20)
...va/org/genomicsdb/spark/GenomicsDBInputFormat.java 63.33% <60%> (ø) 8 <0> (+8) ⬆️
src/main/cpp/include/api/genomicsdb.h 0% <0%> (-100%) 0% <0%> (ø)
src/main/cpp/src/api/genomicsdb.cc 0.41% <0%> (-95.4%) 0% <0%> (ø)
...rc/main/cpp/src/genomicsdb/genomicsdb_iterators.cc 0.27% <0%> (-94.45%) 0% <0%> (ø)
...cpp/include/genomicsdb/genomicsdb_columnar_field.h 0% <0%> (-93.45%) 0% <0%> (ø)
... and 70 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 49e2773...e464055. Read the comment docs.

@mlathara mlathara requested a review from nalinigans December 19, 2019 17:49
Copy link
Member

@nalinigans nalinigans left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Copy link
Contributor

@kgururaj kgururaj left a comment

Choose a reason for hiding this comment

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

Looks good to me

  • I'm assuming the reason to convert back and forth between a bytearray and String is that Spark configuration doesn't accept binary values.
  • Facepalm for the string int64 representation in JSON to deal with Javascript

@mlathara
Copy link
Contributor Author

Yup - Spark conf doesn't take binary values.

@mlathara mlathara merged commit 31d4020 into develop Dec 20, 2019
@mlathara mlathara deleted the ml_proto_bytearray branch December 20, 2019 18:59
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.

3 participants