Skip to content
This repository has been archived by the owner on Mar 24, 2022. It is now read-only.

URL Cleanup #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Labs/Lab_3/README.Lab_3
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ demo=# \dv retail_demo.*

- Review that script
- Run it: ./HBase_Import_Retail_Demo.pl
- Reference on the import process: http://hbase.apache.org/book/ops_mgt.html#importtsv
- Reference on the import process: https://hbase.apache.org/book/ops_mgt.html#importtsv
- Verify we can see some data:
* Fire up the HBase shell: hbase shell
* Scan some rows: hbase(main):003:0> scan 'products_dim', { LIMIT => 5 }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void testMapper() {
.withInput(
new LongWritable(1),
new Text(
"8180565407 49711957 69 2010-10-07 08:48:35 2010-10-10 03:01:47 FreeReplacement 0.41300 5.90000 1 0.05000 None 0.00000 N N N 7385 CLINTON Apt 24 INDIANAPOLIS IN 46201 USA (105)037-5575 Casey Mahon [email protected] OS22196-563554-06-11957 http://myretailsite.emc.com/product_detail/Music/?tps=mpumkirvss&sessionid=OS22196-563554-06-11957&ref=oaxmmasx&sku=1643147"));
"8180565407 49711957 69 2010-10-07 08:48:35 2010-10-10 03:01:47 FreeReplacement 0.41300 5.90000 1 0.05000 None 0.00000 N N N 7385 CLINTON Apt 24 INDIANAPOLIS IN 46201 USA (105)037-5575 Casey Mahon [email protected] OS22196-563554-06-11957 https://myretailsite.emc.com/product_detail/Music/?tps=mpumkirvss&sessionid=OS22196-563554-06-11957&ref=oaxmmasx&sku=1643147"));
mapDriver.withOutput(new IntWritable(49711957), new Text(
"8180565407,2010-10-07 08:48:35"));
mapDriver.runTest();
Expand Down Expand Up @@ -68,27 +68,27 @@ public void testMapReduce() {
.withInput(
new LongWritable(1),
new Text(
"8180565407 49711957 69 2010-10-07 08:48:35 2010-10-10 03:01:47 FreeReplacement 0.41300 5.90000 1 0.05000 None 0.00000 N N N 7385 CLINTON Apt 24 INDIANAPOLIS IN 46201 USA (105)037-5575 Casey Mahon [email protected] OS22196-563554-06-11957 http://myretailsite.emc.com/product_detail/Music/?tps=mpumkirvss&sessionid=OS22196-563554-06-11957&ref=oaxmmasx&sku=1643147"));
"8180565407 49711957 69 2010-10-07 08:48:35 2010-10-10 03:01:47 FreeReplacement 0.41300 5.90000 1 0.05000 None 0.00000 N N N 7385 CLINTON Apt 24 INDIANAPOLIS IN 46201 USA (105)037-5575 Casey Mahon [email protected] OS22196-563554-06-11957 https://myretailsite.emc.com/product_detail/Music/?tps=mpumkirvss&sessionid=OS22196-563554-06-11957&ref=oaxmmasx&sku=1643147"));
mapReduceDriver
.withInput(
new LongWritable(2),
new Text(
"6652383320 49711957 48 2010-10-08 08:48:35 2010-10-04 16:46:32 Credit 35.83930 511.99000 1 0.05000 None 0.00000 N N N 2504 FOUR CORNERS LIZTON IN 46149 USA (901)402-8251 Carey Real [email protected] OS40109-802651-05-52000 http://myretailsite.emc.com/product_detail/Kitchen/?tps=sqvpvmkksm&sessionid=OS40109-802651-05-52000&ref=mpmsezzz&sku=1442090"));
"6652383320 49711957 48 2010-10-08 08:48:35 2010-10-04 16:46:32 Credit 35.83930 511.99000 1 0.05000 None 0.00000 N N N 2504 FOUR CORNERS LIZTON IN 46149 USA (901)402-8251 Carey Real [email protected] OS40109-802651-05-52000 https://myretailsite.emc.com/product_detail/Kitchen/?tps=sqvpvmkksm&sessionid=OS40109-802651-05-52000&ref=mpmsezzz&sku=1442090"));
mapReduceDriver
.withInput(
new LongWritable(3),
new Text(
"7149696583 49711957 52 2010-10-09 08:48:35 2010-10-08 05:51:03 CreditCard 149.45425 2173.88000 1 0.00000 BOGO-PDX 0.50000 N N N 26 KITTYHAWK PENGILLY MN 55775 USA (676)090-4274 Mark Spivey [email protected] OS53372-931651-04-77852 http://myretailsite.emc.com/product_detail/Lawn_&_Patio/?tps=kkmuuviups&sessionid=OS53372-931651-04-77852&ref=mjyxxyse&sku=1543264"));
"7149696583 49711957 52 2010-10-09 08:48:35 2010-10-08 05:51:03 CreditCard 149.45425 2173.88000 1 0.00000 BOGO-PDX 0.50000 N N N 26 KITTYHAWK PENGILLY MN 55775 USA (676)090-4274 Mark Spivey [email protected] OS53372-931651-04-77852 https://myretailsite.emc.com/product_detail/Lawn_&_Patio/?tps=kkmuuviups&sessionid=OS53372-931651-04-77852&ref=mjyxxyse&sku=1543264"));
mapReduceDriver
.withInput(
new LongWritable(4),
new Text(
"7034197641 49711957 52 2010-10-10 08:48:35 2010-10-08 00:24:02 2010-10-27 20:35:45 GiftCertificate 3.07440 43.92000 2 0.05000 CUST-Ret-NNQLNPRC 0.50000 N Y N 8254 INDIAN PALMS CONVERSE IN 46919 USA (526)874-5192 Corine Goetz [email protected] OS54430-009805-06-73524 http://myretailsite.emc.com/product_detail/Kitchen/?tps=mliiiqmrvr&sessionid=OS54430-009805-06-73524&ref=ppyxpseo&sku=1525627"));
"7034197641 49711957 52 2010-10-10 08:48:35 2010-10-08 00:24:02 2010-10-27 20:35:45 GiftCertificate 3.07440 43.92000 2 0.05000 CUST-Ret-NNQLNPRC 0.50000 N Y N 8254 INDIAN PALMS CONVERSE IN 46919 USA (526)874-5192 Corine Goetz [email protected] OS54430-009805-06-73524 https://myretailsite.emc.com/product_detail/Kitchen/?tps=mliiiqmrvr&sessionid=OS54430-009805-06-73524&ref=ppyxpseo&sku=1525627"));
mapReduceDriver
.withInput(
new LongWritable(5),
new Text(
"6723165345 49711957 60 2010-10-11 08:48:35 2010-10-06 13:37:43 Credit 4.31940 71.99000 1 0.11000 None 0.00000 N N N 20 Judge Street ALLENDALE SC 29810 USA (837)288-4418 Bessie Gagliano [email protected] OS22134-911920-05-38655 http://myretailsite.emc.com/product_detail/Home_Improvement/?tps=kvqsvrmmrk&sessionid=OS22134-911920-05-38655&ref=szapyjss&sku=1181886"));
"6723165345 49711957 60 2010-10-11 08:48:35 2010-10-06 13:37:43 Credit 4.31940 71.99000 1 0.11000 None 0.00000 N N N 20 Judge Street ALLENDALE SC 29810 USA (837)288-4418 Bessie Gagliano [email protected] OS22134-911920-05-38655 https://myretailsite.emc.com/product_detail/Home_Improvement/?tps=kvqsvrmmrk&sessionid=OS22134-911920-05-38655&ref=szapyjss&sku=1181886"));
mapReduceDriver
.withOutput(
NullWritable.get(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public void setUp() {

@Test
public void testMapper() {
mapDriver.withInput(new LongWritable(1), new Text("7149696583 16877852 52 2010-10-04 21:41:54 2010-10-08 05:51:03 CreditCard 149.45425 2173.88000 1 0.00000 BOGO-PDX 0.50000 N N N 26 KITTYHAWK PENGILLY MN 55770 USA (676)090-4274 Mark Spivey [email protected] OS53372-931651-04-77852 http://myretailsite.emc.com/product_detail/Lawn_&_Patio/?"));
mapDriver.withInput(new LongWritable(1), new Text("7149696583 16877852 52 2010-10-04 21:41:54 2010-10-08 05:51:03 CreditCard 149.45425 2173.88000 1 0.00000 BOGO-PDX 0.50000 N N N 26 KITTYHAWK PENGILLY MN 55770 USA (676)090-4274 Mark Spivey [email protected] OS53372-931651-04-77852 https://myretailsite.emc.com/product_detail/Lawn_&_Patio/?"));
mapDriver.withOutput(new IntWritable(55770), new Text("149.45425,2173.88000"));
mapDriver.runTest();
}
Expand All @@ -52,9 +52,9 @@ public void testReducer() {

@Test
public void testMapReduce() {
mapReduceDriver.withInput(new LongWritable(1), new Text("7149696583 16877852 52 2010-10-04 21:41:54 2010-10-08 05:51:03 CreditCard 149.45425 2173.88000 1 0.00000 BOGO-PDX 0.50000 N N N 26 KITTYHAWK PENGILLY MN 55770 USA (676)090-4274 Mark Spivey [email protected] OS53372-931651-04-77852 http://myretailsite.emc.com/product_detail/Lawn_&_Patio/?"));
mapReduceDriver.withInput(new LongWritable(2), new Text("7149696583 16877852 52 2010-10-04 21:41:54 2010-10-08 05:51:03 CreditCard 149.45425 2173.88000 1 0.00000 BOGO-PDX 0.50000 N N N 26 KITTYHAWK PENGILLY MN 55770 USA (676)090-4274 Mark Spivey [email protected] OS53372-931651-04-77852 http://myretailsite.emc.com/product_detail/Lawn_&_Patio/?"));
mapReduceDriver.withInput(new LongWritable(3), new Text("7149696583 16877852 52 2010-10-04 21:41:54 2010-10-08 05:51:03 CreditCard 149.45425 2173.88000 1 0.00000 BOGO-PDX 0.50000 N N N 26 KITTYHAWK PENGILLY MN 55770 USA (676)090-4274 Mark Spivey [email protected] OS53372-931651-04-77852 http://myretailsite.emc.com/product_detail/Lawn_&_Patio/?"));
mapReduceDriver.withInput(new LongWritable(1), new Text("7149696583 16877852 52 2010-10-04 21:41:54 2010-10-08 05:51:03 CreditCard 149.45425 2173.88000 1 0.00000 BOGO-PDX 0.50000 N N N 26 KITTYHAWK PENGILLY MN 55770 USA (676)090-4274 Mark Spivey [email protected] OS53372-931651-04-77852 https://myretailsite.emc.com/product_detail/Lawn_&_Patio/?"));
mapReduceDriver.withInput(new LongWritable(2), new Text("7149696583 16877852 52 2010-10-04 21:41:54 2010-10-08 05:51:03 CreditCard 149.45425 2173.88000 1 0.00000 BOGO-PDX 0.50000 N N N 26 KITTYHAWK PENGILLY MN 55770 USA (676)090-4274 Mark Spivey [email protected] OS53372-931651-04-77852 https://myretailsite.emc.com/product_detail/Lawn_&_Patio/?"));
mapReduceDriver.withInput(new LongWritable(3), new Text("7149696583 16877852 52 2010-10-04 21:41:54 2010-10-08 05:51:03 CreditCard 149.45425 2173.88000 1 0.00000 BOGO-PDX 0.50000 N N N 26 KITTYHAWK PENGILLY MN 55770 USA (676)090-4274 Mark Spivey [email protected] OS53372-931651-04-77852 https://myretailsite.emc.com/product_detail/Lawn_&_Patio/?"));
mapReduceDriver.withOutput(NullWritable.get(), new Text("55770 6521.64 448.36275"));

mapReduceDriver.runTest();
Expand Down