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, 2019 in Big Data Hadoop by Nishan
2,759 views

1 answer to this question.

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, 2019 by Gitika
• 65,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, 2019 in Big Data Hadoop by Gitika
• 65,910 points
3,020 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 Jun 1, 2019 in Big Data Hadoop by Gitika
• 65,910 points
1,570 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 Jun 21, 2019 in Big Data Hadoop by Gitika
• 65,910 points
4,010 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 Jun 25, 2019 in Big Data Hadoop by Gitika
• 65,910 points
504 views
0 votes
1 answer
+1 vote
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
• 11,380 points
10,617 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
• 11,380 points
2,214 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
104,890 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, 2019 in Big Data Hadoop by Gitika
• 65,910 points
1,001 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, 2019 in Big Data Hadoop by Gitika
• 65,910 points
803 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP