Hazelcast access using CLI
Andrii,
You can take advantage of Hazelcast demo application. You can find here:
com.hazelcast.console.ConsoleApp
member console, part ofhazelcast*.jar
. See GHcom.hazelcast.client.console.ClientConsoleApp
client console, part ofhazelcast-client*.jar
. See GH
You can modify server.sh
to run member / client in CLI mode
java -server $JAVA_OPTS com.hazelcast.console.ConsoleApp
or
java -server $JAVA_OPTS com.hazelcast.client.console.ClientConsoleApp
Let me know if you have any questions. Thank you
Thanks to Viktor Gamov I have found the way to see the data from CLI with provided com.hazelcast.client.console.ClientConsoleApp
that is part of hazelcast*.jar
.
Here is the small summary how to connect to existing instance using client:
- Modify
clientConsole.sh
(that is located under<hazelcast installation>/demo
) script (or create new one if you want) and the line in it have to be like that:java -Djava.net.preferIPv4Stack=true -cp .:../lib/hazelcast-all-<version>.jar com.hazelcast.client.console.ClientConsoleApp
- Put your config file to the same directory with your script (possibly
<hazelcast installation>/demo
) - Your config file should have the name exactly
hazelcast-client.xml
and may be look like the following:
<hazelcast-client xmlns="http://www.hazelcast.com/schema/client-config">
<group>
<name>dev</name>
<password>dev-pass</password>
</group>
<network>
<cluster-members>
<address>localhost:5701</address>
</cluster-members>
</network>
</hazelcast-client>