Skip to content
This repository has been archived by the owner on Sep 17, 2020. It is now read-only.

Commit

Permalink
Rev5 updates
Browse files Browse the repository at this point in the history
to align with HDP 2.2 version of the course offering
  • Loading branch information
lestermartin committed Oct 20, 2015
1 parent 4527ea4 commit 5c60e94
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 25 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DevPH_Labs

Rev4 /labs files for HDP 2.1 version of the
Rev5 /labs files for HDP 2.2 version of the
http://hortonworks.com/training/class/hadoop-2-data-analysis-pig-hive/ course.

Files are a replay of the /labs folder from https://github.com/HortonworksUniversity/DevPH_Rev4.
Status: Currently in Production
2 changes: 1 addition & 1 deletion labs/Lab6.4/sessions.pig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
REGISTER datafu-1.2.0.jar;
REGISTER /usr/lib/pig/piggybank.jar;
REGISTER /usr/hdp/2.2.0.0-2041/pig/piggybank.jar;

DEFINE UnixToISO org.apache.pig.piggybank.evaluation.datetime.convert.UnixToISO();

Expand Down
13 changes: 5 additions & 8 deletions labs/Lab7.2/Solution/mostvisits.hive
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
SELECT ordertotal, orders.userid, itemlist
FROM orders
JOIN max_ordertotal ON
max_ordertotal.userid = orders.userid
AND
max_ordertotal.maxtotal = orders.ordertotal;

select order_date, sum(ordertotal) FROM orders GROUP BY order_date;
select count(*) as visit_count, fname, lname
from wh_visits
group by fname, lname
order by visit_count DESC
limit 20;
22 changes: 11 additions & 11 deletions labs/Lab7.5/create_email_table.hive
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
CREATE TABLE hive_user_email
STORED AS AVRO
TBLPROPERTIES ('avro.schema.url'='hdfs://sandbox.hortonworks.com:8020/user/root/mbox.avsc');

ROW FORMAT

SERDE 'org.apache.hadoop.hive.serde2.avro.AvroSerDe'

WITH SERDEPROPERTIES (
'avro.schema.url'='hdfs:///user/root/mbox.avsc')

STORED AS

INPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat'

OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat'
;
#CREATE TABLE hive_user_email
#ROW FORMAT
#SERDE 'org.apache.hadoop.hive.serde2.avro.AvroSerDe'
#WITH SERDEPROPERTIES (
# 'avro.schema.url'='hdfs:///user/root/mbox.avsc')
#STORED AS
#INPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat'
#OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat'
#;

6 changes: 3 additions & 3 deletions labs/Oozie/job.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
oozie.wf.application.path=hdfs://namenode:8020/user/root/congress
oozie.wf.application.path=hdfs://sandbox:8020/user/root/congress

#Hadoop RM
resourceManager=resourcemanager:8050
resourceManager=sandbox:8050

#Hadoop fs.default.name
nameNode=hdfs://namenode:8020/
nameNode=hdfs://sandbox:8020/

#Hadoop mapred.queue.name
queueName=default
Expand Down

0 comments on commit 5c60e94

Please sign in to comment.