@@ -0,0 +1,2204 @@
+// Copyright (C) 2011 Splunk Inc.%0A//%0A// Splunk Inc. licenses this file%0A// to you under the Apache License, Version 2.0 (the%0A// %22License%22); you may not use this file except in compliance%0A// with the License.  You may obtain a copy of the License at%0A//%0A//     http://www.apache.org/licenses/LICENSE-2.0%0A//%0A// Unless required by applicable law or agreed to in writing, software%0A// distributed under the License is distributed on an %22AS IS%22 BASIS,%0A// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A// See the License for the specific language governing permissions and%0A// limitations under the License.%0Apackage com.splunk.shep.mapreduce.lib.rest.tests;%0A%0Aimport java.io.IOException;%0A%0Aimport org.apache.hadoop.fs.Path;%0Aimport org.apache.hadoop.io.LongWritable;%0Aimport org.apache.hadoop.io.NullWritable;%0Aimport org.apache.hadoop.io.Text;%0Aimport org.apache.hadoop.mapred.FileInputFormat;%0Aimport org.apache.hadoop.mapred.FileOutputFormat;%0Aimport org.apache.hadoop.mapred.JobClient;%0Aimport org.apache.hadoop.mapred.JobConf;%0Aimport org.apache.hadoop.mapred.MapReduceBase;%0Aimport org.apache.hadoop.mapred.Mapper;%0Aimport org.apache.hadoop.mapred.OutputCollector;%0Aimport org.apache.hadoop.mapred.Reporter;%0Aimport org.apache.hadoop.mapred.TextOutputFormat;%0A%0Apublic class SplunkEventReader %7B%0A    public static class Map extends MapReduceBase implements%0A%09    Mapper%3CLongWritable, Text, Text, NullWritable%3E %7B%0A%0A%09public void map(LongWritable key, Text value,%0A%09%09OutputCollector%3CText, NullWritable%3E output, Reporter reporter)%0A%09%09throws IOException %7B%0A%09    NullWritable nullwr = new NullWritable();%0A%09    output.collect(value, %22null%22);%0A%09%7D%0A    %7D%0A%0A%0A    public static void main(String%5B%5D args) throws Exception %7B%0A%09JobConf conf = new JobConf(WikiLinkCount.class);%0A%09conf.setJobName(%22SplunkEventReader%22);%0A%09conf.setOutputKeyClass(Text.class);%0A%09conf.setOutputValueClass(NullWritable.class);%0A%0A%09conf.setMapperClass(Map.class);%0A%0A%09conf.setInputFormat(com.splunk.shep.mapreduce.lib.rest.SplunkEventsInputFormat.class);%0A%09conf.setOutputFormat(TextOutputFormat.class);%0A%0A%0A%09FileInputFormat.setInputPaths(conf, new Path(args%5B0%5D));%0A%09FileOutputFormat.setOutputPath(conf, new Path(args%5B1%5D));%0A%0A%09JobClient.runJob(conf);%0A    %7D%0A%0A%7D%0A

test reader