How to use Hbase shell in a bash script?

0 votes
Can anyone provide small example how to use HBase Shell in a Bash script?
May 29 in Big Data Hadoop by Nishan
14 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Hello,

To write scripts with HBase shell it includes non-interactive mode, this mode allows you to use HBase Shell in scripts, and allow the script to access the exit status of the HBase Shell commands. To invoke non-interactive mode, use the switch:

-n or --non-interactive 

This small example script shows how to use HBase Shell in a Bash script.

!/bin/bash
echo 'list' | hbase shell -n
status=$?
if [$status -ne 0]; then
  echo "The command may have failed."

 

answered May 29 by Gitika
• 15,910 points

Related Questions In Big Data Hadoop

0 votes
1 answer

How to Modify the Maximum Number of Versions for a Column Family in Hbase?

Hey, The example uses HBase Shell to keep ...READ MORE

answered May 31 in Big Data Hadoop by Gitika
• 15,910 points
13 views
0 votes
1 answer

How to Create a table with region replication in Hbase?

Hi, Region replication is a per-table property. All ...READ MORE

answered May 31 in Big Data Hadoop by Gitika
• 15,910 points
15 views
0 votes
1 answer

How to delete a column family from table in HBase?

Hey, You can delete a column family from ...READ MORE

answered 4 days ago in Big Data Hadoop by Gitika
• 15,910 points
11 views
0 votes
1 answer

How to check the directory is present in shell script or not?

Hi, To check the directory is present in ...READ MORE

answered 13 hours ago in Big Data Hadoop by Gitika
• 15,910 points
10 views
0 votes
1 answer
0 votes
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 9,570 points
1,866 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 9,570 points
164 views
0 votes
10 answers

hadoop fs -put command?

copy command can be used to copy files ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Sujay
9,305 views
0 votes
1 answer

How to kill a Backup Master in HBase?

Hey, To kill a backup master, you need ...READ MORE

answered May 23 in Big Data Hadoop by Gitika
• 15,910 points
15 views
0 votes
1 answer

How to create a Table using HBase shell ?

Hey, You can create a table using the create command, ...READ MORE

answered May 23 in Big Data Hadoop by Gitika
• 15,910 points
11 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.