开发者

Adjacency List structure in HBase

I'm trying to implement the following graph reduction algorithm in

  • The graph is an undirected weighted graph
  • I want to strip away all nodes with only two neighbors
  • and update the weights

Have a look at the following illustration:

Algorithm reduce graph http://public.kungi.org/graph-reduction.png

The algorithm shall transform the upper graph in开发者_StackOverflowto the lower one. Eliminate node 2 and update the weight of the edge to: w(1-3) = w(1-2)+w(2-3)

Since I have a very large graph I'm doing this with MapReduce.

My Question is how to represent the graph in HBase. I thought about building an adjacency list structure in HBase like this:

Column families: nodes, neighbors 1 -> 2, 6, 7 ...

Is there a nicer way to do this?


Adjacency lists are the most frequently recommended structure.

You could use each node ID as the row ID and neighbor IDs as column qualifiers, with the weights as values.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜