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

Commit

Permalink
Merge remote branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
patricioe committed Jul 19, 2011
2 parents ceba27c + 863ec2c commit e2194ab
Show file tree
Hide file tree
Showing 18 changed files with 1,104 additions and 947 deletions.
23 changes: 12 additions & 11 deletions README.txt → README.md
Expand Up @@ -29,26 +29,27 @@ Getting Started
To try it out run:

1. compile and download all dependencies
ant

ant

2. start cassandra with built in job/task trackers

./bin/brisk cassandra -t
./bin/brisk cassandra -t

3. view jobtracker
http://localhost:50030

http://localhost:50030

4. examine CassandraFS

./bin/brisk hadoop fs -lsr cfs:///
./bin/brisk hadoop fs -lsr cfs:///

5. start hive shell or webUI
./bin/brisk hive

./bin/brisk hive

or

./bin/brisk hive --service hwi
open web browser to http://localhost:9999/hwi

./bin/brisk hive --service hwi

open web browser to http://localhost:9999/hwi
2 changes: 1 addition & 1 deletion test/integration/com/datastax/TestUtils.java
Expand Up @@ -226,7 +226,7 @@ public static Connection getHiveConnection()
}

String connectionString = "jdbc:hive://" + hiveServer + ":" + hiveServerPort + "/default";
System.out.println("Connection String: " + connectionString);
//System.out.println("Connection String: " + connectionString);

Class.forName("org.apache.hadoop.hive.jdbc.HiveDriver");

Expand Down
3 changes: 0 additions & 3 deletions test/integration/com/datastax/hive/runHiveExamplesTest.java
Expand Up @@ -27,7 +27,6 @@ public static void tearDownAfterClass() throws Exception {
/* movieline_u_data: load and query u_data from movie line demo */
public void movieline_u_data() throws Exception {
HiveJDBCRunner.runQueries(connection, "movieline_u_data");
HiveJDBCRunner.runQueries(connection, "movieline_query_u_data");
}

//@Ignore
Expand All @@ -36,7 +35,6 @@ public void movieline_u_data() throws Exception {
public void movieline_u_user() throws Exception {
HiveJDBCRunner.runQueries(connection, "movieline_u_occupation");
HiveJDBCRunner.runQueries(connection, "movieline_u_user");
//HiveJDBCRunner.runQueries(connection, "movieline_query_u_user");
}

//@Ignore
Expand All @@ -45,7 +43,6 @@ public void movieline_u_user() throws Exception {
public void movieline_u_item() throws Exception {
HiveJDBCRunner.runQueries(connection, "movieline_u_genre");
HiveJDBCRunner.runQueries(connection, "movieline_u_item");
//HiveJDBCRunner.runQueries(connection, "movieline_query_u_item");
}

@Ignore
Expand Down

This file was deleted.

29 changes: 26 additions & 3 deletions test/integration/com/datastax/hive/testCases/movieline_u_data
Expand Up @@ -15,7 +15,30 @@ ROW FORMAT DELIMITED
FIELDS TERMINATED BY '\t';

-- Query out data
SELECT userid, count(*)
FROM u_data
SELECT COUNT(*), COUNT(distinct userid) FROM u_data;

-- Add MapReduce Python MR Job
ADD FILE [[DATA_DIR]]/weekday_mapper.py;

-- Transform and Insert Data from Source to Target
INSERT OVERWRITE TABLE u_data_new
SELECT TRANSFORM (userid, movieid, rating, unixtime)
USING 'python weekday_mapper.py' AS (userid, movieid, rating, weekday)
FROM u_data;

-- Query Data out of Target
SELECT weekday, COUNT(*) FROM u_data_new GROUP BY weekday;

-- Query Data out of Source
SELECT userid, count(*) FROM u_data
WHERE userid > 100 and userid < 150
GROUP BY userid
ORDER BY userid;
ORDER BY userid;

SELECT * FROM u_data
ORDER BY userid, movieid, rating
LIMIT 20;

SELECT userid, movieid, rating FROM u_data
ORDER BY userid, movieid, rating
LIMIT 20;

This file was deleted.

0 comments on commit e2194ab

Please sign in to comment.