A sample code of what I am doing is attached
Pregel pregel = graphFrame.pregel();
pregel.setCheckpointInterval(0);
pregel.setMaxIter(1);
Column initialCondition = when(col("Hieght").isNull(), lit(0)).otherwise(lit(1));
pregel.withVertexColumn(
"NewHieght",
initialCondition,
col("newDummyColumn").plus(Pregel.msg()));
pregel.sendMsgToDst(lit(1));
pregel.aggMsgs(last(Pregel.msg()));
Dataset<Row> run = pregel.run();
The output of above is as follows :
1.Value of NewHieght is 2 for each row where Hieght is not null ( Working Correctly )
2.Value of NewHieght must be 1 for each row where Hieght is null ( I am getting null in NewHieght)