NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

### Get team that has won most matches across all seasons
hive> select winner, count(winner) as occurence from matches group by winner order by occurence desc limit 1;
Query ID = cloudera_20191020231010_178bff93-0a01-4d28-9bb3-3ae3f5e9d01a
Total jobs = 2
Launching Job 1 out of 2
Number of reduce tasks not specified. Estimated from input data size: 1
In order to change the average load for a reducer (in bytes):
set hive.exec.reducers.bytes.per.reducer=<number>
In order to limit the maximum number of reducers:
set hive.exec.reducers.max=<number>
In order to set a constant number of reducers:
set mapreduce.job.reduces=<number>
Starting Job = job_1571634759327_0001, Tracking URL = http://quickstart.cloudera:8088/proxy/application_1571634759327_0001/
Kill Command = /usr/lib/hadoop/bin/hadoop job -kill job_1571634759327_0001
Hadoop job information for Stage-1: number of mappers: 1; number of reducers: 1
2019-10-20 23:12:03,246 Stage-1 map = 0%, reduce = 0%
2019-10-20 23:12:27,323 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 2.0 sec
2019-10-20 23:12:41,568 Stage-1 map = 100%, reduce = 100%, Cumulative CPU 4.43 sec
MapReduce Total cumulative CPU time: 4 seconds 430 msec
Ended Job = job_1571634759327_0001
Launching Job 2 out of 2
Number of reduce tasks determined at compile time: 1
In order to change the average load for a reducer (in bytes):
set hive.exec.reducers.bytes.per.reducer=<number>
In order to limit the maximum number of reducers:
set hive.exec.reducers.max=<number>
In order to set a constant number of reducers:
set mapreduce.job.reduces=<number>
Starting Job = job_1571634759327_0002, Tracking URL = http://quickstart.cloudera:8088/proxy/application_1571634759327_0002/
Kill Command = /usr/lib/hadoop/bin/hadoop job -kill job_1571634759327_0002
Hadoop job information for Stage-2: number of mappers: 1; number of reducers: 1
2019-10-20 23:13:04,427 Stage-2 map = 0%, reduce = 0%
2019-10-20 23:13:19,225 Stage-2 map = 100%, reduce = 0%, Cumulative CPU 1.65 sec
2019-10-20 23:13:30,055 Stage-2 map = 100%, reduce = 100%, Cumulative CPU 3.84 sec
MapReduce Total cumulative CPU time: 3 seconds 840 msec
Ended Job = job_1571634759327_0002
MapReduce Jobs Launched:
Stage-Stage-1: Map: 1 Reduce: 1 Cumulative CPU: 4.43 sec HDFS Read: 108143 HDFS Write: 634 SUCCESS
Stage-Stage-2: Map: 1 Reduce: 1 Cumulative CPU: 3.84 sec HDFS Read: 5693 HDFS Write: 18 SUCCESS
Total MapReduce CPU Time Spent: 8 seconds 270 msec
OK
Mumbai Indians 92
Time taken: 156.918 seconds, Fetched: 1 row(s)
hive>

########################################################################


### Get total wins of teams across all seasons
hive> select winner, count(winner) as occurence from matches group by winner order by occurence desc;
Query ID = cloudera_20191020231616_37f92dd9-841f-4f19-95ed-0f12d1fdffb4
Total jobs = 2
Launching Job 1 out of 2
Number of reduce tasks not specified. Estimated from input data size: 1
In order to change the average load for a reducer (in bytes):
set hive.exec.reducers.bytes.per.reducer=<number>
In order to limit the maximum number of reducers:
set hive.exec.reducers.max=<number>
In order to set a constant number of reducers:
set mapreduce.job.reduces=<number>
Starting Job = job_1571634759327_0003, Tracking URL = http://quickstart.cloudera:8088/proxy/application_1571634759327_0003/
Kill Command = /usr/lib/hadoop/bin/hadoop job -kill job_1571634759327_0003
Hadoop job information for Stage-1: number of mappers: 1; number of reducers: 1
2019-10-20 23:16:28,346 Stage-1 map = 0%, reduce = 0%
2019-10-20 23:16:40,343 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 2.0 sec
2019-10-20 23:16:51,446 Stage-1 map = 100%, reduce = 100%, Cumulative CPU 3.93 sec
MapReduce Total cumulative CPU time: 3 seconds 930 msec
Ended Job = job_1571634759327_0003
Launching Job 2 out of 2
Number of reduce tasks determined at compile time: 1
In order to change the average load for a reducer (in bytes):
set hive.exec.reducers.bytes.per.reducer=<number>
In order to limit the maximum number of reducers:
set hive.exec.reducers.max=<number>
In order to set a constant number of reducers:
set mapreduce.job.reduces=<number>
Starting Job = job_1571634759327_0004, Tracking URL = http://quickstart.cloudera:8088/proxy/application_1571634759327_0004/
Kill Command = /usr/lib/hadoop/bin/hadoop job -kill job_1571634759327_0004
Hadoop job information for Stage-2: number of mappers: 1; number of reducers: 1
2019-10-20 23:17:11,014 Stage-2 map = 0%, reduce = 0%
2019-10-20 23:17:22,386 Stage-2 map = 100%, reduce = 0%, Cumulative CPU 1.73 sec
2019-10-20 23:17:34,119 Stage-2 map = 100%, reduce = 100%, Cumulative CPU 3.99 sec
MapReduce Total cumulative CPU time: 3 seconds 990 msec
Ended Job = job_1571634759327_0004
MapReduce Jobs Launched:
Stage-Stage-1: Map: 1 Reduce: 1 Cumulative CPU: 3.93 sec HDFS Read: 108274 HDFS Write: 634 SUCCESS
Stage-Stage-2: Map: 1 Reduce: 1 Cumulative CPU: 3.99 sec HDFS Read: 5572 HDFS Write: 310 SUCCESS
Total MapReduce CPU Time Spent: 7 seconds 920 msec
OK
Mumbai Indians 92
Chennai Super Kings 79
Kolkata Knight Riders 77
Royal Challengers Bangalore 73
Kings XI Punjab 70
Rajasthan Royals 63
Delhi Daredevils 62
Sunrisers Hyderabad 42
Deccan Chargers 29
Gujarat Lions 13
Pune Warriors 12
Rising Pune Supergiant 10
Kochi Tuskers Kerala 6
Rising Pune Supergiants 5
3
Time taken: 80.332 seconds, Fetched: 15 row(s)
hive>



#########################################################################################

###Players who have won most player of the match award
hive> select player_of_match, count(player_of_match) as occurence from matches group by player_of_match order by occurence desc limit 5;
Query ID = cloudera_20191020232121_fa8a6853-1b51-4fdc-9ba1-8751d5bb1906
Total jobs = 2
Launching Job 1 out of 2
Number of reduce tasks not specified. Estimated from input data size: 1
In order to change the average load for a reducer (in bytes):
set hive.exec.reducers.bytes.per.reducer=<number>
In order to limit the maximum number of reducers:
set hive.exec.reducers.max=<number>
In order to set a constant number of reducers:
set mapreduce.job.reduces=<number>
Starting Job = job_1571634759327_0005, Tracking URL = http://quickstart.cloudera:8088/proxy/application_1571634759327_0005/
Kill Command = /usr/lib/hadoop/bin/hadoop job -kill job_1571634759327_0005
Hadoop job information for Stage-1: number of mappers: 1; number of reducers: 1
2019-10-20 23:21:57,604 Stage-1 map = 0%, reduce = 0%
2019-10-20 23:22:08,741 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 2.21 sec
2019-10-20 23:22:21,983 Stage-1 map = 100%, reduce = 100%, Cumulative CPU 4.66 sec
MapReduce Total cumulative CPU time: 4 seconds 660 msec
Ended Job = job_1571634759327_0005
Launching Job 2 out of 2
Number of reduce tasks determined at compile time: 1
In order to change the average load for a reducer (in bytes):
set hive.exec.reducers.bytes.per.reducer=<number>
In order to limit the maximum number of reducers:
set hive.exec.reducers.max=<number>
In order to set a constant number of reducers:
set mapreduce.job.reduces=<number>
Starting Job = job_1571634759327_0006, Tracking URL = http://quickstart.cloudera:8088/proxy/application_1571634759327_0006/
Kill Command = /usr/lib/hadoop/bin/hadoop job -kill job_1571634759327_0006
Hadoop job information for Stage-2: number of mappers: 1; number of reducers: 1
2019-10-20 23:22:35,990 Stage-2 map = 0%, reduce = 0%
2019-10-20 23:22:46,856 Stage-2 map = 100%, reduce = 0%, Cumulative CPU 1.32 sec
2019-10-20 23:22:57,698 Stage-2 map = 100%, reduce = 100%, Cumulative CPU 3.14 sec
MapReduce Total cumulative CPU time: 3 seconds 140 msec
Ended Job = job_1571634759327_0006
MapReduce Jobs Launched:
Stage-Stage-1: Map: 1 Reduce: 1 Cumulative CPU: 4.66 sec HDFS Read: 108310 HDFS Write: 5898 SUCCESS
Stage-Stage-2: Map: 1 Reduce: 1 Cumulative CPU: 3.14 sec HDFS Read: 11011 HDFS Write: 68 SUCCESS
Total MapReduce CPU Time Spent: 7 seconds 800 msec
OK
CH Gayle 18
YK Pathan 16
DA Warner 15
AB de Villiers 15
SK Raina 14
Time taken: 79.79 seconds, Fetched: 5 row(s)
hive>

############################################################################################

###Year Wise Winner of the IPL
hive> SELECT
> season AS SEASON,
> winner AS WINNER,
> IF(win_by_runs='0',CONCAT('Won by ',win_by_wickets,' Wickets'),
> CONCAT('Won by ',win_by_runs,' Runs')) AS `WINNING MARGIN`,
> IF(winner=team1,team2,team1) AS RUNNER,
> player_of_match
> FROM
> matches
> WHERE
> matches.id IN(SELECT MAX(id) FROM matches GROUP BY season) ;
Query ID = cloudera_20191020234848_985310d4-d0c9-4e17-b904-b5826d3789ea
Total jobs = 3
Launching Job 1 out of 3
Number of reduce tasks not specified. Estimated from input data size: 1
In order to change the average load for a reducer (in bytes):
set hive.exec.reducers.bytes.per.reducer=<number>
In order to limit the maximum number of reducers:
set hive.exec.reducers.max=<number>
In order to set a constant number of reducers:
set mapreduce.job.reduces=<number>
Starting Job = job_1571634759327_0012, Tracking URL = http://quickstart.cloudera:8088/proxy/application_1571634759327_0012/
Kill Command = /usr/lib/hadoop/bin/hadoop job -kill job_1571634759327_0012
Hadoop job information for Stage-2: number of mappers: 1; number of reducers: 1
2019-10-20 23:48:23,359 Stage-2 map = 0%, reduce = 0%
2019-10-20 23:48:37,144 Stage-2 map = 100%, reduce = 0%, Cumulative CPU 2.29 sec
2019-10-20 23:48:46,825 Stage-2 map = 100%, reduce = 100%, Cumulative CPU 4.93 sec
MapReduce Total cumulative CPU time: 4 seconds 930 msec
Ended Job = job_1571634759327_0012
Stage-5 is selected by condition resolver.
Stage-1 is filtered out by condition resolver.
Execution log at: /tmp/cloudera/cloudera_20191020234848_985310d4-d0c9-4e17-b904-b5826d3789ea.log
2019-10-20 11:48:55 Starting to launch local task to process map join; maximum memory = 119537664
2019-10-20 11:48:57 Dump the side-table for tag: 1 with group count: 10 into file: file:/tmp/cloudera/1f197a47-3ee4-4511-8bc1-a49823e01c4b/hive_2019-10-20_23-48-10_095_3446283195135926680-1/-local-10004/HashTable-Stage-3/MapJoin-mapfile21--.hashtable
2019-10-20 11:48:57 Uploaded 1 File to: file:/tmp/cloudera/1f197a47-3ee4-4511-8bc1-a49823e01c4b/hive_2019-10-20_23-48-10_095_3446283195135926680-1/-local-10004/HashTable-Stage-3/MapJoin-mapfile21--.hashtable (467 bytes)
2019-10-20 11:48:57 End of local task; Time Taken: 1.755 sec.
Execution completed successfully
MapredLocal task succeeded
Launching Job 3 out of 3
Number of reduce tasks is set to 0 since there's no reduce operator
Starting Job = job_1571634759327_0013, Tracking URL = http://quickstart.cloudera:8088/proxy/application_1571634759327_0013/
Kill Command = /usr/lib/hadoop/bin/hadoop job -kill job_1571634759327_0013
Hadoop job information for Stage-3: number of mappers: 1; number of reducers: 0
2019-10-20 23:49:11,896 Stage-3 map = 0%, reduce = 0%
2019-10-20 23:49:22,669 Stage-3 map = 100%, reduce = 0%, Cumulative CPU 3.08 sec
MapReduce Total cumulative CPU time: 3 seconds 80 msec
Ended Job = job_1571634759327_0013
MapReduce Jobs Launched:
Stage-Stage-2: Map: 1 Reduce: 1 Cumulative CPU: 4.93 sec HDFS Read: 108950 HDFS Write: 303 SUCCESS
Stage-Stage-3: Map: 1 Cumulative CPU: 3.08 sec HDFS Read: 108240 HDFS Write: 705 SUCCESS
Total MapReduce CPU Time Spent: 8 seconds 10 msec
OK
2017 Delhi Daredevils Won by 97 Runs Rising Pune Supergiant SV Samson
2008 Mumbai Indians Won by 8 Wickets Kolkata Knight Riders SM Pollock
2009 Deccan Chargers Won by 6 Runs Royal Challengers Bangalore A Kumble
2010 Chennai Super Kings Won by 22 Runs Mumbai Indians SK Raina
2011 Chennai Super Kings Won by 58 Runs Royal Challengers Bangalore M Vijay
2012 Kolkata Knight Riders Won by 5 Wickets Chennai Super Kings MS Bisla
2013 Mumbai Indians Won by 23 Runs Chennai Super Kings KA Pollard
2014 Kolkata Knight Riders Won by 3 Wickets Kings XI Punjab MK Pandey
2015 Mumbai Indians Won by 41 Runs Chennai Super Kings RG Sharma
2016 Sunrisers Hyderabad Won by 8 Runs Royal Challengers Bangalore BCJ Cutting
Time taken: 74.767 seconds, Fetched: 10 row(s)
hive>

     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.