Screen-2BShot-2B2015-06-30-2Bat-2B10.20.42-2BPM

How to add a user in Mac OS using Terminal

Here I will show you the steps to add a user in the Mac OS using Terminal / Command Prompt in simple steps. 1) Open up the terminal window. 2) Create a user by using command: dscl . create /Users/hadoop If you get error like: <main> attribute status: eDSPermissionError <dscl_cmd> DS Error: -14120 (eDSPermissionError) Just […]

How to install Apache Flume 1.6.0 on MacOS

Here we will see in simple steps how to install Apache Flume 1.6.0 version on MacOS. The installation of Apache Flume is very easy. Below are the steps defined: 1) Download apache flume from the site. https://flume.apache.org/download.html 2) Extract the tar file by using command tar -xvf Documents/flume/apache-flume-1.6.0-bin where Documents/flume is the directory where I […]

Screen-2BShot-2B2015-06-14-2Bat-2B7.13.29-2BPM

Cassandra Hello World Example

Below article will show the example to connect to the Cassandra using Java Driver. 1) Create a Maven project in Eclipse IDE. 2) Click on Next button 3) Select Maven Archetype. For this one I have chosen maven-archetype-quickstart and click on Next button. Provide GroupID and ArtifactID and click on Finish button. 5) Add Cassandra […]

How to perform CRUD opearation on Cassandra using CQLSH

This article will show the useful commands to perform CRUD operation on Cassandra using CQLSH. 1) Insert the data Syntax is: insert into <TABLE_NAME>(COLUMN1, COLUMN2) values (VALUES1, VALUES2); The table structure to insert the data is: CREATE TABLE cassandrademo.users ( user_id int PRIMARY KEY, user_email text, user_name text, user_pwd text ) Use the following command […]

How to truncate a table in Cassandra using CQLSH

Syntax for truncating a table/columnfamily is : TRUNCATE <TABLE_NAME | COLUMN_FAMILY_NAME> Using this command will delete all the rows from the table/columnfamily. Let’s say the data in our table is: select * from users; Output: user_id | user_email | user_name | user_pwd ———+————–+———–+———- 1 | aa@gmail.com | user1 | pwd1 To truncate all the data […]

How to alter a table in Cassandra using CQLSH

Syntax for altering table/columnfamily is: ALTER TABLE <TABLENAME> <OPEARTION> or ALTER COLUMNFAMILY <TABLENAME> <OPEARTION> Below example is given for adding a column in the table. alter table cassandrademo.users add user_phone text; Verify the table structure by using: describe table users; Output: CREATE TABLE cassandrademo.users ( user_id int PRIMARY KEY, user_email text, user_name text, user_phone text, […]