~lazypower/charms/bundles/hdp-hadoop-hive-mysql/bundle

« back to all changes in this revision

Viewing changes to README.md

  • Committer: amir sanjar
  • Date: 2014-08-15 14:33:33 UTC
  • Revision ID: amir.sanjar@canonical.com-20140815143333-8ep526w7x53r72h1
hdp 2.1 data analytic solution using HIVE, mysql, and hadoop

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# A Hortonworks HDP 2.1 HIVE, mysql, and Hadoop Cluster
 
2
 
 
3
This bundle is a 7 node Hadoop cluster designed to scale out. It contains the following units:
 
4
 
 
5
One Hadoop Master (yarn & hdfs) Node
 
6
one Hadoop comput Node
 
7
one Hive Node
 
8
one MySQL Node
 
9
 
 
10
## Usage
 
11
Once you have a cluster running, just run:
 
12
    1) juju ssh yarn-hdfs-master/0  <<= ssh to hadoop master
 
13
    2) Smoke test HDFS admin functionality- As the HDFS user, create a /user/$CLIENT_USER in
 
14
       hadoop file system - Below steps verifies/demos HDFS functionality  
 
15
       a) sudo su $HDFS_USER
 
16
       b) hdfs dfs -mkdir -p /user/ubuntu
 
17
       c) hdfs dfs -chown ubuntu:ubuntu /user/ubuntu
 
18
       d) hdfs dfs -chmod -R 755 /user/ubuntu
 
19
       e) exit
 
20
 
 
21
    3) Smoke test YARN and Mapreduce - Run the smoke test as the $CLIENT_USER, using Terasort and sort 10GB of data.
 
22
       a) hadoop jar /usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples-*.jar teragen 10000 /user/ubuntu/teragenout 
 
23
       b) hadoop jar /usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples-*.jar terasort /user/ubuntu/teragenout /user/ubuntu/terasortout
 
24
 
 
25
    4) Smoke test HDFS funtionality from ubuntu user space - delete mapreduce output from hdfs 
 
26
       hdfs dfs -rm -r /user/ubuntu/teragenout
 
27
 
 
28
    HIVE+HDFS Usage:
 
29
    1) juju ssh hdphive/0  <<= ssh to hive server
 
30
    2) sudo su $HIVE_USER
 
31
    3) hive
 
32
    4) from Hive console:
 
33
       show databases;
 
34
       create table test(col1 int, col2 string);
 
35
       show tables;
 
36
       exit;
 
37
    5) exit from $HIVE_USER session
 
38
    6) sudo su $HDFS_USER
 
39
    7) hadoop dfsadmin -report <<== verify connection to the remote HDFS cluster
 
40
    7) hdfs dfs -ls <<== verify that "test" directory has been created on the remote HDFS cluster 
 
41
    
 
42
##Scale Out Usage
 
43
In order to increase the amount of slaves, you must add units, to add one unit:
 
44
    juju add-unit compute-node
 
45
Or you can add multiple units at once:
 
46
    juju add-unit -n4 compute-node
 
47
    
 
48
 
 
49
## References
 
50