1

I am doing a project in Apache hama to implement breadth first search and am facing trouble in partitioning the input graph.can anybody suggest a method to do the same?

public static class MinIntCombiner extends Combiner<IntWritable> {

@Override
public IntWritable combine(Iterable<IntWritable> messages) {
  int visited = Integer.MAX_VALUE;

  Iterator<IntWritable> it = messages.iterator();
 // int msgValue = it.next().get();
  while (it.hasNext()== true) {

  int msgValue = it.next().get();  
    if (visited > msgValue)
      visited = msgValue;
//    msgValue = it.next().get();
  }

  return new IntWritable(visited);
}

The partitioner used here is

ssspJob.setPartitioner(HashPartitioner.class); 

As we cannot use Hashpartitioner for bfs, can anyone suggest an alternative method?

  • Your question cannot be answered with the information you gave us. Please share some code and error message. Currently your question is way to broad. – usr1234567 Mar 24 '15 at 09:59
  • is there any better partitioner than Hashpartitioner for performing bfs in hama? – hari krishnan Mar 24 '15 at 13:48

0 Answers0