@@ -0,0 +1,1128 @@
+package kick;%0A%0Aimport java.io.File;%0Aimport java.io.IOException;%0A%0Aimport javax.xml.parsers.ParserConfigurationException;%0Aimport javax.xml.parsers.SAXParser;%0Aimport javax.xml.parsers.SAXParserFactory;%0A%0Aimport org.apache.hadoop.io.LongWritable;%0Aimport org.apache.hadoop.io.NullWritable;%0Aimport org.apache.hadoop.io.Text;%0Aimport org.apache.hadoop.mapreduce.Mapper;%0Aimport org.xml.sax.SAXException;%0A%0Apublic class Map extends Mapper%3CLongWritable, Text, Text, Text%3E %7B%0A%09File users=new File(%22hdfs://%C2%ADlocalhost:54310/input/cooking1/users.xml%22);%0A%09FolderHandler handler = new FolderHandler(); %0A%0A%09/**%0A%09 * Given an output filename, write a bunch of random records to it.%0A%09 * @throws SAXException %0A%09 * @throws ParserConfigurationException %0A%09 * @throws InterruptedException %0A%09 */%0A%09@Override%0A%09public void map(LongWritable key, Text value, Context context) throws InterruptedException %7B%0A%09%09try%7B%0A%09%09SAXParser parser = SAXParserFactory.newInstance().newSAXParser();%0A%09%09parser.parse(users,handler);%0A%09%09Text val=new Text(%22yo%22);%0A%09%09if(value != null)%7B%0A%09%09%09context.write(val, handler.getValue());%0A%09%09%7D%0A%09%09%7Dcatch (Exception e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%09%7D%0A%7D%0A

Create Map.java