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值的变化