Package org.codehaus.mojo.cassandra
Class Utils
java.lang.Object
org.codehaus.mojo.cassandra.Utils
Utility classes for interacting with Cassandra.
- Author:
- stephenc
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidexecuteThrift(ThriftApiOperation thriftApiOperation) CallThriftApiOperation.executeOperation(Cassandra.Client)on the provided operationstatic StringApplies the glossYaml on top of the baseYaml and returns the result.protected static org.apache.commons.exec.DefaultExecuteResultHandlerstartCassandraServer(File cassandraDir, org.apache.commons.exec.CommandLine commandLine, Map environment, org.apache.maven.plugin.logging.Log log) Starts the Cassandra server.
-
Method Details
-
startCassandraServer
protected static org.apache.commons.exec.DefaultExecuteResultHandler startCassandraServer(File cassandraDir, org.apache.commons.exec.CommandLine commandLine, Map environment, org.apache.maven.plugin.logging.Log log) throws org.apache.maven.plugin.MojoExecutionException Starts the Cassandra server.- Parameters:
cassandraDir- The directory to start the Server process in.commandLine- The command line to use to start the Server process.environment- The environment to start the Server process with.log- The log to send the output to.- Returns:
- The
ExecuteResultHandlerfor the started process. - Throws:
org.apache.maven.plugin.MojoExecutionException- if something went wrong.
-
merge
Applies the glossYaml on top of the baseYaml and returns the result.- Parameters:
baseYaml- the base Yaml.glossYaml- the Yaml to overide the base with.- Returns:
- the resulting Yaml.
-
executeThrift
public static void executeThrift(ThriftApiOperation thriftApiOperation) throws org.apache.maven.plugin.MojoExecutionException CallThriftApiOperation.executeOperation(Cassandra.Client)on the provided operation- Throws:
org.apache.maven.plugin.MojoExecutionException
-