-
Notifications
You must be signed in to change notification settings - Fork 526
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
fix: error when start gremlin-console with sample script #2231
Conversation
…in `example.groovy` fix apache#2228
graph = HugeFactory.open(conf); | ||
schema = graph.schema(); | ||
graph = HugeFactory.open(conf) | ||
graph.serverStarted(IdGenerator.of("server-tinkerpop"), NodeRole.MASTER) |
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.
@zyxxoo we must start server with the node-role now?
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.
Now, If it is started in a way that requires verification, then this is no longer needed. However, it’s okay to set it up. If verification is not required, then it still needs to be set up
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.
verification mean config
auth.authenticator= org.apache.hugegraph.auth.StandardAuthenticator
@@ -113,7 +113,7 @@ if [ -z "${HADOOP_GREMLIN_LIBS:-}" ]; then | |||
fi | |||
|
|||
if [ -z "${JAVA_OPTIONS:-}" ]; then | |||
JAVA_OPTIONS="-Dtinkerpop.ext=$EXT -Dlog4j.configuration=conf/log4j-console.properties -Dgremlin.log4j.level=$GREMLIN_LOG_LEVEL -javaagent:$LIB/jamm-0.3.0.jar" | |||
JAVA_OPTIONS="-Dtinkerpop.ext=$EXT -Dlog4j.configurationFile=conf/log4j2.xml -Dgremlin.log4j.level=$GREMLIN_LOG_LEVEL -javaagent:$LIB/jamm-0.3.0.jar" | |||
fi |
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.
could also echo(print)the options if need(or helpful)
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.
@imbajin If set -l TRACE
or -l DEBUG
, it will print out the actual running command with options.
./bin/gremlin-console.sh -l DEBUG -- -i scripts/example.groovy
Codecov Report
@@ Coverage Diff @@
## master #2231 +/- ##
============================================
+ Coverage 65.06% 68.47% +3.41%
+ Complexity 979 977 -2
============================================
Files 498 498
Lines 40681 40681
Branches 5681 5681
============================================
+ Hits 26468 27856 +1388
+ Misses 11584 10114 -1470
- Partials 2629 2711 +82 see 67 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
038f91c
to
ce6f0b5
Compare
import org.apache.hugegraph.dist.RegisterUtil | ||
import org.apache.hugegraph.type.define.NodeRole |
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.
tiny question: I didn't import this line before and it seems to work too, weird
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.
I guess that some classes have been imported after plugin activated: HugeGraph
.
> ./bin/gremlin-console.sh
\,,,/
(o o)
-----oOOo-(3)-oOOo-----
plugin activated: HugeGraph
plugin activated: tinkerpop.server
plugin activated: tinkerpop.utilities
plugin activated: tinkerpop.tinkergraph
gremlin> NodeRole
==>class org.apache.hugegraph.type.define.NodeRole
LGTM |
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.
+1
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.
Doc is also on the way, thanks for the improvement 👍🏻
Purpose of the PR
Main Changes
hugegraph-dist/src/assembly/static/bin/gremlin-console.sh
hugegraph-dist/src/assembly/static/scripts/example.groovy
graph.serverStarted
to set the scheduler information[name]
After modification, user should use the following command to start gremlin-console with sample script:
Currently,
example.groovy
can serve multiple purposes. The modification toexample.groovy
mentioned above is to adapt to the scenario where Gremlin-Console is started. If HugeGraphServer is started using scripts or IDEA, the initialization part ofexample.groovy
should be:Verifying these changes
Does this PR potentially affect the following parts?
Documentation Status
Doc - TODO
Doc - Done
Doc - NO Need