HI,
I am getting null pointer exception when i am executing the triplet loop
inside another triplet loop
works fine below :
for (mainTriplet <- mainGraph.triplets) {
println(mainTriplet.dstAttr.name)
}
works fine below :
for (subTriplet <- subGrapgh.triplets) {
println(subTriplet .dstAttr.name)
}
Below is the causing issue :
1. for (subTriplet <- subGrapgh.triplets) {
2. println(subTriplet .dstAttr.name)
3. for (mainTriplet <- mainGraph.triplets) {
4. println(mainTriplet.dstAttr.name)
// here i want to do operation like
subTriplet.dstAttr.name.toString.equals(mainTriplet.dstAttr.name)
6.}
7.}
line number 2 prints only one time and getting below error immediately
ERROR Executor: Exception in task 0.0 in stage 10.0 (TID 10)
java.lang.NullPointerException
at
org.apache.spark.graphx.impl.GraphImpl.triplets$lzycompute(GraphImpl.scala:50)
at org.apache.spark.graphx.impl.GraphImpl.triplets(GraphImpl.scala:49)
Please help and let me know if anything required in my explanation
--
View this message in context:
http://apache-spark-user-list.1001560.n3.nabble.com/Graphx-triplet-loops-causing-null-pointer-exception-tp28195.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe e-mail: [email protected]