Skip to content

Commit

Permalink
Reports and stress test completed
Browse files Browse the repository at this point in the history
  • Loading branch information
simonambridge committed Nov 21, 2017
1 parent 9c005c3 commit 86b2aaf
Show file tree
Hide file tree
Showing 84 changed files with 1,636 additions and 33 deletions.
6 changes: 3 additions & 3 deletions RollUpReports/derby.log
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
----------------------------------------------------------------
Mon Nov 20 23:10:10 GMT 2017:
Booting Derby version The Apache Software Foundation - Apache Derby - 10.10.2.0 - (1582446): instance a816c00e-015f-dbb2-3637-000033868cc0
on database directory /Users/simonambridge/Documents/My Projects/GitHub/RTFAP2/RollUpReports/metastore_db with class loader org.apache.spark.sql.hive.client.IsolatedClientLoader$$anon$1@11adca8f
Tue Nov 21 12:59:57 GMT 2017:
Booting Derby version The Apache Software Foundation - Apache Derby - 10.10.2.0 - (1582446): instance a816c00e-015f-dea9-e442-0000328fcfd8
on database directory /Users/simonambridge/Documents/My Projects/GitHub/RTFAP2/RollUpReports/metastore_db with class loader org.apache.spark.sql.hive.client.IsolatedClientLoader$$anon$1@4a204364
Loaded from file:/Users/simonambridge/zeppelin-0.7.1/interpreter/spark/dep/zeppelin-spark-dependencies_2.11-0.7.1.jar
java.vendor=Oracle Corporation
java.runtime.version=1.8.0_152-b16
Expand Down
Binary file modified RollUpReports/metastore_db/db.lck
Binary file not shown.
Binary file modified RollUpReports/metastore_db/log/log.ctrl
Binary file not shown.
Binary file modified RollUpReports/metastore_db/log/log1.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/log/logmirror.ctrl
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c101.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c111.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c121.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c130.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c141.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c150.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c161.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c171.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c180.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c191.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c1a1.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c1b1.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c1e0.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c1f1.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c20.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c200.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c211.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c221.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c230.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c31.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c41.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c490.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c4a1.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c4b0.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c4d1.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c4f0.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c51.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c510.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c530.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c550.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c570.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c590.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c5b0.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c5d0.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c5f0.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c60.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c610.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c630.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c650.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c670.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c690.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c6b0.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c6d0.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c6f0.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c71.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c81.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c840.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c860.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c880.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c8a0.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c90.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c920.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c931.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c940.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c951.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c960.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c971.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c981.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c990.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c9a1.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c9b1.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c9c0.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/c9e0.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/ca1.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/cb1.dat
Binary file not shown.
Binary file modified RollUpReports/metastore_db/seg0/cf0.dat
Binary file not shown.
14 changes: 8 additions & 6 deletions RollUpReports/src/main/scala/RollUpReportsByCC.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ object RollUpReportsByCC {
rollupDF.registerTempTable("my_transactions")

// 1. hourlyaggregates_bycc
println(" - Populating hourlyaggregates_bycc")
println(" - 1. Populating hourlyaggregates_bycc")

val rollup1= sqlContext.sql("select cc_no, " +
"int(concat(year, if(length(month)=1, concat('0',month), month),if(length(day)=1, concat('0',day), day), if(length(hour)=1, concat('0',hour), hour))) as hour, " +
Expand All @@ -52,12 +52,13 @@ object RollUpReportsByCC {
.save()

// 2. dailyaggregates_bycc
println(" - Populating dailyaggregates_bycc")
println(" - 2. Populating dailyaggregates_bycc")
val rollup2= sqlContext.sql("select cc_no, " +
"int(concat(year, if(length(month)=1, concat('0',month), month),if(length(day)=1, concat('0',day), day))) as day, " +
"sum(amount) as total_amount, " +
"min(amount) as min_amount, " +
"max(amount) as max_amount " +
"max(amount) as max_amount, " +
"count(*) as total_count " +
"from my_transactions " +
"group by cc_no, " +
"concat(year, if(length(month)=1, concat('0',month), month),if(length(day)=1, concat('0',day), day))")
Expand All @@ -68,12 +69,13 @@ object RollUpReportsByCC {
.save()

// 3. monthlyaggregates_bycc
println(" - Populating monthlyaggregates_bycc")
println(" - 3. Populating monthlyaggregates_bycc")
val rollup3= sqlContext.sql("select cc_no, " +
"int(concat(year, if(length(month)=1, concat('0',month), month))) as month, " +
"sum(amount) as total_amount, " +
"min(amount) as min_amount, " +
"max(amount) as max_amount " +
"max(amount) as max_amount, " +
"count(*) as total_count " +
"from my_transactions " +
"group by cc_no, concat(year, if(length(month)=1, concat('0',month), month))")

Expand All @@ -83,7 +85,7 @@ object RollUpReportsByCC {
.save()

// 4. yearlyaggregates_bycc
println(" - Populating yearlyaggregates_bycc")
println(" - 4. Populating yearlyaggregates_bycc")
val rollup4= sqlContext.sql("select cc_no, " +
"int(year) as year, " +
"sum(amount) as total_amount, " +
Expand Down
Binary file modified RollUpReports/target/scala-2.11/classes/RollUpReportsByCC$.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified RollUpReports/target/scala-2.11/rollupreports_2.11-1.0.jar
Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Binary file not shown.
22 changes: 22 additions & 0 deletions creates_and_inserts.cql
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,28 @@ CREATE TABLE if not exists rtfap.txn_count_min (
PRIMARY KEY (( year, month, day, hour, minute ))
);

// Cassandra stress table

CREATE TABLE if not exists rtfap.txn_by_cc (
cc_no text,
txn_year int,
txn_month int,
txn_day int,
txn_time timestamp,
amount double,
cc_provider text,
location text,
merchant text,
notes text,
status text,
tags set<text>,
txn_id text,
user_id text,
PRIMARY KEY (( cc_no, txn_year, txn_month, txn_day ), txn_time)
) WITH CLUSTERING ORDER BY ( txn_time DESC )
AND default_time_to_live = 86400;


// Sample inserts

insert into rtfap.transactions (year, month, day, hour, min, txn_time, cc_no, amount, cc_provider, items, location, merchant, notes, status, txn_id, user_id, tags) VALUES ( 2016, 03, 09, 11, 04, '2016-03-09 11:04:19', '1234123412341234', 200.0, 'VISA', {'tshirt':25, 'dressshirt':50, 'trousers':125}, 'San Francisco', 'Nordstrom', 'pretty good clothing', 'Approved', '098765', 'kunalak', {'Suspicious'});
Expand Down
1,041 changes: 1,041 additions & 0 deletions stress_yamls/stress-read.log

Large diffs are not rendered by default.

534 changes: 534 additions & 0 deletions stress_yamls/stress-write.log

Large diffs are not rendered by default.

0 comments on commit 86b2aaf

Please sign in to comment.