[ 
https://issues.apache.org/jira/browse/GIRAPH-591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gianmarco De Francisci Morales resolved GIRAPH-591.
---------------------------------------------------

    Resolution: Invalid
      Assignee: Gianmarco De Francisci Morales

My bad, I was not choosing the right master compute class.
                
> Compute called before initialize in ComputeCallable.computePartition?
> ---------------------------------------------------------------------
>
>                 Key: GIRAPH-591
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-591
>             Project: Giraph
>          Issue Type: Bug
>            Reporter: Gianmarco De Francisci Morales
>            Assignee: Gianmarco De Francisci Morales
>
> Hi,
> I get the following exception when I try to run my vertex
> {code}
> java.lang.NullPointerException at 
> org.apache.giraph.examples.RandomWalkVertex.getDanglingProbability(RandomWalkVertex.java:90)
>  at 
> org.apache.giraph.examples.RandomWalkWithRestartVertex.recompute(RandomWalkWithRestartVertex.java:72)
>  at 
> org.apache.giraph.examples.RandomWalkVertex.compute(RandomWalkVertex.java:100)
>  at 
> org.apache.giraph.graph.ComputeCallable.computePartition(ComputeCallable.java:222)
>  at org.apache.giraph.graph.ComputeCallable.call(ComputeCallable.java:156) at 
> org.apache.giraph.graph.ComputeCallable.call(ComputeCallable.java:69) at 
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at 
> java.util.concurrent.FutureTask.run(FutureTask.java:166) at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>  at java.lang.Thread.run(Thread.java:722) 
> {code}
> The code is the following:
> {code}
>   protected double getDanglingProbability() {
>     return this.<DoubleWritable>getAggregatedValue(
>         RandomWalkVertex.CUMULATIVE_DANGLING_PROBABILITY).get();
>   }
> {code}
> From which I infer that the aggregator has not been initialized. However, the 
> initialize method is as follows:
> {code}
>     public void initialize() throws InstantiationException,
>         IllegalAccessException {
>       registerAggregator(RandomWalkVertex.CUMULATIVE_DANGLING_PROBABILITY,
>           DoubleSumAggregator.class);
>       registerAggregator(RandomWalkVertex.L1_NORM_OF_PROBABILITY_DIFFERENCE,
>           DoubleSumAggregator.class);
>     }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to