Skip to content

Commit

Permalink
improve
Browse files Browse the repository at this point in the history
Change-Id: I0f0d35c78d283034dc1e2a76f795bebf01db4807
  • Loading branch information
zhoney committed Jul 3, 2020
1 parent 663fff0 commit 815534b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 39 deletions.
38 changes: 0 additions & 38 deletions src/main/java/com/baidu/hugegraph/structure/Task.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,8 @@

package com.baidu.hugegraph.structure;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

import com.baidu.hugegraph.util.E;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.ImmutableSet;

Expand Down Expand Up @@ -144,41 +141,6 @@ public boolean success() {
return "success".equals(this.status);
}

public Map<String, Object> asMap() {
E.checkState(this.name != null, "Task name can't be null");

Map<String, Object> map = new HashMap<>();

map.put(P.ID, this.id);
map.put(P.TYPE, this.type);
map.put(P.NAME, this.name);
map.put(P.CALLABLE, this.callable);
map.put(P.STATUS, this.status);
map.put(P.PROGRESS, this.progress);
map.put(P.CREATE, this.create);
map.put(P.RETRIES, this.retries);
if (this.description != null) {
map.put(P.DESCRIPTION, this.description);
}
if (this.update != 0) {
map.put(P.UPDATE, this.update);
}
if (this.input != null) {
map.put(P.INPUT, this.input);
}
if (this.result != null) {
map.put(P.RESULT, this.result);
}
if (this.dependencies != null) {
map.put(P.DEPENDENCIES, this.dependencies);
}
if (this.server != null) {
map.put(P.SERVER, this.server);
}

return map;
}

@Override
public String toString() {
return String.format("Task(id=%s)", this.id);
Expand Down
1 change: 0 additions & 1 deletion src/test/java/com/baidu/hugegraph/functional/EdgeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,6 @@ public void testIterateEdgesByVertexId() {
Assert.assertEquals("Can't query by paging and filtering",
e.getMessage());
});

}

private static void assertContains(List<Edge> edges, Object source,
Expand Down

0 comments on commit 815534b

Please sign in to comment.