The document provides instructions for developing MapReduce programs locally and in Eclipse, as well as the source code for a WordCount MapReduce program. It first describes running the WordCount example locally and deleting output files. It then explains how to install and configure Eclipse for MapReduce development. Finally, it includes the Java source code for a WordCount MapReduce program with Mappers, Reducers, and the driver class.
Containers from Scratch: what are they made from?Giri Kuncoro
Talk from Docker meetup Jakarta. Presented and demoed various Linux kernel features that enable container runtime, i.e. chroot, namespaces, cgroups, capabilities.
Containers from Scratch: what are they made from?Giri Kuncoro
Talk from Docker meetup Jakarta. Presented and demoed various Linux kernel features that enable container runtime, i.e. chroot, namespaces, cgroups, capabilities.
Configuration surgery with Augeas (OggCamp 12)Dominic Cleal
Lightning talk for an intro to Augeas at OggCamp 12. Briefly explains the library, examples of what it can do and where it's used. Based on a presentation by Raphaël Pinson (search for RMLL 2012).
More than Applications: (Ab)using Docker to Improve the Portability of Everyt...Dexter Horthy
Slides from Docker Los Angeles meetup on 4/18/2018.
Most of us have used Docker to ship application code from a laptop or a continuous integration system to a production server. But why stop there? In this talk, we will discuss some little known and less commonly understood ways to use Docker to increase portability of everything else. For example, Docker can be used as a portable apt repository to install packages on any server, not only in a container. Another example is to use Docker (and LinuxKit) as a way to distribute Docker images when a registry isn’t available.
*About the Speaker:*
Dex Horthy, is a Core Engineer at Replicated. He has spent the last year designing and writing production grade enterprise software for the Replicated platform, including container orchestration runtimes and custom integrations into the Kubernetes and Docker APIs.
The perl on most linux distros is a mess. Docker makes it easier to build and packge a local perl and applications. Problem is that Docker's manuals produce a mess of their own.
Distributing perl on top of Gentoo's stage3 distro, busybox, or nothing at all made good alternatives. This talk includes basics of setting up docker, building a local perl for it, and packaging perl or applications into images for use in containers.
Configuration surgery with Augeas (OggCamp 12)Dominic Cleal
Lightning talk for an intro to Augeas at OggCamp 12. Briefly explains the library, examples of what it can do and where it's used. Based on a presentation by Raphaël Pinson (search for RMLL 2012).
More than Applications: (Ab)using Docker to Improve the Portability of Everyt...Dexter Horthy
Slides from Docker Los Angeles meetup on 4/18/2018.
Most of us have used Docker to ship application code from a laptop or a continuous integration system to a production server. But why stop there? In this talk, we will discuss some little known and less commonly understood ways to use Docker to increase portability of everything else. For example, Docker can be used as a portable apt repository to install packages on any server, not only in a container. Another example is to use Docker (and LinuxKit) as a way to distribute Docker images when a registry isn’t available.
*About the Speaker:*
Dex Horthy, is a Core Engineer at Replicated. He has spent the last year designing and writing production grade enterprise software for the Replicated platform, including container orchestration runtimes and custom integrations into the Kubernetes and Docker APIs.
The perl on most linux distros is a mess. Docker makes it easier to build and packge a local perl and applications. Problem is that Docker's manuals produce a mess of their own.
Distributing perl on top of Gentoo's stage3 distro, busybox, or nothing at all made good alternatives. This talk includes basics of setting up docker, building a local perl for it, and packaging perl or applications into images for use in containers.
What would it look like if we encapsulated an entire Haskell development environment in a docker container? How would we deploy that application to production?
PuppetConf 2016: The Challenges with Container Configuration – David Lutterko...Puppet
Here are the slides from David Lutterkort's PuppetConf 2016 presentation called The Challenges with Container Configuration. Watch the videos at https://www.youtube.com/playlist?list=PLV86BgbREluVjwwt-9UL8u2Uy8xnzpIqa
Introducing containers into your infrastructure brings new capabilities, but also new challenges, in particular around configuration. This talk will take a look under the hood at some of those operational challenges including:
* The difference between runtime and build-time configuration, and the importance of relating the two together.
* Configuration drift, immutable mental models and mutable container file systems.
* Who configures the orchestrators?
* Emergent vs. model driven configuration.
In the process we will identify some common problems and talk about potential solutions.
Talk from PuppetConf 2016
This talk will give you tips and tricks to get better build time performance and smaller images. The most important take-away is: you should be using multi-stage Dockerfiles and enable BuildKit.
4. WordCount.java
import java.io.IOException;
import java.util.*;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.conf.*;
import org.apache.hadoop.io.*;
import org.apache.hadoop.mapred.*;
import org.apache.hadoop.util.*;
public class WordCount {
public static class Map extends MapReduceBase implements
Mapper<LongWritable, Text, Text, IntWritable> {
private final static IntWritable one = new IntWritable(1);
private Text word = new Text();
public void map(LongWritable key, Text value, OutputCollector<Text,
IntWritable> output, Reporter reporter) throws IOException {
String line = value.toString();
StringTokenizer tokenizer = new StringTokenizer(line);
while (tokenizer.hasMoreTokens()) {
word.set(tokenizer.nextToken());
output.collect(word, new IntWritable(1));
}
}
}
5. public static class Reduce extends MapReduceBase implements Reducer<Text,
IntWritable, Text, IntWritable> {
public void reduce(Text key, Iterator<IntWritable> values,
OutputCollector<Text, IntWritable> output, Reporter reporter) throws
IOException {
int sum = 0;
while (values.hasNext()) {
sum += values.next().get();
}
output.collect(key, new IntWritable(sum));
}
}
public static void main(String[] args) throws Exception {
JobConf conf = new JobConf(WordCount.class);
conf.setJobName("wordcount");
conf.setOutputKeyClass(Text.class);
conf.setOutputValueClass(IntWritable.class);
conf.setMapperClass(Map.class);
conf.setCombinerClass(Reduce.class);
conf.setReducerClass(Reduce.class);
conf.setInputFormat(TextInputFormat.class);
conf.setOutputFormat(TextOutputFormat.class);
FileInputFormat.addInputPath(conf, new Path(args[0]));
FileOutputFormat.setOutputPath(conf, new Path(args[1]));
JobClient.runJob(conf);
}
}