Page tree
Skip to end of metadata
Go to start of metadata

A Jethro instance consists an entire database, including all 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).

This chapter provides instructions for performing the following operations:

  • Creating an Instance 
  • Attaching and Detaching an Instance
  • Deleting an Instance

Creating an Instance

To create a new, empty instance, run the command JethroAdmin create-instance along with the following parameters:

  • An instance name of your choice ("demo" in the following example).
  • The instance storage path - an HDFS storage path; an HDFS directory owned by user jethro, a Local storage path, or shared storage.
  • 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..
  • When using a local storage path, an extra parameter is required: -Dstorage.type=POSIX

The syntax of the basic command is:

# Basic command:
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/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}

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 >
  • No labels