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
cd /opt/indexima/galactica ./start-node.sh
cd /opt/indexima/galactica ./start-node.sh --master
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
cd /opt/indexima/galactica ./start-yarn.sh
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 -u "jdbc:hive2://10.0.0.1:10000"
Indexima has a special query SHOW MEMORY ALL that returns data about every nodes on the cluster. Execute it in beeline.
SHOW MEMORY ALL;
You can then execute this short SQL script to create a simple table and insert a few lines.
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");
If you have an Indexima license, you can then make SELECT queries on this table.
SELECT COUNT(*) FROM diag;