Personal tools
You are here: Home Developer Reference Accessing and Configuring HSQL Databases

Accessing and Configuring HSQL Databases

To access or configure one of Kepler's HSQL databases (containing provenance, or cache information), follow these instructions.

Accessing the Databases

To connect to one of Kepler's HSQL databases use the following steps:

  1. Start the DatabaseManager:
  2. cd <kepler.modules>
    java -cp ./core/lib/jar/base-jars/hsqldb-2.3.2.jar org.hsqldb.util.DatabaseManagerSwing
  3. A dialog will pop up. You will need to enter URL and Password. The password can be found in a text file in the same directory as the HSQL database.
    1. To view the provenance database: make sure Kepler is not running, and set the URL as:
      jdbc:hsqldb:file:/yourhome/KeplerData/modules/provenance/provenanceDB

      The password for the provenance database is found in $HOME/KeplerData/modules/provenance/provenanceDB.auth.

    2. To view the Kepler cache database: if Kepler is not running, set the URL as (where X and Y are version numbers):
      jdbc:hsqldb:file:/yourhome/.kepler/cache-X.Y/cachedata/hsqldb
      If Kepler is running, set the URL as:
    3. jdbc:hsqldb:hsql://localhost:PORT/hsqldb

      The password for the cache database is found in $HOME/.kepler/cache-2.5/cachedata/hsqldb.auth.

      The port for the cache database is found in $HOME/.kepler/cache-2.5/cachedata/hsqldb.port.

    4. To view the core database: if Kepler is not running, set the URL as:
      jdbc:hsqldb:file:/yourhome/KeplerData/modules/core/coreDB
      If Kepler is running, set the URL as:
    5. jdbc:hsqldb:hsql://localhost:PORT/coreDB

      The password for the core database is found in $HOME/KeplerData/modules/core/coreDB.auth.

      The port for the core database is found in $HOME/KeplerData/modules/core/coreDB.port.

  4. Click OK. A new dialog will pop up displaying the database tables. You can also perform queries to view the data.
     

Port Numbers

After 14 April 2013, the ports used for Kepler's HSQL databases are chosen randomly. The port number used for an HSQL server is printed to the console when the server is started. Additionally, while Kepler is running, the port number can be found in a file whose name ends with ".port" in the database directory:
 
Kepler 2.5: $HOME/.kepler/cache-2.5/cachedata/hsqldb.port 
Kepler 2.4: $HOME/.kepler/cache-2.4/cachedata/hsqldb.port
$HOME/KeplerData/modules/core/coreDB.port
 
Before 14 April 2013, the ports used for HSQL are listed in the following table:
 
Kepler 2.0-2.3 Kepler 2.4-2.5
Kepler cache 9001 9005
core 9002 9006
provenance 9003 9007
workflow run manager keplerDevProvenanceDB 9004 9020
run manager keplerProvenanceDB 9005 9010

Configuring the Databases

The configuration parameters for Kepler's HSQL databases can be found in:

common/resources/configurations/configuration.xml
core/resources/configurations/configuration.xml
provenance/resources/configurations/configuration.xml

The port number for each database server can be set by modifying the value of "DB Port" in these files.

 

Configuring for a Shared Computer

Kepler 2.5 to allows multiple people to run Kepler on a shared computer. No configuration changes are necessary.

Kepler 2.4 was patched on 22 August 2013 to facilitate multiple people running Kepler on a shared computer. If you are using Kepler 2.4, upgrade the modules to receive this patch. (A dialog will appear after Kepler starts saying that patches are available.) Once you have this patch for Kepler 2.4, you do not need to use the instructions below; the default HSQL configuration permits multiple people to run Kepler on a shared computer.

For Kepler 2.3 and older versions, use the following instructions to configure HSQL for running Kepler on a shared machine: 

The HSQL databases are configured to start a database server so that multiple instances of Kepler may be run on the same computer. The first Kepler instance starts a server for each database and subsequent Kepler instances connect to these servers. However, this causes problems if the computer is shared by different people; Kepler will use the databases belonging to the first user to run Kepler.

 

The HSQL databases can be configured to directly access the database files instead of starting servers. This allows Kepler to be run on a shared computer, but prevents more than one instance of Kepler to be started by a user. 

 

In ~/KeplerData/modules/common/configuration/configuration.xml, change the following:

(If this file does not exist, use <kepler.modules>/common/resources/configurations/configuration.xml)

  <sqlEngines>
    <sqlEngine>
      <sqlEngineName>hsql</sqlEngineName>
      <userName>sa</userName>
      <password> </password>
      <url>jdbc:hsqldb:hsql://localhost/</url>
     <port>9001</port>
      <dbName>hsqldb</dbName>

To:

  <sqlEngines>
    <sqlEngine>
      <sqlEngineName>hsql</sqlEngineName>
      <userName>sa</userName>
      <password> </password>
      <url></url>
     <port></port>
      <dbName>hsqldb</dbName>
 


In ~/KeplerData/modules/core/configuration/configuration.xml, change the following:

(If this file does not exist, change <kepler.modules>/core/resources/configurations/configuration.xml)

 <coreDB>
     <!-- host name running the database -->
     <pair>
        <name>DB Host</name>
        <value>localhost</value>
     </pair>

To:

<coreDB>
     <!-- host name running the database -->
     <pair>
        <name>DB Host</name>
        <value></value>
     </pair>

 

The database configuration for provenance must also be change if the provenance module is used.

In ~/KeplerData/modules/provenance/configuration/configuration.xml, change the following:

(If this file does not exist, change <kepler.modules>/provenance/resources/configurations/configuration.xml)

<config>
    <provenance>
        <defaultSettings>
...
            <!-- host name running the database -->
            <pair>
                <name>DB Host</name>
                <value>localhost</value>
            </pair>

To:

<config>
    <provenance>
        <defaultSettings>
...
            <!-- host name running the database -->
            <pair>
                <name>DB Host</name>
                <value></value>
            </pair>
Document Actions