pagerank计算结果问题

Spark-2.4.3
NebulaGraph-3.2.1
NebulaGraph Spark Connector-3.0.0
NebulaGraph Algorithm-3.0.0
部署方式:单机

在计算pagerank时,数据默认选择第三列(边的_rank值)作为权重列,同时hsaweight参数设置为true时,两次计算的pr值没有任何变化,这个是什么原因呢?
1、第一次rank值

+------------------+------------------+------+--------+---------+------------------+------------------+--------+
|            _srcId|            _dstId| _rank|    name|direction|            edgeId|           graphId|edgeType|
+------------------+------------------+------+--------+---------+------------------+------------------+--------+
|508317857643536384|508563381382586368|106204|装备|   SINGLE|508591917363404800|508317304972681216|  ENTITY|
|508636852330471424|508334070729842688|106206|    研制|   SINGLE|508636969804537856|508317304972681216|  ENTITY|
|508567792813121536|508317857643536384|106205|    研制|   SINGLE|508636533223628800|508317304972681216|  ENTITY|
|508644383278800896|508334070729842688|106210|    试用|   SINGLE|508644446084308992|508317304972681216|  ENTITY|
+------------------+------------------+------+--------+---------+------------------+------------------+--------+

结果:

+------------------+------------------+
|               _id|          pagerank|
+------------------+------------------+
|508636852330471424|0.9060022650056625|
|508334070729842688|1.1778029445073612|
|508567792813121536|0.9060022650056625|
|508644383278800896|0.9060022650056625|
|508563381382586368|1.0622876557191394|
|508317857643536384| 1.041902604756512|
+------------------+------------------+

2、第一次rank值

+------------------+------------------+-----+--------+---------+------------------+------------------+--------+
|            _srcId|            _dstId|_rank|    name|direction|            edgeId|           graphId|edgeType|
+------------------+------------------+-----+--------+---------+------------------+------------------+--------+
|508317857643536384|508563381382586368|   10|装备|   SINGLE|508591917363404800|508317304972681216|  ENTITY|
|508636852330471424|508334070729842688|   10|    研制|   SINGLE|508636969804537856|508317304972681216|  ENTITY|
|508567792813121536|508317857643536384|   10|    研制|   SINGLE|508636533223628800|508317304972681216|  ENTITY|
|508644383278800896|508334070729842688|   10|    试用|   SINGLE|508644446084308992|508317304972681216|  ENTITY|
+------------------+------------------+-----+--------+---------+------------------+------------------+--------+

结果:

+------------------+------------------+
|               _id|          pagerank|
+------------------+------------------+
|508636852330471424|0.9060022650056625|
|508334070729842688|1.1778029445073612|
|508567792813121536|0.9060022650056625|
|508644383278800896|0.9060022650056625|
|508563381382586368|1.0622876557191394|
|508317857643536384| 1.041902604756512|
+------------------+------------------+

可以看到两次rank值的变化,并没有引起pr值的变化

你差异整大点试试

±-----------------±-----------------±----±-------+
| _srcId| _dstId|_rank|edgeType|
±-----------------±-----------------±----±-------+
|508317857643536384|508563381382586368| 1| ENTITY|
|508636852330471424|508334070729842688| 4120| ENTITY|
|508567792813121536|508317857643536384| 4| ENTITY|
|508644383278800896|508334070729842688| 5241| ENTITY|
±-----------------±-----------------±----±-------+

刚试了,一样的结果
±-----------------±-----------------+
| _id| pagerank|
±-----------------±-----------------+
|508636852330471424|0.9060022650056625|
|508334070729842688|1.1778029445073612|
|508567792813121536|0.9060022650056625|
|508644383278800896|0.9060022650056625|
|508563381382586368|1.0622876557191394|
|508317857643536384| 1.041902604756512|
±-----------------±-----------------+

补充:
通过代码和直接提交任务效果一致,rank值的变化并不会使得pr发生变化。

NebulaGraph Algorithm是不是不支持自定义边的权重大小以供图计算啊,

当前读取nebula的数据中有_rank这一列数据,我想使得_rank作为我的权重数据,但是我发现
org.apache.spark.graphx.lib.PageRank 源码中对于pagerank的初始化压根没有用到这个rank值啊
image

是我理解的有问题么?还望赐教 :joy:

此话题已在最后回复的 30 天后被自动关闭。不再允许新回复。