~bigdata-dev/charms/trusty/apache-hbase/trunk

« back to all changes in this revision

Viewing changes to scripts/hbase_test.sh

  • Committer: amir sanjar
  • Date: 2015-08-11 05:51:48 UTC
  • Revision ID: amir.sanjar@canonical.com-20150811055148-qf6sfsj44qzv814k
add external zookeeper support

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/bash
2
2
 
 
3
echo "create '$1', 'cf'" > hbase_table.txt
 
4
echo "list '$1'" >> hbase_table.txt
 
5
echo "put '$1', 'row1', 'cf:a', 'value1'" >> hbase_table.txt
 
6
echo "put '$1', 'row2', 'cf:b', 'value2'" >> hbase_table.txt
 
7
echo "put '$1', 'row3', 'cf:c', 'value3'" >> hbase_table.txt
 
8
echo "put '$1', 'row4', 'cf:d', 'value4'" >> hbase_table.txt
 
9
echo "scan '$1'" >> hbase_table.txt
 
10
echo "get '$1', 'row1'" >> hbase_table.txt
 
11
echo "disable '$1'" >> hbase_table.txt
 
12
echo "enable '$1'" >> hbase_table.txt
 
13
echo "exit;" >> hbase_table.txt
 
14
 
 
15
hbase shell hbase_table.txt
 
16
 
 
17
echo "describe '$1'" | hbase shell -n > /dev/null 2>&1
 
18
status=$?
 
19
echo "The status was " $status
 
20
if [ $status == 0 ]
 
21
then
 
22
    echo "The command succeeded"
 
23
else
 
24
    echo "The command may have failed."
 
25
fi
3
26