HiveDB install process updated

By britt

posted in: documentation, howto

When we began we wanted creating and loading a hive to be as simple as calling Hive.load. So we made the install process part of the load method. However, over time this was unsettling for several reasons.

  • It makes the load method complicated.
    We love simplicity. When things get to complicated errors start to creep in.
  • Its a side-effect.
    Methods should do what they say they’re going to and no more.

So, we’ve done away the implicit install and created a HiveInstaller. The installer exists as both a class and a command line tool.

To use the installer in code:

HiveInstaller installer = new HiveInstaller("jdbc:connection:uri");
installer.run();

The command line tool is compiled into the HiveDB jar. Now when you run mvn package or mvn install, two jars are created: hivedb.jar, hivedb-jar-with-dependencies.jar. hivedb-jar-with-dependencies.jar contains has all of the dependencies that HiveDB needs to run baked right in. It also is executable, and runs the hive installer.

To use the command line installer:

java -jar hivedb-jar-with-dependencies.jar -host -db -user -pw

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*