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
160 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 by Gitika
• 25,420 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
• 25,420 points
100 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
• 25,420 points
94 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 20 in Big Data Hadoop by Gitika
• 25,420 points
206 views
0 votes
1 answer
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
• 10,800 points
3,576 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
• 10,800 points
454 views
+1 vote
11 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyFr ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
18,430 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
• 25,420 points
71 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
• 25,420 points
37 views