Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix hugegraph-hbase and hugegraph-example checkstyle issue #1864

Merged
merged 26 commits into from
May 9, 2022
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
0464dae
remove unused import
mayelena Apr 15, 2022
e3132c4
Merge branch 'master' into bugfix-branch
mayelena Apr 19, 2022
89af87d
fix hugegraph-example/Example checkstyle issue
mayelena Apr 20, 2022
7b6cc42
fix hugegraph-example/Example checkstyle issue
mayelena Apr 20, 2022
1d92f44
fix hugegraph-example/Example checkstyle issue
mayelena Apr 20, 2022
38fbfdc
fix hugegraph-example/Example checkstyle issue
mayelena Apr 20, 2022
e908a2d
Empty
imbajin Apr 20, 2022
947c4da
fix hugegraph-example/Example checkstyle issue
mayelena Apr 21, 2022
6b6a6d1
fix hugegraph-example/Example checkstyle issue
mayelena Apr 22, 2022
60312f1
Merge branch 'bugfix-branch' of https://github.com/mayelena/hugegraph…
mayelena Apr 22, 2022
d9fefb4
fix hugegraph-example/Example checkstyle issue
mayelena Apr 22, 2022
1ee50e3
Merge branch 'master' into bugfix-branch
mayelena Apr 25, 2022
7dc7fb5
Merge branch 'master' into bugfix-branch
mayelena May 7, 2022
9283d39
fix hugegraph-hbase checkstyle issue
mayelena May 7, 2022
9fdad02
fix hugegraph-hbase checkstyle issue
mayelena May 7, 2022
656f94b
fix hugegraph-hbase and hugegraph-example checkstyle issue
mayelena May 7, 2022
614f864
fix hugegraph-hbase and hugegraph-example checkstyle issue
mayelena May 7, 2022
c75dede
fix hugegraph-hbase and hugegraph-example checkstyle issue
mayelena May 7, 2022
d998fa3
fix hugegraph-hbase and hugegraph-example checkstyle issue
mayelena May 7, 2022
d05f20b
fix hugegraph-hbase and hugegraph-example checkstyle issue
mayelena May 7, 2022
2bb799b
fix hugegraph-hbase and hugegraph-example checkstyle issue
mayelena May 7, 2022
15c00f0
fix hugegraph-hbase and hugegraph-example checkstyle issue
mayelena May 7, 2022
c03bcb8
fix hugegraph-hbase and hugegraph-example checkstyle issue
mayelena May 8, 2022
2cae00a
fix hugegraph-hbase and hugegraph-example checkstyle issue
mayelena May 8, 2022
adee7e2
fix hugegraph-hbase and hugegraph-example checkstyle issue
mayelena May 9, 2022
3b171c3
fix hugegraph-hbase and hugegraph-example checkstyle issue
mayelena May 9, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -82,44 +82,44 @@ public static void loadNeighborRankData(final HugeGraph graph) {

graph.tx().open();

Vertex O = graph.addVertex(T.label, "person", T.id, "O", "name", "O");
Vertex o = graph.addVertex(T.label, "person", T.id, "O", "name", "O");

Vertex A = graph.addVertex(T.label, "person", T.id, "A", "name", "A");
Vertex B = graph.addVertex(T.label, "person", T.id, "B", "name", "B");
Vertex C = graph.addVertex(T.label, "person", T.id, "C", "name", "C");
Vertex D = graph.addVertex(T.label, "person", T.id, "D", "name", "D");
Vertex a = graph.addVertex(T.label, "person", T.id, "A", "name", "A");
Vertex b = graph.addVertex(T.label, "person", T.id, "B", "name", "B");
Vertex c = graph.addVertex(T.label, "person", T.id, "C", "name", "C");
Vertex d = graph.addVertex(T.label, "person", T.id, "D", "name", "D");

Vertex E = graph.addVertex(T.label, "movie", T.id, "E", "name", "E");
Vertex F = graph.addVertex(T.label, "movie", T.id, "F", "name", "F");
Vertex G = graph.addVertex(T.label, "movie", T.id, "G", "name", "G");
Vertex H = graph.addVertex(T.label, "movie", T.id, "H", "name", "H");
Vertex I = graph.addVertex(T.label, "movie", T.id, "I", "name", "I");
Vertex J = graph.addVertex(T.label, "movie", T.id, "J", "name", "J");
Vertex e = graph.addVertex(T.label, "movie", T.id, "E", "name", "E");
Vertex f = graph.addVertex(T.label, "movie", T.id, "F", "name", "F");
Vertex g = graph.addVertex(T.label, "movie", T.id, "G", "name", "G");
Vertex h = graph.addVertex(T.label, "movie", T.id, "H", "name", "H");
Vertex i = graph.addVertex(T.label, "movie", T.id, "I", "name", "I");
Vertex j = graph.addVertex(T.label, "movie", T.id, "J", "name", "J");

Vertex K = graph.addVertex(T.label, "person", T.id, "K", "name", "K");
Vertex L = graph.addVertex(T.label, "person", T.id, "L", "name", "L");
Vertex M = graph.addVertex(T.label, "person", T.id, "M", "name", "M");
Vertex k = graph.addVertex(T.label, "person", T.id, "K", "name", "K");
Vertex l = graph.addVertex(T.label, "person", T.id, "L", "name", "L");
Vertex m = graph.addVertex(T.label, "person", T.id, "M", "name", "M");

O.addEdge("follow", A);
O.addEdge("follow", B);
O.addEdge("follow", C);
D.addEdge("follow", O);
o.addEdge("follow", a);
o.addEdge("follow", b);
o.addEdge("follow", c);
d.addEdge("follow", o);

A.addEdge("follow", B);
A.addEdge("like", E);
A.addEdge("like", F);
a.addEdge("follow", b);
a.addEdge("like", e);
a.addEdge("like", f);

B.addEdge("like", G);
B.addEdge("like", H);
b.addEdge("like", g);
b.addEdge("like", h);

C.addEdge("like", I);
C.addEdge("like", J);
c.addEdge("like", i);
c.addEdge("like", j);

E.addEdge("directedBy", K);
F.addEdge("directedBy", B);
F.addEdge("directedBy", L);
e.addEdge("directedBy", k);
f.addEdge("directedBy", b);
f.addEdge("directedBy", l);

G.addEdge("directedBy", M);
g.addEdge("directedBy", m);

graph.tx().commit();
}
Expand Down Expand Up @@ -149,25 +149,25 @@ public static void loadPersonalRankData(final HugeGraph graph) {

graph.tx().open();

Vertex A = graph.addVertex(T.label, "person", T.id, "A", "name", "A");
Vertex B = graph.addVertex(T.label, "person", T.id, "B", "name", "B");
Vertex C = graph.addVertex(T.label, "person", T.id, "C", "name", "C");
Vertex aPerson = graph.addVertex(T.label, "person", T.id, "A", "name", "A");
Vertex bPerson = graph.addVertex(T.label, "person", T.id, "B", "name", "B");
Vertex cPerson = graph.addVertex(T.label, "person", T.id, "C", "name", "C");

Vertex a = graph.addVertex(T.label, "movie", T.id, "a", "name", "a");
Vertex b = graph.addVertex(T.label, "movie", T.id, "b", "name", "b");
Vertex c = graph.addVertex(T.label, "movie", T.id, "c", "name", "c");
Vertex d = graph.addVertex(T.label, "movie", T.id, "d", "name", "d");

A.addEdge("like", a);
A.addEdge("like", c);
aPerson.addEdge("like", a);
aPerson.addEdge("like", c);

B.addEdge("like", a);
B.addEdge("like", b);
B.addEdge("like", c);
B.addEdge("like", d);
bPerson.addEdge("like", a);
bPerson.addEdge("like", b);
bPerson.addEdge("like", c);
bPerson.addEdge("like", d);

C.addEdge("like", c);
C.addEdge("like", d);
cPerson.addEdge("like", c);
cPerson.addEdge("like", d);

graph.tx().commit();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import java.io.File;
import java.util.Iterator;
import java.util.concurrent.TimeoutException;
import org.slf4j.Logger;

import com.baidu.hugegraph.HugeException;
import com.baidu.hugegraph.HugeFactory;
Expand All @@ -32,8 +33,10 @@
import com.baidu.hugegraph.task.HugeTask;
import com.baidu.hugegraph.task.TaskScheduler;
import com.baidu.hugegraph.type.define.NodeRole;
import com.baidu.hugegraph.util.Log;

public class ExampleUtil {
private static final Logger LOG = Log.logger(ExampleUtil.class);

private static boolean registered = false;

Expand Down Expand Up @@ -71,6 +74,7 @@ public static HugeGraph loadGraph(boolean needClear, boolean needProfile) {
conf = path;
}
} catch (Exception ignored) {
LOG.warn("loadGraph warn {} ",ignored);
}

HugeGraph graph = HugeFactory.open(conf);
Expand Down
Loading