Package org.codehaus.mojo.cassandra
Class Utils
- java.lang.Object
-
- org.codehaus.mojo.cassandra.Utils
-
public final class Utils extends Object
Utility classes for interacting with Cassandra.- Author:
- stephenc
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidexecuteCql(CqlOperation cqlOperation)CallCqlOperation.executeOperation(CqlSession)on the provided operationstatic Stringmerge(String baseYaml, String glossYaml)Applies 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 Detail
-
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
public static String merge(String baseYaml, String glossYaml)
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.
-
executeCql
public static void executeCql(CqlOperation cqlOperation) throws org.apache.maven.plugin.MojoExecutionException
CallCqlOperation.executeOperation(CqlSession)on the provided operation- Throws:
org.apache.maven.plugin.MojoExecutionException
-
-