-
Notifications
You must be signed in to change notification settings - Fork 32
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
Fix: multiple bugs on spark-shell usage #57
Conversation
a8b2331
to
c986354
Compare
Signed-off-by: Alexander Bezzubov <[email protected]>
8320647
to
4d62688
Compare
After much experiments I could not find a way to work around different Guava version at runtime, while submitting a fatJar. The only way it works for me is - submitting a regular jar, and providing all the dependencies though Adding |
Signed-off-by: Alexander Bezzubov <[email protected]>
Signed-off-by: Alexander Bezzubov <[email protected]>
d9bb0c5
to
b17756f
Compare
Codecov Report
@@ Coverage Diff @@
## master #57 +/- ##
============================================
+ Coverage 84.12% 84.28% +0.15%
Complexity 40 40
============================================
Files 17 17
Lines 441 439 -2
Branches 76 76
============================================
- Hits 371 370 -1
Misses 33 33
+ Partials 37 36 -1
Continue to review full report at Codecov.
|
Signed-off-by: Alexander Bezzubov <[email protected]>
b17756f
to
9a8ed37
Compare
The workaround is ready to be merged at will. A fix for submiting actual fatJar would be handled in subsequent PR |
But even if we implement the spark-shell wrapper we still have the same problem in the python wrapper and using the library programmatically unless the user adds |
I think all the errors fixed here are already fixed on master branch. Close these PR if true. Thanks! |
@ajnavarro great! I might have missed it, but could no find in master analog of end to end tests from 0a904e0 |
Submitting a fatJar after adding bblfsh-client results in runtime exceptions only when used \w spark-submit/spark-shell
This PR includes:
update CI to run
spark-shell --jar
fixbetter be fixed in Add failing test for empty file content enry#106 or elsewhere upstreamCaused by: java.lang.IllegalArgumentException: Allocation size must be greater than zero
on.classifyLanguages()
fixworkaroundCaused by: java.lang.NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors.directExecutor()Ljava/util/concurrent/Executor;
on.extractUASTs()
Which is result of having old version of Guava in runtime classpath of Spark, when gRPC needs a new one. Best of all worlds solution would be - gRPC re-shade guava in their build... Would it be possible to shade guava? grpc/grpc-java#2688 but that will take a while to get ScalaPB to adopt it.
Another option could be re-shade it on our side in a fatJar build. This should be handled in sub-sequent PRs.
There is a workaround, if we ship newer Guava AND a clients of SparkAPI set configuration properties in their apps (before creating in spark context i.e though
spark-submit --properties-file
)CI uses this workaround. It can be automated on the client side by putting the above
$SPARK_HOME/conf/spark-defaults.conf
for some reason,
spark.executor.userClassPathFirst=true
results in 🐞workaround, using non-fat jar +
--packages