Class Utils


  • public final class Utils
    extends Object
    Utility classes for interacting with Cassandra.
    Author:
    stephenc
    • 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 ExecuteResultHandler for 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
        Call CqlOperation.executeOperation(CqlSession) on the provided operation
        Throws:
        org.apache.maven.plugin.MojoExecutionException