├── .gitattributes ├── .gitignore ├── HDPInstall ├── ambari.repo ├── hdp.repo ├── prepare.sh └── thp.txt ├── MRExamples ├── JsonTrans │ ├── JsonTrans.java │ └── build.sbt ├── LineCount │ ├── LineCount.java │ └── build.sbt ├── PlaytimeAVG │ ├── PlaytimeAVG.java │ └── build.sbt ├── PlaytimeAVGByVideo │ ├── PlaytimeAVGByVideo.java │ └── build.sbt ├── RecordFilter │ ├── RecordFilter.java │ └── build.sbt └── VideoSession.dat └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # Windows shortcuts 18 | *.lnk 19 | 20 | # ========================= 21 | # Operating System Files 22 | # ========================= 23 | 24 | # OSX 25 | # ========================= 26 | 27 | .DS_Store 28 | .AppleDouble 29 | .LSOverride 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear in the root of a volume 35 | .DocumentRevisions-V100 36 | .fseventsd 37 | .Spotlight-V100 38 | .TemporaryItems 39 | .Trashes 40 | .VolumeIcon.icns 41 | 42 | # Directories potentially created on remote AFP share 43 | .AppleDB 44 | .AppleDesktop 45 | Network Trash Folder 46 | Temporary Items 47 | .apdisk 48 | -------------------------------------------------------------------------------- /HDPInstall/ambari.repo: -------------------------------------------------------------------------------- 1 | [Ambari-2.4.2.0] 2 | name=Ambari-2.4.2.0 3 | baseurl=http://hdp.learningjournal.local/AMBARI-2.4.2.0/centos6/2.4.2.0-136 4 | gpgcheck=0 5 | enabled=1 6 | priority=1 -------------------------------------------------------------------------------- /HDPInstall/hdp.repo: -------------------------------------------------------------------------------- 1 | [HDP-2.5.3.0] 2 | name=HDP-2.5.3.0 3 | baseurl=http://hdp.learningjournal.local/HDP/centos6 4 | gpgcheck=0 5 | enabled=1 6 | priority=1 7 | 8 | 9 | [HDP-UTILS-1.1.0.21] 10 | name=HDP-UTILS-1.1.0.21 11 | baseurl=http://hdp.learningjournal.local/HDP-UTILS-1.1.0.21/repos/centos6 12 | gpgcheck=0 13 | enabled=1 14 | priority=1 -------------------------------------------------------------------------------- /HDPInstall/prepare.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | HOST_NAME=hdp.learningjournal.local 4 | SHORT_NAME=hdp 5 | read dummy IP_ADDRESS <<< $(hostname -I) 6 | echo $IP_ADDRESS $HOST_NAME $SHORT_NAME >> /etc/hosts 7 | sed -i "s/HOSTNAME=localhost.localdomain/HOSTNAME=$HOST_NAME/g" /etc/sysconfig/network 8 | hostname $HOST_NAME 9 | service network restart 10 | 11 | ssh-keygen 12 | cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys 13 | chmod 700 ~/.ssh 14 | chmod 600 ~/.ssh/authorized_keys 15 | 16 | ulimit -n 10000 17 | service ntpd start 18 | chkconfig ntpd on 19 | service iptables stop 20 | chkconfig iptables off 21 | service ip6tables stop 22 | chkconfig ip6tables off 23 | setenforce 0 24 | sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config 25 | sed -i 's/enabled=1/enabled=0/g' /etc/yum/pluginconf.d/refresh-packagekit.conf 26 | service httpd start 27 | chkconfig httpd on 28 | service sshd start 29 | chkconfig sshd on 30 | cat thp.txt >> /etc/rc.local 31 | 32 | tar -zxvf ambari-2.4.2.0-centos6.tar.gz -C /var/www/html/ 33 | tar -zxvf HDP-UTILS-1.1.0.21-centos6.tar.gz -C /var/www/html/ 34 | tar -zxvf HDP-2.5.3.0-centos6-rpm.tar.gz -C /var/www/html/ 35 | cp *.repo /etc/yum.repos.d/ 36 | reboot 37 | -------------------------------------------------------------------------------- /HDPInstall/thp.txt: -------------------------------------------------------------------------------- 1 | if test -f /sys/kernel/mm/transparent_hugepage/enabled; 2 | then echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled 3 | fi 4 | if test -f /sys/kernel/mm/transparent_hugepage/defrag; 5 | then echo never > /sys/kernel/mm/redhat_transparent_hugepage/defrag 6 | fi 7 | -------------------------------------------------------------------------------- /MRExamples/JsonTrans/JsonTrans.java: -------------------------------------------------------------------------------- 1 | import java.util.Calendar; 2 | import java.text.DateFormat; 3 | import java.text.SimpleDateFormat; 4 | import java.io.IOException; 5 | import org.apache.hadoop.conf.Configuration; 6 | import org.apache.hadoop.conf.Configured; 7 | import org.apache.hadoop.fs.Path; 8 | import org.apache.hadoop.io.LongWritable; 9 | import org.apache.hadoop.io.Text; 10 | import org.apache.hadoop.mapreduce.Job; 11 | import org.apache.hadoop.mapreduce.Mapper; 12 | import org.apache.hadoop.mapreduce.Reducer; 13 | import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; 14 | import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; 15 | import org.apache.log4j.Logger; 16 | import org.json.simple.JSONObject; 17 | import org.apache.hadoop.util.Tool; 18 | import org.apache.hadoop.util.ToolRunner; 19 | 20 | public class JsonTrans extends Configured implements Tool{ 21 | 22 | public static class JsonTransMapper 23 | extends Mapper{ 24 | 25 | private Logger logger = Logger.getLogger(JsonTransMapper.class); 26 | 27 | public void map(Object key, Text value, Context context 28 | ) throws IOException, InterruptedException { 29 | try{ 30 | JSONObject jobj = new JSONObject(); 31 | String[] fields = value.toString().split(","); 32 | DateFormat df = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); 33 | Calendar startTime = Calendar.getInstance(); 34 | startTime.setTime(df.parse(fields[4])); 35 | Calendar endTime = Calendar.getInstance(); 36 | endTime.setTime(df.parse(fields[5])); 37 | long playtime = (endTime.getTimeInMillis()- startTime.getTimeInMillis())/1000; 38 | if (playtime>0){ 39 | jobj.put("User ID",fields[0]); 40 | jobj.put("Video ID",fields[1]); 41 | jobj.put("Session ID",fields[2]); 42 | jobj.put("IP",fields[3]); 43 | jobj.put("Start Time",startTime.getTime()); 44 | jobj.put("End Time",endTime.getTime()); 45 | jobj.put("Player",fields[6]); 46 | jobj.put("Play Mode",fields[7]); 47 | logger.info(jobj.toString()); 48 | context.write(null, new Text(jobj.toString())); 49 | } 50 | }catch(Exception e){ 51 | logger.error(e.getMessage()); 52 | } 53 | } 54 | } 55 | 56 | 57 | public static void main(String[] args) throws Exception { 58 | int exitCode = ToolRunner.run(new JsonTrans(),args); 59 | System.exit(exitCode); 60 | } 61 | 62 | public int run(String[] args) throws Exception { 63 | if (args.length < 2) { 64 | System.err.println("Usage: JsonTrans [Generic Options] "); 65 | return -1; 66 | } 67 | Configuration conf = getConf(); 68 | Job job = Job.getInstance(conf, "Json Trans"); 69 | job.setJarByClass(JsonTrans.class); 70 | job.setMapperClass(JsonTransMapper.class); 71 | job.setOutputKeyClass(Text.class); 72 | job.setOutputValueClass(Text.class); 73 | job.setNumReduceTasks(0); 74 | FileInputFormat.addInputPath(job, new Path(args[0])); 75 | FileOutputFormat.setOutputPath(job, new Path(args[1])); 76 | 77 | return job.waitForCompletion(true) ? 0 : 1; 78 | } 79 | } 80 | 81 | -------------------------------------------------------------------------------- /MRExamples/JsonTrans/build.sbt: -------------------------------------------------------------------------------- 1 | name := "jsontrans" 2 | version := "1.0" 3 | scalaVersion := "2.10.6" 4 | resolvers += "Hortonworks Releases" at "http://repo.hortonworks.com/content/groups/public" 5 | libraryDependencies += "org.apache.hadoop" % "hadoop-common" % "2.7.3.2.5.3.0-37" 6 | libraryDependencies += "org.apache.hadoop" % "hadoop-mapreduce-client-core" % "2.7.3.2.5.3.0-37" 7 | libraryDependencies += "com.googlecode.json-simple" % "json-simple" % "1.1.1" 8 | -------------------------------------------------------------------------------- /MRExamples/LineCount/LineCount.java: -------------------------------------------------------------------------------- 1 | import java.io.IOException; 2 | import org.apache.hadoop.conf.Configuration; 3 | import org.apache.hadoop.fs.Path; 4 | import org.apache.hadoop.io.IntWritable; 5 | import org.apache.hadoop.io.Text; 6 | import org.apache.hadoop.mapreduce.Job; 7 | import org.apache.hadoop.mapreduce.Mapper; 8 | import org.apache.hadoop.mapreduce.Reducer; 9 | import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; 10 | import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; 11 | 12 | public class LineCount { 13 | 14 | public static class LineCountMapper 15 | extends Mapper{ 16 | 17 | public void map(Object key, Text value, Context context 18 | ) throws IOException, InterruptedException { 19 | 20 | String line = value.toString(); 21 | if (line != null && !line.isEmpty()) 22 | context.write(new Text("No of Lines"), new IntWritable(1)); 23 | } 24 | } 25 | 26 | public static class LineCountReducer 27 | extends Reducer { 28 | private IntWritable result = new IntWritable(); 29 | 30 | public void reduce(Text key, Iterable values, 31 | Context context 32 | ) throws IOException, InterruptedException { 33 | int sum = 0; 34 | for (IntWritable val : values) { 35 | sum += val.get(); 36 | } 37 | result.set(sum); 38 | context.write(key, result); 39 | } 40 | } 41 | 42 | public static void main(String[] args) throws Exception { 43 | Configuration conf = new Configuration(); 44 | Job job = Job.getInstance(conf, "line count"); 45 | job.setJarByClass(LineCount.class); 46 | job.setMapperClass(LineCountMapper.class); 47 | job.setCombinerClass(LineCountReducer.class); 48 | job.setReducerClass(LineCountReducer.class); 49 | job.setOutputKeyClass(Text.class); 50 | job.setOutputValueClass(IntWritable.class); 51 | FileInputFormat.addInputPath(job, new Path(args[0])); 52 | FileOutputFormat.setOutputPath(job, new Path(args[1])); 53 | System.exit(job.waitForCompletion(true) ? 0 : 1); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /MRExamples/LineCount/build.sbt: -------------------------------------------------------------------------------- 1 | name := "MRExample" 2 | 3 | version := "1.0" 4 | 5 | scalaVersion := "2.10.6" 6 | 7 | resolvers += "Hortonworks Releases" at "http://repo.hortonworks.com/content/groups/public" 8 | 9 | libraryDependencies += "org.apache.hadoop" % "hadoop-common" % "2.7.3.2.5.3.0-37" 10 | libraryDependencies += "org.apache.hadoop" % "hadoop-mapreduce-client-core" % "2.7.3.2.5.3.0-37" 11 | -------------------------------------------------------------------------------- /MRExamples/PlaytimeAVG/PlaytimeAVG.java: -------------------------------------------------------------------------------- 1 | import java.util.Calendar; 2 | import java.text.DateFormat; 3 | import java.text.SimpleDateFormat; 4 | import java.io.IOException; 5 | import org.apache.hadoop.conf.Configuration; 6 | import org.apache.hadoop.fs.Path; 7 | import org.apache.hadoop.io.LongWritable; 8 | import org.apache.hadoop.io.Text; 9 | import org.apache.hadoop.mapreduce.Job; 10 | import org.apache.hadoop.mapreduce.Mapper; 11 | import org.apache.hadoop.mapreduce.Reducer; 12 | import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; 13 | import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; 14 | import org.apache.log4j.Logger; 15 | 16 | public class PlaytimeAVG { 17 | 18 | public static class PlaytimeAVGMapper 19 | extends Mapper{ 20 | 21 | private Logger logger = Logger.getLogger(PlaytimeAVGMapper.class); 22 | 23 | public void map(Object key, Text value, Context context 24 | ) throws IOException, InterruptedException { 25 | try{ 26 | Calendar startTime = Calendar.getInstance(); 27 | Calendar endTime = Calendar.getInstance(); 28 | DateFormat df = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); 29 | 30 | String[] fields = value.toString().split(","); 31 | 32 | startTime.setTime(df.parse(fields[4])); 33 | endTime.setTime(df.parse(fields[5])); 34 | 35 | long playtime = (endTime.getTimeInMillis()- startTime.getTimeInMillis())/1000; 36 | logger.info("start="+fields[4]+" end="+fields[5]+" diff="+playtime); 37 | 38 | context.write(new Text("Playtime(sec)"), new LongWritable(playtime)); 39 | 40 | }catch(Exception e){ 41 | logger.error(e.getMessage()); 42 | } 43 | } 44 | } 45 | 46 | public static class PlaytimeAVGReducer 47 | extends Reducer { 48 | 49 | public void reduce(Text key, Iterable values, 50 | Context context 51 | ) throws IOException, InterruptedException { 52 | 53 | long avg = 0; 54 | long sum = 0; 55 | long cnt = 0; 56 | 57 | for (LongWritable val : values) { 58 | sum += val.get(); 59 | cnt +=1; 60 | } 61 | avg = sum/cnt; 62 | 63 | context.write(key, new LongWritable(avg)); 64 | } 65 | } 66 | 67 | public static void main(String[] args) throws Exception { 68 | Configuration conf = new Configuration(); 69 | Job job = Job.getInstance(conf, "PLaytime AVG"); 70 | job.setJarByClass(PlaytimeAVG.class); 71 | job.setMapperClass(PlaytimeAVGMapper.class); 72 | job.setReducerClass(PlaytimeAVGReducer.class); 73 | job.setOutputKeyClass(Text.class); 74 | job.setOutputValueClass(LongWritable.class); 75 | FileInputFormat.addInputPath(job, new Path(args[0])); 76 | FileOutputFormat.setOutputPath(job, new Path(args[1])); 77 | 78 | System.exit(job.waitForCompletion(true) ? 0 : 1); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /MRExamples/PlaytimeAVG/build.sbt: -------------------------------------------------------------------------------- 1 | name := "PlaytimeAVG" 2 | 3 | version := "1.0" 4 | 5 | scalaVersion := "2.10.6" 6 | 7 | resolvers += "Hortonworks Releases" at "http://repo.hortonworks.com/content/groups/public" 8 | 9 | libraryDependencies += "org.apache.hadoop" % "hadoop-common" % "2.7.3.2.5.3.0-37" 10 | libraryDependencies += "org.apache.hadoop" % "hadoop-mapreduce-client-core" % "2.7.3.2.5.3.0-37" 11 | -------------------------------------------------------------------------------- /MRExamples/PlaytimeAVGByVideo/PlaytimeAVGByVideo.java: -------------------------------------------------------------------------------- 1 | import java.util.Calendar; 2 | import java.text.DateFormat; 3 | import java.text.SimpleDateFormat; 4 | import java.io.IOException; 5 | import org.apache.hadoop.conf.Configuration; 6 | import org.apache.hadoop.fs.Path; 7 | import org.apache.hadoop.io.LongWritable; 8 | import org.apache.hadoop.io.Text; 9 | import org.apache.hadoop.mapreduce.Job; 10 | import org.apache.hadoop.mapreduce.Mapper; 11 | import org.apache.hadoop.mapreduce.Reducer; 12 | import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; 13 | import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; 14 | import org.apache.log4j.Logger; 15 | 16 | public class PlaytimeAVGByVideo{ 17 | 18 | public static class PlaytimeAVGByVideoMapper 19 | extends Mapper{ 20 | 21 | private Logger logger = Logger.getLogger(PlaytimeAVGByVideoMapper.class); 22 | 23 | public void map(Object key, Text value, Context context 24 | ) throws IOException, InterruptedException { 25 | try{ 26 | String[] fields = value.toString().split(","); 27 | DateFormat df = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); 28 | Calendar startTime = Calendar.getInstance(); 29 | startTime.setTime(df.parse(fields[4])); 30 | Calendar endTime = Calendar.getInstance(); 31 | endTime.setTime(df.parse(fields[5])); 32 | long playtime = (endTime.getTimeInMillis()- startTime.getTimeInMillis())/1000; 33 | logger.info("Video ID= "+fields[1]+ " start="+fields[4]+" end="+fields[5]+" diff="+playtime); 34 | 35 | context.write(new Text(fields[1]), new LongWritable(playtime)); 36 | }catch(Exception e){ 37 | logger.error(e.getMessage()); 38 | } 39 | } 40 | } 41 | 42 | public static class PlaytimeAVGByVideoReducer 43 | extends Reducer { 44 | 45 | public void reduce(Text key, Iterable values, 46 | Context context 47 | ) throws IOException, InterruptedException { 48 | 49 | long avg = 0; 50 | long sum = 0; 51 | long cnt = 0; 52 | 53 | for (LongWritable val : values) { 54 | sum += val.get(); 55 | cnt +=1; 56 | } 57 | avg = sum/cnt; 58 | 59 | context.write(key, new LongWritable(avg)); 60 | } 61 | } 62 | 63 | public static void main(String[] args) throws Exception { 64 | Configuration conf = new Configuration(); 65 | Job job = Job.getInstance(conf, "Playtime AVG By Video"); 66 | job.setJarByClass(PlaytimeAVGByVideo.class); 67 | job.setMapperClass(PlaytimeAVGByVideoMapper.class); 68 | job.setReducerClass(PlaytimeAVGByVideoReducer.class); 69 | job.setOutputKeyClass(Text.class); 70 | job.setOutputValueClass(LongWritable.class); 71 | FileInputFormat.addInputPath(job, new Path(args[0])); 72 | FileOutputFormat.setOutputPath(job, new Path(args[1])); 73 | 74 | System.exit(job.waitForCompletion(true) ? 0 : 1); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /MRExamples/PlaytimeAVGByVideo/build.sbt: -------------------------------------------------------------------------------- 1 | name := "PlaytimeAVGByVideo" 2 | 3 | version := "1.0" 4 | 5 | scalaVersion := "2.10.6" 6 | 7 | resolvers += "Hortonworks Releases" at "http://repo.hortonworks.com/content/groups/public" 8 | 9 | libraryDependencies += "org.apache.hadoop" % "hadoop-common" % "2.7.3.2.5.3.0-37" 10 | libraryDependencies += "org.apache.hadoop" % "hadoop-mapreduce-client-core" % "2.7.3.2.5.3.0-37" 11 | -------------------------------------------------------------------------------- /MRExamples/RecordFilter/RecordFilter.java: -------------------------------------------------------------------------------- 1 | import java.util.Calendar; 2 | import java.text.DateFormat; 3 | import java.text.SimpleDateFormat; 4 | import java.io.IOException; 5 | import org.apache.hadoop.conf.Configuration; 6 | import org.apache.hadoop.fs.Path; 7 | import org.apache.hadoop.io.LongWritable; 8 | import org.apache.hadoop.io.Text; 9 | import org.apache.hadoop.mapreduce.Job; 10 | import org.apache.hadoop.mapreduce.Mapper; 11 | import org.apache.hadoop.mapreduce.Reducer; 12 | import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; 13 | import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; 14 | import org.apache.log4j.Logger; 15 | 16 | public class RecordFilter { 17 | 18 | public static class RecordFilterMapper 19 | extends Mapper{ 20 | 21 | private Logger logger = Logger.getLogger(RecordFilterMapper.class); 22 | 23 | public void map(Object key, Text value, Context context 24 | ) throws IOException, InterruptedException { 25 | try{ 26 | String[] fields = value.toString().split(","); 27 | DateFormat df = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); 28 | Calendar startTime = Calendar.getInstance(); 29 | startTime.setTime(df.parse(fields[4])); 30 | Calendar endTime = Calendar.getInstance(); 31 | endTime.setTime(df.parse(fields[5])); 32 | long playtime = (endTime.getTimeInMillis()- startTime.getTimeInMillis())/1000; 33 | if (playtime<0){ 34 | logger.info("Invalid-> "+ " start="+fields[4]+" end="+fields[5]+" diff="+playtime); 35 | context.write(new Text("Invalid"), value); 36 | }else{ 37 | logger.info("Valid-> "+ " start="+fields[4]+" end="+fields[5]+" diff="+playtime); 38 | context.write(new Text("Valid"), value); 39 | } 40 | 41 | }catch(Exception e){ 42 | logger.error(e.getMessage()); 43 | } 44 | } 45 | } 46 | 47 | public static class RecordFilterReducer 48 | extends Reducer { 49 | 50 | public void reduce(Text key, Iterable values, 51 | Context context 52 | ) throws IOException, InterruptedException { 53 | 54 | for(Text val : values) { 55 | context.write(null, val); 56 | } 57 | } 58 | } 59 | 60 | public static void main(String[] args) throws Exception { 61 | Configuration conf = new Configuration(); 62 | Job job = Job.getInstance(conf, "Record Filter"); 63 | job.setJarByClass(RecordFilter.class); 64 | job.setMapperClass(RecordFilterMapper.class); 65 | job.setReducerClass(RecordFilterReducer.class); 66 | job.setOutputKeyClass(Text.class); 67 | job.setOutputValueClass(Text.class); 68 | job.setNumReduceTasks(2); 69 | FileInputFormat.addInputPath(job, new Path(args[0])); 70 | FileOutputFormat.setOutputPath(job, new Path(args[1])); 71 | System.exit(job.waitForCompletion(true) ? 0 : 1); 72 | } 73 | } 74 | 75 | 76 | -------------------------------------------------------------------------------- /MRExamples/RecordFilter/build.sbt: -------------------------------------------------------------------------------- 1 | name := "RecordFilter" 2 | 3 | version := "1.0" 4 | 5 | scalaVersion := "2.10.6" 6 | 7 | resolvers += "Hortonworks Releases" at "http://repo.hortonworks.com/content/groups/public" 8 | 9 | libraryDependencies += "org.apache.hadoop" % "hadoop-common" % "2.7.3.2.5.3.0-37" 10 | libraryDependencies += "org.apache.hadoop" % "hadoop-mapreduce-client-core" % "2.7.3.2.5.3.0-37" 11 | -------------------------------------------------------------------------------- /MRExamples/VideoSession.dat: -------------------------------------------------------------------------------- 1 | UID#1001,VID#12357,SID#1820538279130927,192.168.205.103,2017/03/23 15:05:49,2017/03/23 15:12:42,Player,full screen 2 | UID#1008,VID#12357,SID#8923238569362545,183.164.209.104,2017/03/23 15:07:22,2017/03/23 15:18:93,TV,full screen 3 | UID#2005,VID#12357,SID#1820538259356278,154.163.207.105,2017/03/23 15:38:46,2017/03/23 16:15:16,Player,full screen 4 | UID#9027,VID#12357,SID#8923238569473456,195.162.202.106,2017/03/23 15:14:27,2017/03/23 15:55:28,Player,standard 5 | UID#8920,VID#12357,SID#1820538278462395,176.161.204.107,2017/03/23 15:06:48,2017/03/23 15:24:59,Player,full screen 6 | UID#1027,VID#12357,SID#8923238560473425,157.168.206.108,2017/03/23 15:42:23,2017/03/23 16:12:33,Enbeded,standard 7 | UID#2634,VID#12357,SID#1820538277352828,198.167.206.109,2017/03/23 15:34:42,2017/03/23 15:55:14,Player,full screen 8 | UID#4598,VID#12357,SID#8923238569467390,199.166.209.104,2017/03/23 15:28:27,2017/03/23 15:48:45,Embeded,full screen 9 | UID#2693,VID#12357,SID#1820538279138345,122.165.203.105,2017/03/23 15:52:49,2017/03/23 16:34:50,TV,full screen 10 | UID#2834,VID#12357,SID#8923238568362954,132.164.202.107,2017/03/23 15:21:23,2017/03/23 15:18:29,Player,standard 11 | UID#1001,VID#12365,SID#1883568279150925,193.138.205.103,2017/03/24 19:03:49,2017/03/24 19:12:42,Player,full screen 12 | UID#1008,VID#12365,SID#8923268569372544,184.114.209.104,2017/03/24 19:04:22,2017/03/24 19:18:93,TV,full screen 13 | UID#2005,VID#12365,SID#1829588259356272,156.103.207.105,2017/03/24 19:35:46,2017/03/24 20:15:16,Player,full screen 14 | UID#9027,VID#12365,SID#8928238569423451,197.192.202.106,2017/03/24 19:12:27,2017/03/24 19:55:28,Player,standard 15 | UID#8920,VID#12365,SID#1827548278432390,178.181.204.107,2017/03/24 19:03:48,2017/03/24 19:24:59,Player,full screen 16 | UID#1027,VID#12365,SID#8926258560443429,159.178.206.108,2017/03/24 19:45:23,2017/03/24 20:12:33,Enbeded,standard 17 | UID#2634,VID#12365,SID#1825588277352827,191.167.206.109,2017/03/24 19:31:42,2017/03/24 19:55:14,Player,full screen 18 | UID#4598,VID#12365,SID#8924298569477395,190.156.209.104,2017/03/24 19:22:27,2017/03/24 19:48:45,Embeded,full screen 19 | UID#2693,VID#12365,SID#1823518279188344,123.145.203.105,2017/03/24 19:50:49,2017/03/24 20:34:50,TV,full screen 20 | UID#2834,VID#12365,SID#8922238568392952,132.134.202.107,2017/03/24 19:20:23,2017/03/24 19:18:29,Player,standard 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # HadoopTutorials 2 | Example Code for Hadoop Tutorials @ Learning Journal 3 | Visit https://learningjournal.guru/ for Tutorials 4 | --------------------------------------------------------------------------------