You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You could submit the entire spark application or invoke algorithms in `lib` library to apply graph algorithms for DataFrame.
@@ -41,8 +42,6 @@ You could submit the entire spark application or invoke algorithms in `lib` libr
41
42
42
43
## Use Nebula Algorithm
43
44
44
-
Limitation: Due to Nebula Algorithm will not encode string id, thus during the algorithm execution, the source and target of edges must be in Type Int (The `vid_type` in Nebula Space could be String, while data must be in Type Int).
45
-
46
45
* Option 1: Submit nebula-algorithm package
47
46
48
47
* Configuration
@@ -55,6 +54,10 @@ Limitation: Due to Nebula Algorithm will not encode string id, thus during the a
Due to Nebula Algorithm jar does not encode string id, thus during the algorithm execution, the source and target of edges must be in Type Int (The `vid_type` in Nebula Space could be String, while data must be in Type Int).
60
+
58
61
* Option2: Call nebula-algorithm interface
59
62
60
63
Now there are 10 algorithms provided in `lib` from `nebula-algorithm`, which could be invoked in a programming fashion as below:
@@ -78,8 +81,9 @@ Limitation: Due to Nebula Algorithm will not encode string id, thus during the a
78
81
val prResult = PageRankAlgo.apply(spark, data, prConfig, false)
79
82
```
80
83
81
-
For other algorithms, please refer to [test cases](https://github.com/vesoft-inc/nebula-algorithm/tree/master/nebula-algorithm/src/test/scala/com/vesoft/nebula/algorithm/lib).
82
-
84
+
If your vertex ids are Strings, see [Pagerank Example](https://github.com/vesoft-inc/nebula-algorithm/blob/master/example/src/main/scala/com/vesoft/nebula/algorithm/PageRankExample.scala) for how to encoding and decoding them.
85
+
86
+
For examples of other algorithms, see [examples](https://github.com/vesoft-inc/nebula-algorithm/tree/master/example/src/main/scala/com/vesoft/nebula/algorithm)
83
87
> Note: The first column of DataFrame in the application represents the source vertices, the second represents the target vertices and the third represents edges' weight.
84
88
85
89
## Version match
@@ -88,7 +92,7 @@ Limitation: Due to Nebula Algorithm will not encode string id, thus during the a
0 commit comments