{"cells": [{"cell_type": "markdown", "metadata": {}, "source": ["# Map/Reduce avec PIG sur Azure - correction"]}, {"cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [{"data": {"text/html": ["Plan\n", "
\n", ""], "text/plain": ["\n", " | activity | \n", "nb | \n", "
---|---|---|
0 | \n", "falling | \n", "2973 | \n", "
1 | \n", "lying | \n", "54480 | \n", "
2 | \n", "lying down | \n", "6168 | \n", "
3 | \n", "on all fours | \n", "5210 | \n", "
4 | \n", "sitting | \n", "27244 | \n", "
\n", " | name | \n", "last_modified | \n", "content_type | \n", "content_length | \n", "blob_type | \n", "
---|---|---|---|---|---|
0 | \n", "testensae/ConfLongDemo_JSI.small.txt | \n", "Thu, 29 Oct 2015 00:23:00 GMT | \n", "application/octet-stream | \n", "132727 | \n", "BlockBlob | \n", "
\n", "\n", "Job DAG:\n", "job_1445989166328_0010\n", "\n", "\n", "2015-10-29 00:55:14,395 [main] INFO org.apache.hadoop.yarn.client.api.impl.TimelineClientImpl - Timeline service address: http://headnodehost:8188/ws/v1/timeline/\n", "2015-10-29 00:55:14,395 [main] INFO org.apache.hadoop.yarn.client.RMProxy - Connecting to ResourceManager at headnodehost/100.89.100.164:9010\n", "2015-10-29 00:55:14,395 [main] INFO org.apache.hadoop.yarn.client.AHSProxy - Connecting to Application History server at headnodehost/100.89.100.164:10200\n", "2015-10-29 00:55:14,473 [main] INFO org.apache.hadoop.mapred.ClientServiceDelegate - Application state is completed. FinalApplicationStatus=SUCCEEDED. Redirecting to job history server\n", "2015-10-29 00:55:14,676 [main] INFO org.apache.hadoop.yarn.client.api.impl.TimelineClientImpl - Timeline service address: http://headnodehost:8188/ws/v1/timeline/\n", "2015-10-29 00:55:14,676 [main] INFO org.apache.hadoop.yarn.client.RMProxy - Connecting to ResourceManager at headnodehost/100.89.100.164:9010\n", "2015-10-29 00:55:14,676 [main] INFO org.apache.hadoop.yarn.client.AHSProxy - Connecting to Application History server at headnodehost/100.89.100.164:10200\n", "2015-10-29 00:55:14,754 [main] INFO org.apache.hadoop.mapred.ClientServiceDelegate - Application state is completed. FinalApplicationStatus=SUCCEEDED. Redirecting to job history server\n", "2015-10-29 00:55:14,957 [main] INFO org.apache.hadoop.yarn.client.api.impl.TimelineClientImpl - Timeline service address: http://headnodehost:8188/ws/v1/timeline/\n", "2015-10-29 00:55:14,957 [main] INFO org.apache.hadoop.yarn.client.RMProxy - Connecting to ResourceManager at headnodehost/100.89.100.164:9010\n", "2015-10-29 00:55:14,957 [main] INFO org.apache.hadoop.yarn.client.AHSProxy - Connecting to Application History server at headnodehost/100.89.100.164:10200\n", "2015-10-29 00:55:15,020 [main] INFO org.apache.hadoop.mapred.ClientServiceDelegate - Application state is completed. FinalApplicationStatus=SUCCEEDED. Redirecting to job history server\n", "2015-10-29 00:55:15,082 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher - Success!\n", "2015-10-29 00:55:15,113 [main] INFO org.apache.pig.Main - Pig script completed in 49 seconds and 706 milliseconds (49706 ms)\n", "\n", "
\n", " | directory | \n", "last_modified | \n", "name | \n", "size | \n", "
---|---|---|---|---|
0 | \n", "False | \n", "2015-10-29 01:56:11.025867 | \n", ".\\results.group.2015.txt | \n", "89 | \n", "
1 | \n", "False | \n", "2015-10-29 01:46:45.425028 | \n", ".\\results.txt | \n", "21.65 Kb | \n", "
2 | \n", "False | \n", "2015-10-29 01:46:46.705466 | \n", ".\\results_allfiles.txt | \n", "21.65 Kb | \n", "
\n", "lying\t267\n", "falling\t30\n", "sitting\t435\n", "walking\t170\n", "sitting down\t56\n", "standing up from sitting\t42\n", "\n", ""], "text/plain": ["
\n", " | index | \n", "sequence | \n", "tag | \n", "timestamp | \n", "dateformat | \n", "x | \n", "y | \n", "z | \n", "activity | \n", "nb | \n", "
---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "0 | \n", "A01 | \n", "010-000-024-033 | \n", "633790226051280329 | \n", "27.05.2009 14:03:25:127 | \n", "4.062931 | \n", "1.892434 | \n", "0.507425 | \n", "walking | \n", "32710 | \n", "
1 | \n", "1 | \n", "A01 | \n", "020-000-033-111 | \n", "633790226051820913 | \n", "27.05.2009 14:03:25:183 | \n", "4.291954 | \n", "1.781140 | \n", "1.344495 | \n", "walking | \n", "32710 | \n", "
2 | \n", "2 | \n", "A01 | \n", "020-000-032-221 | \n", "633790226052091205 | \n", "27.05.2009 14:03:25:210 | \n", "4.359101 | \n", "1.826456 | \n", "0.968821 | \n", "walking | \n", "32710 | \n", "
3 | \n", "3 | \n", "A01 | \n", "010-000-024-033 | \n", "633790226052361498 | \n", "27.05.2009 14:03:25:237 | \n", "4.087835 | \n", "1.879999 | \n", "0.466983 | \n", "walking | \n", "32710 | \n", "
4 | \n", "4 | \n", "A01 | \n", "010-000-030-096 | \n", "633790226052631792 | \n", "27.05.2009 14:03:25:263 | \n", "4.324462 | \n", "2.072460 | \n", "0.488065 | \n", "walking | \n", "32710 | \n", "
\n", " | name | \n", "last_modified | \n", "content_type | \n", "content_length | \n", "blob_type | \n", "
---|---|---|---|---|---|
0 | \n", "xavierdupre/testensae | \n", "Tue, 25 Nov 2014 00:50:34 GMT | \n", "application/octet-stream | \n", "0 | \n", "BlockBlob | \n", "
1 | \n", "xavierdupre/testensae/ConfLongDemo_JSI.small.g... | \n", "Thu, 29 Oct 2015 00:55:09 GMT | \n", "\n", " | 0 | \n", "BlockBlob | \n", "
2 | \n", "xavierdupre/testensae/ConfLongDemo_JSI.small.g... | \n", "Thu, 29 Oct 2015 00:55:09 GMT | \n", "application/octet-stream | \n", "0 | \n", "BlockBlob | \n", "
3 | \n", "xavierdupre/testensae/ConfLongDemo_JSI.small.g... | \n", "Thu, 29 Oct 2015 00:55:08 GMT | \n", "application/octet-stream | \n", "89 | \n", "BlockBlob | \n", "
4 | \n", "xavierdupre/testensae/ConfLongDemo_JSI.small.g... | \n", "Thu, 29 Oct 2015 00:58:43 GMT | \n", "\n", " | 0 | \n", "BlockBlob | \n", "
5 | \n", "xavierdupre/testensae/ConfLongDemo_JSI.small.g... | \n", "Thu, 29 Oct 2015 00:58:43 GMT | \n", "application/octet-stream | \n", "0 | \n", "BlockBlob | \n", "
6 | \n", "xavierdupre/testensae/ConfLongDemo_JSI.small.g... | \n", "Thu, 29 Oct 2015 00:58:42 GMT | \n", "application/octet-stream | \n", "144059 | \n", "BlockBlob | \n", "
7 | \n", "xavierdupre/testensae/ConfLongDemo_JSI.small.g... | \n", "Tue, 25 Nov 2014 01:16:11 GMT | \n", "\n", " | 0 | \n", "BlockBlob | \n", "
8 | \n", "xavierdupre/testensae/ConfLongDemo_JSI.small.g... | \n", "Tue, 25 Nov 2014 01:16:11 GMT | \n", "application/octet-stream | \n", "0 | \n", "BlockBlob | \n", "
9 | \n", "xavierdupre/testensae/ConfLongDemo_JSI.small.g... | \n", "Tue, 25 Nov 2014 01:16:10 GMT | \n", "application/octet-stream | \n", "144059 | \n", "BlockBlob | \n", "
10 | \n", "xavierdupre/testensae/ConfLongDemo_JSI.small.g... | \n", "Tue, 25 Nov 2014 01:12:49 GMT | \n", "\n", " | 0 | \n", "BlockBlob | \n", "
11 | \n", "xavierdupre/testensae/ConfLongDemo_JSI.small.g... | \n", "Tue, 25 Nov 2014 01:12:49 GMT | \n", "application/octet-stream | \n", "0 | \n", "BlockBlob | \n", "
12 | \n", "xavierdupre/testensae/ConfLongDemo_JSI.small.g... | \n", "Tue, 25 Nov 2014 01:12:49 GMT | \n", "application/octet-stream | \n", "89 | \n", "BlockBlob | \n", "
13 | \n", "xavierdupre/testensae/ConfLongDemo_JSI.small.k... | \n", "Tue, 25 Nov 2014 00:50:45 GMT | \n", "\n", " | 0 | \n", "BlockBlob | \n", "
14 | \n", "xavierdupre/testensae/ConfLongDemo_JSI.small.k... | \n", "Tue, 25 Nov 2014 00:50:46 GMT | \n", "application/octet-stream | \n", "0 | \n", "BlockBlob | \n", "
15 | \n", "xavierdupre/testensae/ConfLongDemo_JSI.small.k... | \n", "Tue, 25 Nov 2014 00:50:45 GMT | \n", "application/octet-stream | \n", "22166 | \n", "BlockBlob | \n", "
16 | \n", "xavierdupre/testensae/ConfLongDemo_JSI.small.w... | \n", "Thu, 29 Oct 2015 00:28:30 GMT | \n", "\n", " | 0 | \n", "BlockBlob | \n", "
17 | \n", "xavierdupre/testensae/ConfLongDemo_JSI.small.w... | \n", "Thu, 29 Oct 2015 00:28:30 GMT | \n", "application/octet-stream | \n", "0 | \n", "BlockBlob | \n", "
18 | \n", "xavierdupre/testensae/ConfLongDemo_JSI.small.w... | \n", "Thu, 29 Oct 2015 00:28:30 GMT | \n", "application/octet-stream | \n", "22166 | \n", "BlockBlob | \n", "
19 | \n", "xavierdupre/testensae/ConfLongDemo_JSI.small.w... | \n", "Thu, 29 Oct 2015 00:46:05 GMT | \n", "\n", " | 0 | \n", "BlockBlob | \n", "
20 | \n", "xavierdupre/testensae/ConfLongDemo_JSI.small.w... | \n", "Thu, 29 Oct 2015 00:46:05 GMT | \n", "application/octet-stream | \n", "0 | \n", "BlockBlob | \n", "
21 | \n", "xavierdupre/testensae/ConfLongDemo_JSI.small.w... | \n", "Thu, 29 Oct 2015 00:46:04 GMT | \n", "application/octet-stream | \n", "22166 | \n", "BlockBlob | \n", "
\n", "999\tA01\t010-000-024-033\t633790226379871138\t27.05.2009 14:03:57:987\t3.198556661605835\t1.1257659196853638\t0.3567752242088318\tlying\tlying\t267\n", "998\tA01\t020-000-032-221\t633790226379600847\t27.05.2009 14:03:57:960\t4.3730292320251465\t1.3821170330047607\t0.38861045241355896\tlying\tlying\t267\n", "997\tA01\t020-000-033-111\t633790226379330550\t27.05.2009 14:03:57:933\t4.7574005126953125\t1.285519003868103\t-0.08946932852268219\tlying\tlying\t267\n", "996\tA01\t010-000-030-096\t633790226379060251\t27.05.2009 14:03:57:907\t3.182415008544922\t1.1020996570587158\t0.29104289412498474\tlying\tlying\t267\n", "995\tA01\t010-000-024-033\t633790226378789954\t27.05.2009 14:03:57:880\t3.0784008502960205\t1.0197675228118896\t0.6061218976974487\tlying\tlying\t267\n", "994\tA01\t020-000-032-221\t633790226378519655\t27.05.2009 14:03:57:853\t4.36382532119751\t1.4307395219802856\t0.3206148743629456\tlying\tlying\t267\n", "993\tA01\t010-000-024-033\t633790226377708776\t27.05.2009 14:03:57:770\t3.0621800422668457\t1.0790562629699707\t0.6795752048492432\tlying\tlying\t267\n", "992\tA01\t020-000-032-221\t633790226377438480\t27.05.2009 14:03:57:743\t4.371500492095946\t1.4781558513641355\t0.5384233593940735\tlying\tlying\t267\n", "991\tA01\t020-000-033-111\t633790226377168187\t27.05.2009 14:03:57:717\t4.918898105621338\t1.1530661582946775\t0.19635945558547974\tlying\tlying\t267\n", "990\tA01\t010-000-030-096\t633790226376897895\t27.05.2009 14:03:57:690\t3.208510637283325\t1.1156394481658936\t0.3381773829460144\tlying\tlying\t267\n", "\n", ""], "text/plain": ["