Chapter 2. Introduction to Oracle KVLite

Table of Contents

Starting KVLite
Stopping and Restarting KVLite
Verifying the Installation
kvlite Utility Command Line Parameter Options

KVLite is a single-node, single shard store. It usually runs in a single process and is used to develop and test client applications. KVLite is installed when you install Oracle NoSQL Database.

Note

KVLite supports only non-authenticated access to the store. That is, you cannot configure KVLite such that your code can authenticate, or log in, to it. If you are developing code for a store that requires authentication, then you must install a test store that is configured for authentication access in the same way as your production store.

Using the authentication APIs is described in Using the Authentication APIs. For information on configuring a store to require authentication, see the Oracle NoSQL Database Security Guide.

Starting KVLite

You start KVLite by using the kvlite utility, which can be found in KVHOME/lib/kvstore.jar. If you use this utility without any command line options, then KVLite will run with the following default values:

  • The store name is kvstore.

  • The hostname is the local machine.

  • The registry port is 5000.

  • The directory where Oracle NoSQL Database data is placed (known as KVROOT) is ./kvroot.

  • The administration process is turned on using port 5001.

This means that any processes that you want to communicate with KVLite can only connect to it on the local host (127.0.0.1) using port 5000. If you want to communicate with KVLite from some machine other than the local machine, then you must start it using non-default values. The command line options are described later in this chapter.

For example:

> java -Xmx256m -Xms256m -jar KVHOME/lib/kvstore.jar kvlite

Note

To avoid using too much heap space, you should specify -Xmx and -Xms flags for Java when running administrative and utility commands.

When KVLite has started successfully, it issues one of two statements to stdout, depending on whether it created a new store or is opening an existing store:

Created new kvlite store with args:
-root ./kvroot -store <kvstore name> -host <localhost> -port 5000 
-admin 5001 

or

Opened existing kvlite store with config:
-root ./kvroot -store <kvstore name> -host <localhost> -port 5000 
-admin 5001 

where <kvstore name> is the name of the store and <localhost> is the name of the local host. It takes about 10 - 60 seconds before this message is issued, depending on the speed of your machine.

Note that you will not get the command line prompt back until you stop KVLite.