In my program I need to call the java class of "maprcli" to do something like :
maprcli dump volumeinfo.
Can someone point to me where can I find this class on the maven repository and how to use it?
The dependency for maprcli is
<dependency> <groupId>com.mapr.cli</groupId> <artifactId>maprcli</artifactId> <version>5.2.0-mapr</version></dependency>
But this is not a Java public API, why not using the REST API?
As you can see at the bottom of this page you have the endpoint information, that looks like:
Thanks. The reason I do not want to use rest api is because it needs me to provide mapr user credentials: username, password, which i do not want to provide. So I want to try to call this class to do some command execution to get volume information.
I download this jar from mapr's maven repo.
Could you give me an example of java code about how to use the related class to execute "dump volumeinfo" commands?
Thanks and regards,
I do not have any sample, and I do not "want" to provide any, as mentioned, it is an internal API and should not be used directly. I will log a Enhancement Request to create an open API in Java for this.
For the moment I invite your to create a "generic application user" in MCS with some restricted permission and use the REST API.
Can you run a shell command from java app and parse the result?
Retrieving data ...