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:
The algorithm shall transform the upper graph into 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?