Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Problem 7 . Basics for Pig, Hive, and HBase (HBase) Previously, in Hadoop, we us

ID: 3712251 • Letter: P

Question

Problem 7. Basics for Pig, Hive, and HBase

(HBase) Previously, in Hadoop, we used “start-dfs.sh” and “start-yarn.sh” commands to start HDFS and YARN services. In HBase, what is the command to start HBase service?

Answer:

$

This file is in which directory?

Answer:

After we start the HBase service, we can start the HBase shell. Please provide the command to start the HBase shell?

Answer:

$

Suppose we already have a table “workers”. The workers’ information has been put into this table. Rob wants to view all the information. Which command should Rob type in the shell in order to see all the workers’ information in the table “workers”?

Answer:

$

If we program a “CountWorkers.java” source code file for using HBase to count the workers, how should we run this HBase program? Rob figures out we need to first compile it into a runnable “CountWorkers.jar” file. Then what is the command to run this “CountWorkers.jar” file?

Answer:

$

Explanation / Answer

1. To start the HBase service
su -l $HBASE_USER -c "/usr/lib/hbase/bin/hbase-daemon.sh --config /etc/hbase/conf start master"

The file directory is in

c "/usr/lib/hbase/bin/

To access the HBase shell you will have to navigate to HBase home folder

cd /usr/localhost/
cd Hbase

and then to start use the following command

./bin/hbase shell

HBase workers = get_table workers

hadoop jar <HBase Jar file path>/hbase-*.jar<CountWorkers.jar>