Skip to content

Commit c1da411

Browse files
refactor(loader): adjust LoadContext to 1.7.0 version
1 parent 8a936a2 commit c1da411

File tree

2 files changed

+8
-5
lines changed
  • hugegraph-loader/src

2 files changed

+8
-5
lines changed

hugegraph-loader/src/main/java/org/apache/hugegraph/loader/executor/LoadContext.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,9 @@ public void updateSchemaCache() {
157157

158158
public void setLoadingMode() {
159159
String graph = this.client.graph().graph();
160+
String graphSpace = this.client.graph().graphSpace();
160161
try {
161-
this.client.graphs().mode(graph, GraphMode.LOADING);
162+
this.client.graphs().mode(graphSpace, graph, GraphMode.LOADING);
162163
} catch (ServerException e) {
163164
if (e.getMessage().contains("Can not deserialize value of type")) {
164165
LOG.warn("HugeGraphServer doesn't support loading mode");
@@ -170,8 +171,9 @@ public void setLoadingMode() {
170171

171172
public void setRestoreMode() {
172173
String graph = this.client.graph().graph();
174+
String graphSpace = this.client.graph().graphSpace();
173175
try {
174-
this.client.graphs().mode(graph, GraphMode.RESTORING);
176+
this.client.graphs().mode(graphSpace, graph, GraphMode.RESTORING);
175177
} catch (ServerException e) {
176178
if (e.getMessage().contains("Can not deserialize value of type")) {
177179
LOG.warn("HugeGraphServer doesn't support loading mode");
@@ -184,9 +186,10 @@ public void setRestoreMode() {
184186
public void unsetLoadingMode() {
185187
try {
186188
String graph = this.client.graph().graph();
187-
GraphMode mode = this.client.graphs().mode(graph);
189+
String graphSpace = this.client.graph().graphSpace();
190+
GraphMode mode = this.client.graphs().mode(graphSpace, graph);
188191
if (mode.loading()) {
189-
this.client.graphs().mode(graph, GraphMode.NONE);
192+
this.client.graphs().mode(graphSpace, graph, GraphMode.NONE);
190193
}
191194
} catch (Exception e) {
192195
throw new LoadException("Failed to unset mode %s for server",

hugegraph-loader/src/test/java/org/apache/hugegraph/loader/test/functional/LoadTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public static void authmain(String[] args) {
151151
list.add("--username");
152152
list.add("admin");
153153
list.add("--password");
154-
list.add("admin");
154+
list.add("pa");
155155
args = (String[]) list.toArray(new String[list.size()]);
156156

157157
HugeGraphLoader.main(args);

0 commit comments

Comments
 (0)