Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

One of the advantages of Bigtop is the ease of installation of the different Hadoop Components without having to hunt for a specific Hadoop Component distribution and matching it with a specific Hadoop version.

Running Pig

  1. Install Pig
    No Format
    
    sudo apt-get install pig
    
  2. Create a tab delimited file using a text editor and import it into HDFS. Start the pig shell and verify a load and dump work. Make sure you have a space on both sides of the = sign. The statement using PigStorage('\t') tells Pig the columns in the text file are delimited using tabs.
    No Format
    
    $pig
    grunt>A = load '/pigdata/PIGTESTA.txt' using PigStorage('\t');
    grunt>dump A
    

Running HBase

  1. Install HBase
    No Format
    
    sudo apt-get install hbase\*
    
  2. For bigtop-0.2.0 uncomment and set JAVA_HOME in /etc/hbase/conf/hbase-env.sh
  3. For bigtop-0.3.0 this shouldn't be necessary because JAVA_HOME is auto detected
    No Format
    sudo service hbase-master start
    hbase shell
    
  4. Test the HBase shell by creating a HBase table named t1 with 3 columns f1, f2 and f3. Verify the table exists in HBase
    No Format
    create 't1','f1','f2','f3'
    list
    
    you should see a verification from HBase the table t1 exists, the symbol t1 which is the table name should appear under list

...

No Format
# This is for bigtop-0.2.0 where hadoop-hive, hadoop-hive-server, and hadoop-hive-metastore are installed automatically because the hive services start with the word hadoop. For bigtop-0.3.0 if you use the sudo apt-get install hadoop\* command you won't get the Hive components installed. 
# create the HDFS directories Hive needs
  1. The Hive Post install scripts should create the /tmp and /user/hive/warehouse directories. If they don't exist, create them in HDFS.
    hadoop fs -mkdir /tmp
    hadoop fs -mkdir /user/hive/warehouse
    hadoop -chmod g+x /tmp
    hadoop -chmod g+x /user/hive/warehouse
    No Format
    
    # create directory /var/run/hive
    # create directory /var/lock/subsys
    
    sudo mkdir /var/run/hive
    sudo mkdir /var/lock/subsys
    sudo /etc/init.d/hadoop-hive-server start
    No Format
    
    # create a table in Hive and verify it is there
    
    $hive
    hive>create table doh(id int);
    hive>show tables;

Where to go from here

It is highly recommended that you read documentation provided by the Hadoop project itself (http://hadoop.apache.org/common/docs/r0.20.205.0/) Bigtop 0.2 or https://hadoop.apache.org/common/docs/r1.0.0/ for Bigtop 0.3 and that you browse through the Puppet deployment code that is shipped as part of the Bigtop release (bigtop-deploy/puppet/modules, bigtop-deploy/puppet/manifests).