VertexUpdateFunction

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

VertexUpdateFunction

rostami
Hi,

I want to write an iterative algorithm using Gelly (spargel), like:

https://ci.apache.org/projects/flink/flink-docs-release-0.8/spargel_guide.html

My question is how I can access the actual vertex information like the  
vertex degree (in- or outdegree)
under the subclass of VertexUpdateFunction. A way is maybe to send an  
instance of graph to the constructor.
However, getting the degree for a vertex in each instance of this  
subclass would be really inefficient.

Thanks,
Ali

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: VertexUpdateFunction

Martin Junghanns-2
Hi Ali :)

You could compute the degrees beforehand (e.g. using the
Graph.[in|out|get]degrees()) methods and use the resulting dataset as a
new vertex dataset. You can now run your vertex-centric computation and
access the degrees as vertex value.

Cheers,

Martin


On 29.05.2017 09:28, [hidden email] wrote:

> Hi,
>
> I want to write an iterative algorithm using Gelly (spargel), like:
>
> https://ci.apache.org/projects/flink/flink-docs-release-0.8/spargel_guide.html 
>
>
> My question is how I can access the actual vertex information like the
> vertex degree (in- or outdegree)
> under the subclass of VertexUpdateFunction. A way is maybe to send an
> instance of graph to the constructor.
> However, getting the degree for a vertex in each instance of this
> subclass would be really inefficient.
>
> Thanks,
> Ali
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: VertexUpdateFunction

rostami
Hi Martin,

thanks for your answer..
For the vertex degree, I passed a map (vertex_id -> degree) to the  
constructor.

Regards,
Ali

Zitat von Martin Junghanns <[hidden email]>:

> Hi Ali :)
>
> You could compute the degrees beforehand (e.g. using the  
> Graph.[in|out|get]degrees()) methods and use the resulting dataset  
> as a new vertex dataset. You can now run your vertex-centric  
> computation and access the degrees as vertex value.
>
> Cheers,
>
> Martin
>
>
> On 29.05.2017 09:28, [hidden email] wrote:
>> Hi,
>>
>> I want to write an iterative algorithm using Gelly (spargel), like:
>>
>> https://ci.apache.org/projects/flink/flink-docs-release-0.8/spargel_guide.html My question is how I can access the actual vertex information like the vertex degree (in- or  
>> outdegree)
>> under the subclass of VertexUpdateFunction. A way is maybe to send  
>> an instance of graph to the constructor.
>> However, getting the degree for a vertex in each instance of this  
>> subclass would be really inefficient.
>>
>> Thanks,
>> Ali
>>



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: VertexUpdateFunction

Martin Junghanns-2
Hi Ali,

If you're talking about a Java Map and the constructor of your compute
function, then your implementation is not really scalable.

Cheers,

Martin


On 31.05.2017 14:19, [hidden email] wrote:

> Hi Martin,
>
> thanks for your answer..
> For the vertex degree, I passed a map (vertex_id -> degree) to the
> constructor.
>
> Regards,
> Ali
>
> Zitat von Martin Junghanns <[hidden email]>:
>
>> Hi Ali :)
>>
>> You could compute the degrees beforehand (e.g. using the
>> Graph.[in|out|get]degrees()) methods and use the resulting dataset as
>> a new vertex dataset. You can now run your vertex-centric computation
>> and access the degrees as vertex value.
>>
>> Cheers,
>>
>> Martin
>>
>>
>> On 29.05.2017 09:28, [hidden email] wrote:
>>> Hi,
>>>
>>> I want to write an iterative algorithm using Gelly (spargel), like:
>>>
>>> https://ci.apache.org/projects/flink/flink-docs-release-0.8/spargel_guide.html 
>>> My question is how I can access the actual vertex information like
>>> the vertex degree (in- or outdegree)
>>> under the subclass of VertexUpdateFunction. A way is maybe to send
>>> an instance of graph to the constructor.
>>> However, getting the degree for a vertex in each instance of this
>>> subclass would be really inefficient.
>>>
>>> Thanks,
>>> Ali
>>>
>
>
>

Loading...