-
Notifications
You must be signed in to change notification settings - Fork 45
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
adapt for dynamically add/remove graph (#3) #138
Conversation
// NOTE: Must provide id for PUT. If use "graph/mode", "/" will | ||
// be encoded to "%2F". So use "mode" here although inaccurate. | ||
this.client.put(path, "mode", mode); | ||
this.client.put(joinPath(this.path(), graph), MODE, mode); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can add joinPath(path, graph, action) method: joinPath(this.path(), graph, MODE),
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PUT method must have id
, MODE is id
, should not treated as path
params = ImmutableMap.of("clone_graph_name", cloneGraphName); | ||
} | ||
RestResult result = this.client.post(joinPath(this.path(), name), | ||
config, headers, params); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's behavior if config=null (means just clone without special config)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will occur exception because same store or rocksdb data path
ci error: Started 1h 36m 7s ago
Can't find any online and idle self-hosted runner in the current repository, account/organization that matches the required labels: 'ubuntu-16.04'
Waiting for a self-hosted runner to pickup this job... |
backend=rocksdb | ||
serializer=binary | ||
|
||
store=hugegraph3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can only keep required options in this file:
store=hugegraph3
rocksdb.data_path=./hg3
rocksdb.wal_path=./hg3
363b840
to
0dc4fd6
Compare
HTTPS_SERVER_DIR="hugegraph_https"
mkdir ${HTTPS_SERVER_DIR}
cp -r hugegraph-*/. ${HTTPS_SERVER_DIR}
cd "$(find hugegraph-* | head -1)"
cp ../$TRAVIS_DIR/conf/* conf
cp: -r not specified; omitting directory '../assembly/travis/conf/graphs'
hugegraph-0.12.0/lib/high-scale-lib-1.0.6.jar
hugegraph-0.12.0/lib/gson-2.8.6.jar |
34ca5d4
to
713dfe7
Compare
HTTP_SERVER_DIR=$(find hugegraph-* | head -1)
hugegraph-0.12.0/conf/rest-server.properties
hugegraph-0.12.0/conf/hugegraph-community.license
hugegraph-0.12.0/conf/remote-objects.yaml
hugegraph-0.12.0/conf/gremlin-server.yaml
hugegraph-0.12.0/conf/remote.yaml
hugegraph-0.12.0/conf/log4j2.xml
hugegraph-0.12.0/conf/hugegraph-server.keystore
hugegraph-0.12.0/conf/computer.yaml
find: ‘standard output’: Broken pipe
find: write error
HTTPS_SERVER_DIR="hugegraph_https"
mkdir "${HTTPS_SERVER_DIR}"
cp -r "${HTTP_SERVER_DIR}"/. "${HTTPS_SERVER_DIR}"
cd "${HTTP_SERVER_DIR}"
cp -r ../"${TRAVIS_DIR}"/conf/. conf
# start HugeGraphServer with http protocol
echo -e "pa" | bin/init-store.sh || exit 1
Initializing HugeGraph Store...
2021-12-24 17:42:13 [main] [INFO] c.b.h.u.ConfigUtil - Scaning graphs configuration directory assembly/travis/conf/graphs
Error: Exception in thread "main" java.lang.IllegalArgumentException: Please ensure the graphs config directory 'assembly/travis/conf/graphs' exist and indeed a directory
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:163)
at com.baidu.hugegraph.util.E.checkArgument(E.java:56)
at com.baidu.hugegraph.util.ConfigUtil.scanGraphsDir(ConfigUtil.java:72)
at com.baidu.hugegraph.cmd.InitStore.main(InitStore.java:76)
Initialization finished.
bin/start-hugegraph.sh || exit 1
Starting HugeGraphServer...
Connecting to HugeGraphServer (http://127.0.0.1:8080/graphs)..Starting HugeGraphServer failed
See /home/runner/work/hugegraph-client/hugegraph-client/hugegraph-0.12.0/logs/hugegraph-server.log for HugeGraphServer log output.
Error: Process completed with exit code 1. |
fb5953c
to
f8c0ac5
Compare
Tests run: 418, Failures: 1, Errors: 84, Skipped: 0, Time elapsed: 256.898 sec <<< FAILURE!
testCreateAndDropGraph(com.baidu.hugegraph.api.GraphsApiTest) Time elapsed: 0.189 sec <<< ERROR!
class com.baidu.hugegraph.HugeException: Failed to update/query server info: java.util.concurrent.ExecutionException: java.lang.IllegalStateException: Missing authentication context when verifying resource permission
at com.baidu.hugegraph.exception.ServerException.fromResponse(ServerException.java:47)
at com.baidu.hugegraph.client.RestClient.checkStatus(RestClient.java:93)
at com.baidu.hugegraph.rest.AbstractRestClient.post(AbstractRestClient.java:231)
at com.baidu.hugegraph.api.graphs.GraphsAPI.create(GraphsAPI.java:68)
at com.baidu.hugegraph.api.GraphsApiTest.testCreateAndDropGraph(GraphsApiTest.java:63) |
39139ad
to
4792d80
Compare
Tests in error:
testCloneAndDropGraph(com.baidu.hugegraph.api.GraphsApiTest): Not support Graph.configuration()
testCreateAndDropGraph(com.baidu.hugegraph.api.GraphsApiTest): Not support Graph.configuration()
Tests run: 373, Failures: 0, Errors: 2, Skipped: 0 |
4792d80
to
b42211a
Compare
@@ -17,7 +17,7 @@ jobs: | |||
runs-on: ubuntu-20.04 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also update client version to 2.0.1
6d955eb
to
de59eae
Compare
Codecov Report
@@ Coverage Diff @@
## master #138 +/- ##
============================================
+ Coverage 77.18% 77.33% +0.14%
- Complexity 947 956 +9
============================================
Files 154 154
Lines 4042 4064 +22
Branches 241 242 +1
============================================
+ Hits 3120 3143 +23
+ Misses 743 742 -1
Partials 179 179
Continue to review full report at Codecov.
|
de59eae
to
faaa2ac
Compare
faaa2ac
to
6c87219
Compare
Change-Id: I005fba5a131f55820dbd1d702eb5ef812acd132f