Github user gallenvara commented on a diff in the pull request: https://github.com/apache/flink/pull/1956#discussion_r64056167 --- Diff: flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/HITSAlgorithm.java --- @@ -243,18 +255,22 @@ public void sendMessages(Vertex<K, Tuple2<DoubleValue, DoubleValue>> vertex) { iterationValueSum = Math.sqrt(((DoubleValue) getPreviousIterationAggregate("updatedValueSum")).getValue()); } for (Edge<K, EV> edge : getEdges()) { - K messageSource = getSuperstepNumber() % 2 == 1 ? edge.getSource() : edge.getTarget(); - K messageTarget = getSuperstepNumber() % 2 == 1 ? edge.getTarget() : edge.getSource(); - double messageValue = getSuperstepNumber() % 2 == 1 ? vertex.getValue().f0.getValue() : vertex.getValue().f1.getValue(); - - if (!messageTarget.equals(vertex.getId())) { - if (getSuperstepNumber() != maxIteration) { - sendMessageTo(messageTarget, messageValue / iterationValueSum); - - // in order to make every vertex updated - sendMessageTo(messageSource, 0.0); + if (getSuperstepNumber() != maxIteration) { + if (getSuperstepNumber() % 2 == 1) { + if (edge.getValue().equals("Authority")) { + sendMessageTo(edge.getTarget(), vertex.getValue().f0.getValue() / iterationValueSum); + } } else { - sendMessageTo(messageSource, iterationValueSum); + if (edge.getValue().equals("Hub")) { + sendMessageTo(edge.getTarget(), vertex.getValue().f1.getValue() / iterationValueSum); + } + } + + // make all the vertices be updated + sendMessageTo(edge.getSource(), 0.0); --- End diff -- Fixed with rebasing the previous commit.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---