Skip to content
This repository has been archived by the owner on Jan 9, 2019. It is now read-only.

Commit

Permalink
Adding a script to open terminals and updating the workshop script to…
Browse files Browse the repository at this point in the history
… be better-formatted markdown.
  • Loading branch information
matthewmccullough committed Sep 18, 2010
1 parent d2e6e0f commit 10bd725
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 16 deletions.
32 changes: 16 additions & 16 deletions Hadoop Workshop Labs.md
Expand Up @@ -99,28 +99,28 @@ hadoop fs -cat shakespeare_words.output/part-00000


##Hive
hive
### Clean up logs
hadoop fs -rmr shakespeare_freq/_logs

SHOW TABLES;
CREATE TABLE shakespeare (freq INT, word STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' STORED AS TEXTFILE;
DESCRIBE shakespeare;
hive

LOAD DATA INPATH "shakespeare_freq" INTO TABLE shakespeare;
### Clean up logs
hadoop fs -rmr shakespeare_freq/_logs

SELECT * FROM shakespeare LIMIT 10;
SHOW TABLES;
CREATE TABLE shakespeare (freq INT, word STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' STORED AS TEXTFILE;
DESCRIBE shakespeare;

SELECT * FROM shakespeare WHERE freq > 100 SORT BY freq ASC LIMIT 10;
exit;
LOAD DATA INPATH "shakespeare_freq" INTO TABLE shakespeare;

SELECT * FROM shakespeare LIMIT 10;

SELECT * FROM shakespeare WHERE freq > 100 SORT BY freq ASC LIMIT 10;
exit;


## Configuring Hadoop
cd /usr/lib/hadoop-0.20/conf
cd /usr/lib/hadoop-0.20/conf


## Managing Hadoop

cd /usr/lib/hadoop-0.20/bin
sudo -u hadoop start-all.sh
sudo -u hadoop stop-all.sh
cd /usr/lib/hadoop-0.20/bin
sudo -u hadoop start-all.sh
sudo -u hadoop stop-all.sh
9 changes: 9 additions & 0 deletions open-terminals.sh
@@ -0,0 +1,9 @@
terminal.sh /Users/mccm06/Documents/Teach/Courses/Hadoop/sample-data
sleep 1
terminal.sh /Applications/Dev/hadoop-family/hbase-0.20.2/bin
sleep 1
terminal.sh /Applications/Dev/hadoop-family/hadoop-0.20.1/bin
sleep 1
terminal.sh /Applications/Dev/hadoop-family/hadoop-0.20.1/logs
sleep 1
terminal.sh /Applications/Dev/hadoop-family/hadoop-0.20.1/conf

0 comments on commit 10bd725

Please sign in to comment.