Redriver created TINKERPOP-2837:
-----------------------------------
Summary: Thread-safe problem when using
Collections.synchronizedMap in ImmutableMetrics
Key: TINKERPOP-2837
URL: https://issues.apache.org/jira/browse/TINKERPOP-2837
Project: TinkerPop
Issue Type: Bug
Components: language
Affects Versions: 3.5.4
Reporter: Redriver
When I run the profile() in SparkGraphComputer, I got NPE:
g.V().hasLabel('Account').has('Source', 10).has('AccountId',
'1000017194').as('sourceAccount').match(
__.as('sourceAccount').outE().inV().hasLabel('phone').as('node1'),
__.as('sourceAccount').outE().inV().hasLabel('name').as('node2'),
__.as('node1').inE().outV().hasLabel('Account').as('targetAccount'),
__.as('targetAccount').outE().inV().as('node2'), where('targetAccount',
neq('sourceAccount'))).select('targetAccount').valueMap().profile()
22/12/07 02:21:00.980 dag-scheduler-event-loop ERROR DAGScheduler: Failed to
update accumulator 17 (org.apache.spark.util.LegacyAccumulatorWrapper) for task
188
java.lang.NullPointerException
at java.util.Collections$SynchronizedMap.entrySet(Collections.java:2613)
at
org.apache.tinkerpop.gremlin.process.traversal.util.MutableMetrics.aggregate(MutableMetrics.java:139)
at
org.apache.tinkerpop.gremlin.process.traversal.step.util.ProfileStep$ProfileBiOperator.apply(ProfileStep.java:136)
at
org.apache.tinkerpop.gremlin.process.traversal.step.util.ProfileStep$ProfileBiOperator.apply(ProfileStep.java:130)
at
org.apache.tinkerpop.gremlin.spark.process.computer.MemoryAccumulator.addAccumulator(MemoryAccumulator.java:43)
at
org.apache.tinkerpop.gremlin.spark.process.computer.MemoryAccumulator.addInPlace(MemoryAccumulator.java:48)
at
org.apache.tinkerpop.gremlin.spark.process.computer.MemoryAccumulator.addInPlace(MemoryAccumulator.java:29)
at
org.apache.spark.util.LegacyAccumulatorWrapper.merge(AccumulatorV2.scala:512)
at
org.apache.spark.scheduler.DAGScheduler$$anonfun$updateAccumulators$1.apply(DAGScheduler.scala:1255)
at
org.apache.spark.scheduler.DAGScheduler$$anonfun$updateAccumulators$1.apply(DAGScheduler.scala:1246)
at
scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
at
org.apache.spark.scheduler.DAGScheduler.updateAccumulators(DAGScheduler.scala:1246)
at
org.apache.spark.scheduler.DAGScheduler.handleTaskCompletion(DAGScheduler.scala:1341)
at
org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.doOnReceive(DAGScheduler.scala:2105)
at
org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.onReceive(DAGScheduler.scala:2057)
at
org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.onReceive(DAGScheduler.scala:2046)
at org.apache.spark.util.EventLoop$$anon$1.run(EventLoop.scala:49)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)