Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -241,7 +241,7 @@ public String update(@Context GraphManager manager,
boolean append = checkAndParseAction(action);

HugeGraph g = graph(manager, graph);
HugeEdge edge = (HugeEdge) g.edges(id).next();
HugeEdge edge = (HugeEdge) g.edge(id);
EdgeLabel edgeLabel = edge.schemaLabel();

for (String key : jsonEdge.properties.keySet()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public String update(@Context GraphManager manager,
boolean append = checkAndParseAction(action);

HugeGraph g = graph(manager, graph);
HugeVertex vertex = (HugeVertex) g.vertices(id).next();
HugeVertex vertex = (HugeVertex) g.vertex(id);
VertexLabel vertexLabel = vertex.schemaLabel();

for (String key : jsonVertex.properties.keySet()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,16 @@ public class StandardHugeGraph implements HugeGraph {
StandardHugeGraph.SysTransaction.class
};

public static final Set<ConfigOption> ALLOWED_CONFIGS = ImmutableSet.of(
CoreOptions.TASK_WAIT_TIMEOUT,
CoreOptions.TASK_SYNC_DELETION,
CoreOptions.TASK_TTL_DELETE_BATCH,
CoreOptions.TASK_INPUT_SIZE_LIMIT,
CoreOptions.TASK_RESULT_SIZE_LIMIT,
CoreOptions.OLTP_CONCURRENT_THREADS,
CoreOptions.OLTP_CONCURRENT_DEPTH,
CoreOptions.VERTEX_DEFAULT_LABEL,
CoreOptions.VERTEX_ENCODE_PK_NUMBER
public static final Set<ConfigOption<?>> ALLOWED_CONFIGS = ImmutableSet.of(
CoreOptions.TASK_WAIT_TIMEOUT,
CoreOptions.TASK_SYNC_DELETION,
CoreOptions.TASK_TTL_DELETE_BATCH,
CoreOptions.TASK_INPUT_SIZE_LIMIT,
CoreOptions.TASK_RESULT_SIZE_LIMIT,
CoreOptions.OLTP_CONCURRENT_THREADS,
CoreOptions.OLTP_CONCURRENT_DEPTH,
CoreOptions.VERTEX_DEFAULT_LABEL,
CoreOptions.VERTEX_ENCODE_PK_NUMBER
);

private static final Logger LOG = Log.logger(HugeGraph.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import com.baidu.hugegraph.backend.id.Id;
import com.baidu.hugegraph.backend.id.IdGenerator;
import com.baidu.hugegraph.backend.tx.SchemaTransaction;
import com.baidu.hugegraph.config.CoreOptions;
import com.baidu.hugegraph.exception.ExistedException;
import com.baidu.hugegraph.schema.EdgeLabel;
import com.baidu.hugegraph.schema.IndexLabel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
import com.baidu.hugegraph.type.define.Directions;
import com.baidu.hugegraph.util.E;

import static com.baidu.hugegraph.traversal.algorithm.HugeTraverser.Path.EMPTY_PATH;

public class MultiNodeShortestPathTraverser extends OltpTraverser {

public MultiNodeShortestPathTraverser(HugeGraph graph) {
Expand Down Expand Up @@ -82,7 +80,7 @@ public List<Path> multiNodeShortestPathConcurrent(List<Pair<Id, Id>> pairs,
this.traversePairs(pairs.iterator(), pair -> {
Path path = traverser.shortestPath(pair.getLeft(), pair.getRight(),
step, maxDepth, capacity);
if (!EMPTY_PATH.equals(path)) {
if (!Path.EMPTY_PATH.equals(path)) {
results.add(path);
}
});
Expand All @@ -99,7 +97,7 @@ public List<Path> multiNodeShortestPathSingle(List<Pair<Id, Id>> pairs,
for (Pair<Id, Id> pair : pairs) {
Path path = traverser.shortestPath(pair.getLeft(), pair.getRight(),
step, maxDepth, capacity);
if (!EMPTY_PATH.equals(path)) {
if (!Path.EMPTY_PATH.equals(path)) {
results.add(path);
}
}
Expand All @@ -109,7 +107,7 @@ public List<Path> multiNodeShortestPathSingle(List<Pair<Id, Id>> pairs,
private static <T> void cmn(List<T> all, int m, int n, int current,
List<T> result, Consumer<List<T>> consumer) {
assert m <= all.size();
assert current < all.size();
assert current <= all.size();
if (result == null) {
result = new ArrayList<>(n);
}
Expand Down