fix hugegraph-example/Example checkstyle issue by mayelena · Pull Request #1838 · apache/hugegraph
mayelena
changed the title
Bugfix branch
fix hugegraph-example/Example checkstyle issue
| assert size == 12; | ||
| System.out.println(">>>> query all vertices: size=" + size); | ||
| LOG.info(">>>> query all vertices: size=" + size); | ||
|
|
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can use [LOG.info(">>>> query all vertices: size {}",size);]
| assert size == 12; | ||
| LOG.info(">>>> query all vertices: size=" + size); | ||
| LOG.info(">>>> query all vertices: size=", size); | ||
|
|
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need use [LOG.info(">>>> query all vertices: size {}",size);]
| vertexList = vertices.toList(); | ||
| assert vertexList.size() == 1; | ||
| LOG.info(String.format(">>>> query all authors lived %s: %s", | ||
| LOG.info(String.format(">>>> query all authors lived {}: {}", |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to remove "String.format(" here
| List<Vertex> vertexList = vertices.toList(); | ||
| assert vertexList.size() == 1; | ||
| System.out.println(">>>> query vertices by primary-values: " + | ||
| LOG.info(">>>> query vertices by primary-values: {}", |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please update alignment of the next line
| edgeList = edgesOfVertex.toList(); | ||
| assert edgeList.size() == 2; | ||
| System.out.println(">>>> query edges of vertex by sort-values: " + | ||
| LOG.info(">>>> query edges of vertex by sort-values: " + |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
| Iterator<Edge> edges2 = graph.edges(q); | ||
| assert edges2.hasNext(); | ||
| System.out.println(">>>> queryEdges(id-condition): " + | ||
| LOG.info(">>>> queryEdges(id-condition): {}", |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
| edges2.hasNext()); | ||
| while (edges2.hasNext()) { | ||
| System.out.println(">>>> queryEdges(id-condition): " + | ||
| LOG.info(">>>> queryEdges(id-condition): {}", |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
| Iterator<Edge> edges3 = graph.edges(q); | ||
| assert edges3.hasNext(); | ||
| System.out.println(">>>> queryEdges(contribution): " + | ||
| LOG.info(">>>> queryEdges(contribution): {}", |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
| edges3.hasNext()); | ||
| while (edges3.hasNext()) { | ||
| System.out.println(">>>> queryEdges(contribution): " + | ||
| LOG.info(">>>> queryEdges(contribution): {}", |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
|
|
||
| List<Edge> edges = g.E().toList(); | ||
| System.out.println(">>>> query all edges: size=" + | ||
| LOG.info(">>>> query all edges: size=" + |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
|
|
||
| GraphTraversal<Vertex, Vertex> vertices = g.V(); | ||
| System.out.println(">>>> query all vertices: size=" + | ||
| LOG.info(">>>> query all vertices: size=" + |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we also use "... size={}" style?
| List<Object> names = g.V().inE("knows").limit(2) | ||
| .outV().values("name").toList(); | ||
| System.out.println(">>>> query vertex(with props) of edges: " + names); | ||
| LOG.info(">>>> query vertex(with props) of edges: " + names); |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we also use "{}" style?
| assert vertexList.size() == 1; | ||
| LOG.info(">>>> query vertices by primary-values: {}", | ||
| vertexList); | ||
| LOG.info(">>>> query vertices by primary-values: {}",vertexList); |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expect a space after ","
| LOG.info(String.format(">>>> query all authors lived {}: {}", | ||
| addr, vertexList)); | ||
| } | ||
|
|
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use LOG.info(">>>> query all authors lived {}: {}",addr, vertexList);
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters