We will now start the Indexima engine, and make our first Hive queries on it with Beeline to test that everything runs properly.

Start Indexima for Standalone Deployment

On the worker node, cd into the install directory, and execute the start-node.sh script with no additional parameters. In our current example, this will be

Worker Node

cd /opt/indexima/galactica
./start-node.sh
BASH

Master Node

cd /opt/indexima/galactica
./start-node.sh --master
BASH

The script never detach from the terminal. You can optionally start it with nohup if you want to run it in the background.

On the master node, do the same thing but add --master parameter to the script.

Start Indexima for Yarn Deployment

On the edge node where everything was installed and configure, cd into the install directory and execute the start-yarn.sh script

YARN

cd /opt/indexima/galactica
./start-yarn.sh
BASH

Execute queries

You can use any SQL tool to connect to the cluster and make Hive queries. In our example, we will use beeline.

You can connect with this command

Beeline

beeline -u "jdbc:hive2://10.0.0.1:10000"
BASH

Indexima has a special query SHOW MEMORY ALL that returns data about every nodes on the cluster. Execute it in beeline.

Show memory

SHOW MEMORY ALL;
SQL

You can then execute this short SQL script to create a simple table and insert a few lines.

Validation

DROP TABLE IF EXISTS diag;
CREATE TABLE diag ( col1 INT, col2 STRING, INDEX (Col1));
INSERT INTO TABLE diag VALUES (1,"row1"),(2,"row2"),(3,"row3"),(4,"row4"),(5,"row5");
INSERT INTO TABLE diag VALUES (6,"row6"),(7,"row7"),(8,"row8"),(9,"row9"),(10,"row10");
INSERT INTO TABLE diag VALUES (11,"row11"),(12,"row12"),(13,"row13"),(14,"row14"),(15,"row15");
INSERT INTO TABLE diag VALUES (16,"row16"),(17,"row17"),(18,"row18"),(19,"row19"),(20,"row20");
SQL

If you have an Indexima license, you can then make SELECT queries on this table.

Select

SELECT COUNT(*) FROM diag;
SQL