Handling Jethro Instances

A Jethro instance comprises a set of tables, data, indexes, and metadata. The instance is stored on a chosen type of storage, either shared (such as HDFS or EFS) or local (POSIX).
An instance can be attached to a server, but can also be detached and reattached later (by the same server or another).

Creating an Instance

To create a new, empty instance, run the command:

JethroAdmin create-instance

Provide the following parameters:

  1. An instance name of your choice (demo in the following example).
  2. The instance storage path An HDFS storage path; an HDFS directory owned by user jethro, a Local storage path, or shared storage.
  3. Local caching parameters – A local root path and maximum size for the cache directory. When using local disk for storage, there is no need for local cache. In this case, set the local cache size to 0G..
  4. When using a local storage path, an extra parameter is required: -Dstorage.type=POSIX
#The syntax of the basic command is:
JethroAdmin create-instance < instance-name > -storage-path=<storage-path>-cache-path=<cache-path>-cache-size=<cache-size>[-Dstorage.type=POSIX]
#To create a local instance, run:
JethroAdmin create-instance demo -storage-path=/user/jethro/instances -cache-path=/mnt/jethro_local_cache -cache-size=0G -Dstorage.type=POSIX 
#To create an HDFS instance, run:
JethroAdmin create-instance demo -storage-path=/jethro/instances -cache-path=/mnt/jethro_local_cache-cache-size=80G

Attaching and Detaching an Instance

Instances can be attached to/detached from a server. When using a shared storage, they can (and most probably will) be attached to multiple servers.
To attach an existing instance, run:

JethroAdmin attach-instance { instance-name } -storage-path={storage-path} -cache-path={cache-path} -cache-size=80G [-Dstorage.type=POSIX] 


All attached instances are registered in file /opt/jethro/instances/services.ini.


To detach an instance from a server, run:

JethroAdmin detach-instance { instance-name }

Deleting an Instance

To remove an instance and all its data and metadata, run:

JethroAdmin delete-instance < instance-name >

Please note this is an interactive command. You will be required to approve this action again by typing 'yes' after excecuting it.

Listing Instances

Instances in Jethro do not have to be attached to any server at any time, and they may be attached to one or more servers at a time.
You can view the list of Jethro instances by using either of the following methods:

  • By server: While Jethro server may be attached with serveral instances, the typical case would be attachment with a single instance.
    To view the list of locally attached instances, run:

    JethroAdmin list-instances
  • By storage: If Instances in Jethro are attached to more than one server at a time, it is possible that when a user works on one server of Jethro, the other server may be unaware of this instance. Therefore, to view a list of instances by storage, based on the storage path, run:

    JethroAdmin list-storage-instances -storage-path=[storage-root-path]
    -Dstorage.type=[HDFS|POSIX] 
    EFor example:
    JethroAdmin list-storage-instances -storage-path=/home/jethro/instances -Dstorage.type=POSIX

Configuring the Automatic Start of Instance Services

All instances attached to a specific server are registered in the file /opt/jethro/instances/services.ini.
To add/remove an instance from the auto start configurations of a server service:

  1. Edit the file /opt/jethro/instances/services.ini.
  2. Modify the relevant parameter.