Comments (8)
Maybe we need to create GlobalRef
for all objects? I didn't think we needed to... but maybe we do??
I'll try to replicate. mvn package
will get me everything? I don't need to start a Spark process or anything?
from javacall.jl.
Good that you asked - I updated the branch so that now mvn package
downloads all dependencies including Spark itself and packages them into a single "sparta-assembly.jar". This jar is then included in a classpath (see "init.jl"), and Spark context is created from Julia itself (see sc = SparkContext()
above). So yes, now you only need to run mvn package
to prepare all Java code.
from javacall.jl.
Regarding global references, yes, it looks pretty likely to be the cause. Would returning global refs from jcall
and removing them in deleteref
enough in this case?
from javacall.jl.
Yes, that is what I was thinking. Convert object references to global refs
in convert_result
and remove them in deleteref
. Can you try that and
see if that helps?
On Sun, Aug 9, 2015 at 12:18 PM, Andrei Zhabinski [email protected]
wrote:
Regarding global references, yes, it looks pretty likely to be the cause.
Would returning global refs from jcall and removing them in deleteref
enough in this case?—
Reply to this email directly or view it on GitHub
#20 (comment).
from javacall.jl.
Just tried it in global-refs branch, but with no success. I wrapped all convert_result
methods except for those for strings and arrays, so custom objects (like SparkContext
or JavaRDD
) should have been affected. Yet, I get same NullPointerException
and segmentation fault.
from javacall.jl.
:( The changes in the branch look right...
Exception in thread "main" java.lang.NullPointerException at org.apache.spark.api.java.JavaRDD$.toRDD(JavaRDD.scala:197)
What is the object that is null in JavaRDD.scala:197
? is it sc
or java_rdd
?
from javacall.jl.
It's java_rdd
, or, more precisely, java_rdd.jrdd
, because java_rdd
is a Julia wrapper for a pointer to JavaRDD
object in JVM. In source code referred method looks like this:
implicit def toRDD[T](rdd: JavaRDD[T]): RDD[T] = rdd.rdd
So basically it simply tries to get .rdd
field of JavaRDD
object.
Anyway, I believe it's not essential here - I've just got segfault on PipelineRDD
creation and I think I had NullPointerException
when creating SparkContext
.
from javacall.jl.
fixed by #28
from javacall.jl.
Related Issues (20)
- Ways to mitigate overall jankyness (intermittent NoClassDefFoundError and IllegalMonitorStateException) HOT 16
- Segmentation fault on JavaCall.init HOT 13
- Possible memory leak in `convert_result` HOT 4
- Use BinaryBuilder to install java?? HOT 4
- Error when loading JDK 15 x64 on Windows with Julia 1.6 RC 1 HOT 6
- Calling of java methods in a .jar file fails, but listing methods works fine. HOT 17
- TagBot trigger issue HOT 3
- Git history removed? HOT 10
- Avoiding Exceptions during automatic testing HOT 16
- Can IJulia Jupyter/Pluto run on Linux without JULIA_COPY_STACKS=1? HOT 6
- Calling java.lang.String constructor doesn't return reference to String object HOT 4
- JVM installs signal handlers by default HOT 11
- JavaCall crashes Julia 1.6.3 on macOS HOT 11
- help with jmathplot HOT 1
- jvoid missing in JavaCall v0.7.7 HOT 10
- Is 'pattern == "*.jar"' in jvm.jl a bug? HOT 3
- Allow multidimensional array inputs HOT 2
- how to set JULIA_COPY_STACKS=1 in jupyter? HOT 2
- handling of Enum types HOT 8
- Call methods of a class generated in runtime HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from javacall.jl.