You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hama.apache.org by 步青云 <ma...@qq.com> on 2016/02/07 09:54:11 UTC

Could hama start next computation after all vertexes vote to halt?

Hi,     I want to use hama to run a job, which is consist of two phase.  
    The first phase try to find proper neighbors. The vertex execute voteToHalt() method when it doesn't receive any message. When all vertexes vote to halt, the first phase finished.
    Then the second phase starts based on the result of the first phase. The output of the first phase is the input of the first phase.
    Now I use two hama tasks to finish these two phase. While I think it's unnecessary to output the result and then read it. I want to finish these two phase in one hama task. How could I do this?
Best Regards, Ping Liu.

Re: Could hama start next computation after all vertexes vote to halt?

Posted by 步青云 <ma...@qq.com>.
Thank you for your reply. How do you think about this scene, there is a big graph while not all vertices are useful and is necessary for computing. We want to prune some verteices and then to compute accurately. (Pruning and Verifying). The pruning job finished when there is no messages and inactivated vertices. Then we must output the result of pruning job and then read it in verifying job. It takes many time for pointless reading and writing. 
Now I use the code as follow to solve this problem. I set the stepsBeforeNext and then run next job.
        if(getSuperstepCount() < stepsBeforeNext){
	    	…… 
    	} else {

              ……
        }
But I don't think it's a good idea. 






------------------ Original ------------------
From:  "Edward J. Yoon";<ed...@apache.org>;
Send time: Sunday, Feb 14, 2016 3:52 AM
To: "user@hama.apache.org"<us...@hama.apache.org>; 

Subject:  Re: Could hama start next computation after all vertexes vote to halt?



Sorry for late reply. I'm not sure but it's impossible with current
APIs. Basically no messages and inactivated vertices are job
termination condition by default.

If there's a clear example that shows how combining two jobs into one
is useful, we can consider to add it as a new feature.

Thanks!


On Sun, Feb 7, 2016 at 5:54 PM, 步青云 <ma...@qq.com> wrote:
> Hi,     I want to use hama to run a job, which is consist of two phase.
>     The first phase try to find proper neighbors. The vertex execute voteToHalt() method when it doesn't receive any message. When all vertexes vote to halt, the first phase finished.
>     Then the second phase starts based on the result of the first phase. The output of the first phase is the input of the first phase.
>     Now I use two hama tasks to finish these two phase. While I think it's unnecessary to output the result and then read it. I want to finish these two phase in one hama task. How could I do this?
> Best Regards, Ping Liu.



-- 
Best Regards, Edward J. Yoon

Re: Could hama start next computation after all vertexes vote to halt?

Posted by "Edward J. Yoon" <ed...@apache.org>.
Sorry for late reply. I'm not sure but it's impossible with current
APIs. Basically no messages and inactivated vertices are job
termination condition by default.

If there's a clear example that shows how combining two jobs into one
is useful, we can consider to add it as a new feature.

Thanks!


On Sun, Feb 7, 2016 at 5:54 PM, 步青云 <ma...@qq.com> wrote:
> Hi,     I want to use hama to run a job, which is consist of two phase.
>     The first phase try to find proper neighbors. The vertex execute voteToHalt() method when it doesn't receive any message. When all vertexes vote to halt, the first phase finished.
>     Then the second phase starts based on the result of the first phase. The output of the first phase is the input of the first phase.
>     Now I use two hama tasks to finish these two phase. While I think it's unnecessary to output the result and then read it. I want to finish these two phase in one hama task. How could I do this?
> Best Regards, Ping Liu.



-- 
Best Regards, Edward J. Yoon