Hadoop基础-MapReduce的排序

                    Hadoop基础-MapReduce的排序

                                      作者:尹正杰

版权声明:原创作品,谢绝转载!否则将追究法律责任。

 

 

 

一.MapReduce的排序分类

 

1>.部分排序

  部分排序是对单个分区进行排序,举个简单的例子,第一个分区中的数据为1,3,5;而第二个分区为2,4,这两个分区的值看起来是没有连续性的,但是每个分区中的数据又是排序的!下面是我画的一个草图:

2>.全排序

  全排序是对所有分区中的数据均排序,比如第一个分区的值为1,2,3,而第二个分区为4,5 很显然2个分区是经过排序的,可以明显的看清楚每个分区的具体的取值规范。下面是我画的一个草图:

3>.二次排序

  二次排序是指对key排序的基础上,对value进行排序。

 

二.全排序的实现方案

26 May, 2017: Release 3.0.0-alpha3 available
This is a security release in the 3.0.0 release line. It consists of alpha2 plus security fixes, along with necessary build-related fixes. Users on 3.0.0-alpha1 and 3.0.0-alpha2 are encouraged to upgrade to 3.0.0-alpha3.

Please note that alpha releases come with no guarantees of quality or API stability, and are not intended for production use.

Users are encouraged to read the overview of major changes coming in 3.0.0. The alpha3 release notes and changelog detail the changes since 3.0.0-alpha2.
wordCount.txt 文件内容

 1>.一个Reduce实现全排序

  缺点:单个节点负载较高!如果计算数据较大,那么会浪费很长的时间!不推荐使用!

 1 /*
 2 @author :yinzhengjie
 3 Blog:http://www.cnblogs.com/yinzhengjie/tag/Hadoop%E8%BF%9B%E9%98%B6%E4%B9%8B%E8%B7%AF/
 4 EMAIL:y1053419035@qq.com
 5 */
 6 package cn.org.yinzhengjie.mapreduce.wordcount;
 7 
 8 import org.apache.hadoop.io.IntWritable;
 9 import org.apache.hadoop.io.LongWritable;
10 import org.apache.hadoop.io.Text;
11 import org.apache.hadoop.mapreduce.Mapper;
12 
13 import java.io.IOException;
14 
15 /**
16  *      我们定义的map端类为WordCountMap,它需要继承“org.apache.hadoop.mapreduce.Mapper.Mapper”,
17  * 该Mapper有四个参数,前两个参数是指定map端输入key和value的数据类型,而后两个参数是指定map端输出
18  * key和value的数据类型。
19  */
20 public class WordCountMap extends Mapper<LongWritable,Text,Text,IntWritable> {
21 
22     /**
23      *
24      * @param key               : 表示输入的key变量。
25      * @param value             : 表示输入的value
26      * @param context           : 表示map端的上下文,它是负责将map端数据传给reduce。
27      */
28     protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {
29 
30         //得到一行数据
31         String line = value.toString();
32         //以空格切开一行的数据
33         String[] arr = line.split(" ");
34         for (String word:arr){
35             //遍历arr中的每个元素,并对每个元素赋初值为1,然后在将数据传给reduce端
36             context.write(new Text(word),new IntWritable(1));
37         }
38     }
39 }
WordCountMap.java 文件内容
 1 /*
 2 @author :yinzhengjie
 3 Blog:http://www.cnblogs.com/yinzhengjie/tag/Hadoop%E8%BF%9B%E9%98%B6%E4%B9%8B%E8%B7%AF/
 4 EMAIL:y1053419035@qq.com
 5 */
 6 package cn.org.yinzhengjie.mapreduce.wordcount;
 7 
 8 import org.apache.hadoop.io.IntWritable;
 9 import org.apache.hadoop.io.Text;
10 import org.apache.hadoop.mapreduce.Reducer;
11 import java.io.IOException;
12 
13 /**
14  *      我们定义的reduce端类为WordCountReduce,它需要继承“org.apache.hadoop.mapreduce.Reducer.Reducer”,
15  * 该Reducer有四个参数,前两个参数是指定map端输入key和value的数据类型,而后两个参数是指定map端输出
16  * key和value的数据类型。
17  */
18 public class WordCountReduce extends Reducer<Text,IntWritable,Text,IntWritable> {
19     /**
20      *
21      * @param key               :  表示输入的key变量。
22      * @param values            : 表示输入的value,这个变量是可迭代的,因此传递的是多个值。
23      * @param context           : 表示reduce端的上下文,它是负责将reduce端数据传给调用者(调用者可以传递的数据输出到文件,也可以输出到下一个MapReduce程序。
24      */
25     protected void reduce(Text key, Iterable<IntWritable> values, Context context) throws IOException, InterruptedException {
26         //定义一个单词计数器
27         Integer count = 0;
28         //由于输入端只有一个key,因此value的所有值都属于这个key的,我们需要做的是对value进行遍历并将所有数据进行相加操作,最终的结果就得到了同一个key的出现的次数。
29         for (IntWritable value : values){
30             //获取到value的get方法获取到value的值。
31             count += value.get();
32         }
33         //我们将key原封不动的返回,并将key的values的所有int类型的参数进行折叠,最终返回单词书以及该单词总共出现的次数。
34         context.write(key,new IntWritable(count));
35     }
36 }
WordCountReduce.java 文件内容
 1 /*
 2 @author :yinzhengjie
 3 Blog:http://www.cnblogs.com/yinzhengjie/tag/Hadoop%E8%BF%9B%E9%98%B6%E4%B9%8B%E8%B7%AF/
 4 EMAIL:y1053419035@qq.com
 5 */
 6 package cn.org.yinzhengjie.mapreduce.wordcount;
 7 
 8 import org.apache.hadoop.conf.Configuration;
 9 import org.apache.hadoop.fs.FileSystem;
10 import org.apache.hadoop.fs.Path;
11 import org.apache.hadoop.io.IntWritable;
12 import org.apache.hadoop.io.Text;
13 import org.apache.hadoop.mapreduce.Job;
14 import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
15 import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
16 
17 import java.io.IOException;
18 
19 public class WordCountApp {
20 
21     public static void main(String[] args) throws IOException, ClassNotFoundException, InterruptedException {
22         //实例化一个Configuration,它会自动去加载本地的core-site.xml配置文件的fs.defaultFS属性。(该文件放在项目的resources目录即可。)
23         Configuration conf = new Configuration();
24         //将hdfs写入的路径定义在本地,需要修改默认为文件系统,这样就可以覆盖到之前在core-site.xml配置文件读取到的数据。
25         conf.set("fs.defaultFS","file:///");
26         //代码的入口点,初始化HDFS文件系统,此时我们需要把读取到的fs.defaultFS属性传给fs对象。
27         FileSystem fs = FileSystem.get(conf);
28         //创建一个任务对象job,别忘记把conf穿进去哟!
29         Job job = Job.getInstance(conf);
30         //给任务起个名字
31         job.setJobName("WordCount");
32         //指定main函数所在的类,也就是当前所在的类名
33         job.setJarByClass(WordCountApp.class);
34         //指定map的类名,这里指定咱们自定义的map程序即可
35         job.setMapperClass(WordCountMap.class);
36         //指定reduce的类名,这里指定咱们自定义的reduce程序即可
37         job.setReducerClass(WordCountReduce.class);
38         //设置输出key的数据类型
39         job.setOutputKeyClass(Text.class);
40         //设置输出value的数据类型
41         job.setOutputValueClass(IntWritable.class);
42         //设置输入路径,需要传递两个参数,即任务对象(job)以及输入路径
43         FileInputFormat.addInputPath(job,new Path("D:\\10.Java\\IDE\\yhinzhengjieData\\MyHadoop\\MapReduce\\wordCount.txt"));
44         //设置输出路径,需要传递两个参数,即任务对象(job)以及输出路径
45         Path localPath = new Path("D:\\10.Java\\IDE\\yhinzhengjieData\\MyHadoop\\MapReduce\\CountOut");
46         if (fs.exists(localPath)){
47             fs.delete(localPath,true);
48         }
49         FileOutputFormat.setOutputPath(job,localPath);
50         //设置1个Reduce任务,这样就可以生成的数据会被保存在1个文件中,从而实现了全排序!
51         job.setNumReduceTasks(1);
52         //等待任务执行结束,将里面的值设置为true。
53         job.waitForCompletion(true);
54     }
55 }
WordCountApp.java 文件内容

  执行以上代码后,会生成1个分区文件,如下:

 1     2
 2 2017:    1
 3 26    1
 4 3.0.0    1
 5 3.0.0-alpha1    1
 6 3.0.0-alpha2    1
 7 3.0.0-alpha2.    1
 8 3.0.0-alpha3    1
 9 3.0.0-alpha3.    1
10 3.0.0.    1
11 API    1
12 It    1
13 May,    1
14 Please    1
15 Release    1
16 The    1
17 This    1
18 Users    2
19 a    1
20 along    1
21 alpha    1
22 alpha2    1
23 alpha3    1
24 and    3
25 are    3
26 available    1
27 build-related    1
28 changelog    1
29 changes    2
30 come    1
31 coming    1
32 consists    1
33 detail    1
34 encouraged    2
35 fixes,    1
36 fixes.    1
37 for    1
38 guarantees    1
39 in    2
40 intended    1
41 is    1
42 line.    1
43 major    1
44 necessary    1
45 no    1
46 not    1
47 note    1
48 notes    1
49 of    3
50 on    1
51 or    1
52 overview    1
53 plus    1
54 production    1
55 quality    1
56 read    1
57 release    3
58 releases    1
59 security    2
60 since    1
61 stability,    1
62 that    1
63 the    3
64 to    3
65 upgrade    1
66 use.    1
67 with    2
part-r-00000 文件内容

2>.自定义分区函数进行排序

  自定义分区函数需要划分key空间,按照范围指定分区索引。缺点:需要准确估算key的范围,否则容易导致数据倾斜。如果你对业务把控不是很准确的话,这种方法也不推荐使用!

 1 /*
 2 @author :yinzhengjie
 3 Blog:http://www.cnblogs.com/yinzhengjie/tag/Hadoop%E8%BF%9B%E9%98%B6%E4%B9%8B%E8%B7%AF/
 4 EMAIL:y1053419035@qq.com
 5 */
 6 package cn.org.yinzhengjie.mapreduce.full;
 7 
 8 import org.apache.hadoop.io.IntWritable;
 9 import org.apache.hadoop.io.LongWritable;
10 import org.apache.hadoop.io.Text;
11 import org.apache.hadoop.mapreduce.Mapper;
12 
13 import java.io.IOException;
14 
15 public class FullMapper extends Mapper<LongWritable, Text, Text, IntWritable> {
16 
17     @Override
18     protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {
19 
20         //得到一行数据
21         String line = value.toString();
22 
23         String[] arr = line.split(" ");
24 
25         for (String word : arr) {
26             context.write(new Text(word), new IntWritable(1));
27         }
28     }
29 }
FullMapper.java 文件内容
 1 /*
 2 @author :yinzhengjie
 3 Blog:http://www.cnblogs.com/yinzhengjie/tag/Hadoop%E8%BF%9B%E9%98%B6%E4%B9%8B%E8%B7%AF/
 4 EMAIL:y1053419035@qq.com
 5 */
 6 package cn.org.yinzhengjie.mapreduce.full;
 7 
 8 import org.apache.hadoop.io.IntWritable;
 9 import org.apache.hadoop.io.Text;
10 import org.apache.hadoop.mapreduce.Reducer;
11 
12 import java.io.IOException;
13 
14 public class FullReducer extends Reducer<Text, IntWritable , Text, IntWritable> {
15     @Override
16     protected void reduce(Text key, Iterable<IntWritable> values, Context context) throws IOException, InterruptedException {
17         Integer sum = 0;
18         for(IntWritable value : values){
19             sum += value.get();
20         }
21         context.write(key, new IntWritable(sum));
22     }
23 }
FullReducer.java 文件内容
 1 /*
 2 @author :yinzhengjie
 3 Blog:http://www.cnblogs.com/yinzhengjie/tag/Hadoop%E8%BF%9B%E9%98%B6%E4%B9%8B%E8%B7%AF/
 4 EMAIL:y1053419035@qq.com
 5 */
 6 package cn.org.yinzhengjie.mapreduce.full;
 7 
 8 import org.apache.hadoop.io.IntWritable;
 9 import org.apache.hadoop.io.Text;
10 import org.apache.hadoop.mapreduce.Partitioner;
11 
12 public class FullPartition extends Partitioner<Text,IntWritable> {
13 
14     @Override
15     public int getPartition(Text text, IntWritable intWritable, int numPartitions) {
16 
17         String key = text.toString();
18 
19         if(key.compareTo("f") < 0){
20             return 0;
21         }
22         else {
23             return 1;
24         }
25 
26     }
27 }
FullPartition.java 文件内容
 1 /*
 2 @author :yinzhengjie
 3 Blog:http://www.cnblogs.com/yinzhengjie/tag/Hadoop%E8%BF%9B%E9%98%B6%E4%B9%8B%E8%B7%AF/
 4 EMAIL:y1053419035@qq.com
 5 */
 6 package cn.org.yinzhengjie.mapreduce.full;
 7 
 8 import org.apache.hadoop.conf.Configuration;
 9 import org.apache.hadoop.fs.FileSystem;
10 import org.apache.hadoop.fs.Path;
11 import org.apache.hadoop.io.IntWritable;
12 import org.apache.hadoop.io.Text;
13 import org.apache.hadoop.mapreduce.Job;
14 import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
15 import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
16 
17 import java.io.IOException;
18 
19 public class FullApp {
20 
21     public static void main(String[] args) throws IOException, ClassNotFoundException, InterruptedException {
22         //实例化一个Configuration,它会自动去加载本地的core-site.xml配置文件的fs.defaultFS属性。(该文件放在项目的resources目录即可。)
23         Configuration conf = new Configuration();
24         //将hdfs写入的路径定义在本地,需要修改默认为文件系统,这样就可以覆盖到之前在core-site.xml配置文件读取到的数据。
25         conf.set("fs.defaultFS","file:///");
26         //代码的入口点,初始化HDFS文件系统,此时我们需要把读取到的fs.defaultFS属性传给fs对象。
27         FileSystem fs = FileSystem.get(conf);
28         //创建一个任务对象job,别忘记把conf穿进去哟!
29         Job job = Job.getInstance(conf);
30         //给任务起个名字
31         job.setJobName("WordCount");
32         //指定main函数所在的类,也就是当前所在的类名
33         job.setJarByClass(FullApp.class);
34         //指定map的类名,这里指定咱们自定义的map程序即可
35         job.setMapperClass(FullMapper.class);
36         //指定reduce的类名,这里指定咱们自定义的reduce程序即可
37         job.setReducerClass(FullReducer.class);
38         //指定Partition的类名,这里指定咱们自定义的Partition程序即可
39         job.setPartitionerClass(FullPartition.class);
40         //设置输出key的数据类型
41         job.setOutputKeyClass(Text.class);
42         //设置输出value的数据类型
43         job.setOutputValueClass(IntWritable.class);
44         //设置输入路径,需要传递两个参数,即任务对象(job)以及输入路径
45         FileInputFormat.addInputPath(job,new Path("D:\\10.Java\\IDE\\yhinzhengjieData\\MyHadoop\\MapReduce\\wordCount.txt"));
46         //设置输出路径,需要传递两个参数,即任务对象(job)以及输出路径
47         Path localPath = new Path("D:\\10.Java\\IDE\\yhinzhengjieData\\MyHadoop\\MapReduce\\CountOut");
48         if (fs.exists(localPath)){
49             fs.delete(localPath,true);
50         }
51         FileOutputFormat.setOutputPath(job,localPath);
52         //设置2个Reduce任务,这样就可以生成的数据会被保存在2个文件中
53         job.setNumReduceTasks(2);
54         //等待任务执行结束,将里面的值设置为true。
55         job.waitForCompletion(true);
56     }
57 }
FullApp.java 文件内容

  执行以上代码后,会生成2个分区文件,如下:

 1     2
 2 2017:    1
 3 26    1
 4 3.0.0    1
 5 3.0.0-alpha1    1
 6 3.0.0-alpha2    1
 7 3.0.0-alpha2.    1
 8 3.0.0-alpha3    1
 9 3.0.0-alpha3.    1
10 3.0.0.    1
11 API    1
12 It    1
13 May,    1
14 Please    1
15 Release    1
16 The    1
17 This    1
18 Users    2
19 a    1
20 along    1
21 alpha    1
22 alpha2    1
23 alpha3    1
24 and    3
25 are    3
26 available    1
27 build-related    1
28 changelog    1
29 changes    2
30 come    1
31 coming    1
32 consists    1
33 detail    1
34 encouraged    2
part-r-00000 文件内容
fixes,    1
fixes.    1
for    1
guarantees    1
in    2
intended    1
is    1
line.    1
major    1
necessary    1
no    1
not    1
note    1
notes    1
of    3
on    1
or    1
overview    1
plus    1
production    1
quality    1
read    1
release    3
releases    1
security    2
since    1
stability,    1
that    1
the    3
to    3
upgrade    1
use.    1
with    2
part-r-00001 文件内容

3>.采样

  要使用采样的前提是不能使用文本类型,因为文本类型的Key为IntWritable。采样过程是在Mapper之前,采样的目的是为了让各个分区整体上实现全排序。

  a>.随机采样(性能差,适合乱序的源数据

 

1 循环的条件:
2 
3        当前已经扫描的分区数小于SplitToSample或者当前已经扫描的分区数超过了SplitToSample但是小于输出分区总数并且当前的采样数小于最大采样数numSamples。
4 
5 每个分区中记录采样的具体过程如下:
6 
7     从指定分区中取出一条记录,判断得到的随机浮点数是否小于等于采样频率freq,如果大于则放弃这条记录,然后判断当前你的采样是否小于最大采样数,如果小于则这条记录被选中,被放进采样集合中,否则从[0,numSamples]中选择一个随机数,如果这个随机数不等于最大采样数numSamples,则用这条记录替换掉采样集合随机数对应位置的记录,同时采样频率freq较少变为freq*(numSamples-1)/numSamples。然后依次遍历分区中的其它记录。
 1 /*
 2 @author :yinzhengjie
 3 Blog:http://www.cnblogs.com/yinzhengjie/tag/Hadoop%E8%BF%9B%E9%98%B6%E4%B9%8B%E8%B7%AF/
 4 EMAIL:y1053419035@qq.com
 5 */
 6 package cn.org.yinzhengjie.sequencefile;
 7 
 8 import org.apache.hadoop.conf.Configuration;
 9 import org.apache.hadoop.fs.FileSystem;
10 import org.apache.hadoop.fs.Path;
11 import org.apache.hadoop.io.IntWritable;
12 import org.apache.hadoop.io.SequenceFile;
13 import org.apache.hadoop.io.Text;
14 
15 import java.io.IOException;
16 import java.util.Random;
17 
18 
19 public class TestSeq {
20 
21     public static void main(String[] args) throws IOException {
22         createSeq();
23     }
24 
25     public static void createSeq() throws IOException {
26 
27         Configuration conf = new Configuration();
28 
29         conf.set("fs.defaultFS", "file:///");
30 
31         FileSystem fs = FileSystem.get(conf);
32 
33         Path localPath = new Path("D:\\BigData\\JavaSE\\yinzhengjieData\\MyHadoop\\MapReduce\\block.seq");
34 
35         SequenceFile.Writer block_writer = SequenceFile.createWriter(fs, conf, localPath, Text.class, IntWritable.class,SequenceFile.CompressionType.BLOCK);
36 
37         for (int i = 0; i < 1000; i++) {
38             Random r = new Random();
39             int j = r.nextInt(1000);
40             Text key = new Text("yinzhengjie" + j);
41             IntWritable val = new IntWritable(j);
42             block_writer.append(key, val);
43         }
44         block_writer.close();
45     }
46 }
生产SequenceFile的代码
 1 /*
 2 @author :yinzhengjie
 3 Blog:http://www.cnblogs.com/yinzhengjie/tag/Hadoop%E8%BF%9B%E9%98%B6%E4%B9%8B%E8%B7%AF/
 4 EMAIL:y1053419035@qq.com
 5 */
 6 package cn.org.yinzhengjie.totalsampler;
 7 
 8 import org.apache.hadoop.io.IntWritable;
 9 import org.apache.hadoop.io.LongWritable;
10 import org.apache.hadoop.io.Text;
11 import org.apache.hadoop.mapreduce.Mapper;
12 
13 import java.io.IOException;
14 
15 public class SamplerMapper extends Mapper<Text, IntWritable, Text, IntWritable> {
16 
17     @Override
18     protected void map(Text key, IntWritable value, Context context) throws IOException, InterruptedException {
19         context.write(key, value);
20     }
21 }
SamplerMapper.java 文件内容
 1 /*
 2 @author :yinzhengjie
 3 Blog:http://www.cnblogs.com/yinzhengjie/tag/Hadoop%E8%BF%9B%E9%98%B6%E4%B9%8B%E8%B7%AF/
 4 EMAIL:y1053419035@qq.com
 5 */
 6 package cn.org.yinzhengjie.totalsampler;
 7 
 8 import org.apache.hadoop.io.IntWritable;
 9 import org.apache.hadoop.io.Text;
10 import org.apache.hadoop.mapreduce.Reducer;
11 
12 import java.io.IOException;
13 
14 public class SamplerReducer extends Reducer<Text, IntWritable , Text, IntWritable> {
15     @Override
16     protected void reduce(Text key, Iterable<IntWritable> values, Context context) throws IOException, InterruptedException {
17         Integer sum = 0;
18         for(IntWritable value : values){
19             sum += value.get();
20         }
21         context.write(key, new IntWritable(sum));
22     }
23 }
SamplerReducer.java 文件内容
 1 /*
 2 @author :yinzhengjie
 3 Blog:http://www.cnblogs.com/yinzhengjie/tag/Hadoop%E8%BF%9B%E9%98%B6%E4%B9%8B%E8%B7%AF/
 4 EMAIL:y1053419035@qq.com
 5 */
 6 package cn.org.yinzhengjie.totalsampler;
 7 
 8 import org.apache.hadoop.conf.Configuration;
 9 import org.apache.hadoop.fs.FileSystem;
10 import org.apache.hadoop.fs.Path;
11 import org.apache.hadoop.io.IntWritable;
12 import org.apache.hadoop.io.Text;
13 import org.apache.hadoop.mapreduce.Job;
14 import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
15 import org.apache.hadoop.mapreduce.lib.input.SequenceFileInputFormat;
16 import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
17 import org.apache.hadoop.mapreduce.lib.partition.InputSampler;
18 import org.apache.hadoop.mapreduce.lib.partition.TotalOrderPartitioner;
19 
20 public class SamplerApp {
21 
22     public static void main(String[] args) throws Exception {
23 
24         Configuration conf = new Configuration();
25         conf.set("fs.defaultFS","file:///");
26 
27         Job job = Job.getInstance(conf);
28         FileSystem fs = FileSystem.get(conf);
29 
30         job.setJobName("Wordcount");
31         job.setJarByClass(SamplerApp.class);
32 
33         job.setMapperClass(SamplerMapper.class);
34         job.setReducerClass(SamplerReducer.class);
35 
36         //设置输入类型 ===> sequenceFile
37         job.setInputFormatClass(SequenceFileInputFormat.class);
38 
39         job.setOutputKeyClass(Text.class);
40         job.setOutputValueClass(IntWritable.class);
41 
42         Path p = new Path("D:\\BigData\\JavaSE\\yinzhengjieData\\MyHadoop\\MapReduce\\out");
43         if (fs.exists(p)) {
44             fs.delete(p, true);
45         }
46 
47         FileInputFormat.addInputPath(job, new Path("D:\\BigData\\JavaSE\\yinzhengjieData\\MyHadoop\\MapReduce\\block.seq"));
48         FileOutputFormat.setOutputPath(job, p);
49         //设置Reduce任务的个数,你也可以理解为分区个数!
50         job.setNumReduceTasks(5);
51 
52         //设置全排序分区类
53         job.setPartitionerClass(TotalOrderPartitioner.class);
54 
55         /**
56          * 采样代码一定要到job设置的最后部分
57          */
58         //设置分区文件
59         TotalOrderPartitioner.setPartitionFile(job.getConfiguration(),new Path("D:\\BigData\\JavaSE\\yinzhengjieData\\MyHadoop\\MapReduce\\par\\par.dat"));
60 
61         /**
62          * 初始化采样器
63          * freq             每个Key被选中的概率     freq x key > 分区数(我上面设置的分区数是5个,这里的key应该是你的条目数,如果这个freq设置的值较小,就会抛异常:ArrayIndexOutOfBoundsException)
64          * numSamples       需要的样本数           numSamples  > 分区数(我上面设置的分区数是5个,如果numSamples的个数小于分区数也会抛异常:ArrayIndexOutOfBoundsException)
65          * maxSplitsSampled 文件最大切片数         maxSplitsSampled > 当前切片数
66          *
67          */
68         InputSampler.RandomSampler sampler = new InputSampler.RandomSampler(0.01,5,3);
69 
70         //写入分区文件
71         InputSampler.writePartitionFile(job, sampler);
72 
73         job.waitForCompletion(true);
74     }
75 }
SamplerApp.java 文件内容

   执行以上代码后,会生成5个分区文件,如下:

 

 

 

 

  b>.间隔采样(性能较好,适合有序的源数据

     固定采样间隔, 当数量达到numSamples,停止采样。

 1 /*
 2 @author :yinzhengjie
 3 Blog:http://www.cnblogs.com/yinzhengjie/tag/Hadoop%E8%BF%9B%E9%98%B6%E4%B9%8B%E8%B7%AF/
 4 EMAIL:y1053419035@qq.com
 5 */
 6 package cn.org.yinzhengjie.totalsampler;
 7 
 8 import org.apache.hadoop.io.IntWritable;
 9 import org.apache.hadoop.io.Text;
10 import org.apache.hadoop.mapreduce.Mapper;
11 
12 import java.io.IOException;
13 
14 public class SamplerMapper extends Mapper<Text, IntWritable, Text, IntWritable> {
15 
16     @Override
17     protected void map(Text key, IntWritable value, Context context) throws IOException, InterruptedException {
18         context.write(key, value);
19     }
20 }
SamplerMapper.java 文件内容
 1 /*
 2 @author :yinzhengjie
 3 Blog:http://www.cnblogs.com/yinzhengjie/tag/Hadoop%E8%BF%9B%E9%98%B6%E4%B9%8B%E8%B7%AF/
 4 EMAIL:y1053419035@qq.com
 5 */
 6 package cn.org.yinzhengjie.totalsampler;
 7 
 8 import org.apache.hadoop.io.IntWritable;
 9 import org.apache.hadoop.io.Text;
10 import org.apache.hadoop.mapreduce.Reducer;
11 
12 import java.io.IOException;
13 
14 public class SamplerReducer extends Reducer<Text, IntWritable , Text, IntWritable> {
15     @Override
16     protected void reduce(Text key, Iterable<IntWritable> values, Context context) throws IOException, InterruptedException {
17         Integer sum = 0;
18         for(IntWritable value : values){
19             sum += value.get();
20         }
21         context.write(key, new IntWritable(sum));
22     }
23 }
SamplerReducer.java 文件内容
 1 /*
 2 @author :yinzhengjie
 3 Blog:http://www.cnblogs.com/yinzhengjie/tag/Hadoop%E8%BF%9B%E9%98%B6%E4%B9%8B%E8%B7%AF/
 4 EMAIL:y1053419035@qq.com
 5 */
 6 package cn.org.yinzhengjie.totalsampler;
 7 
 8 import org.apache.hadoop.conf.Configuration;
 9 import org.apache.hadoop.fs.FileSystem;
10 import org.apache.hadoop.fs.Path;
11 import org.apache.hadoop.io.IntWritable;
12 import org.apache.hadoop.io.Text;
13 import org.apache.hadoop.mapreduce.Job;
14 import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
15 import org.apache.hadoop.mapreduce.lib.input.SequenceFileInputFormat;
16 import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
17 import org.apache.hadoop.mapreduce.lib.partition.InputSampler;
18 import org.apache.hadoop.mapreduce.lib.partition.TotalOrderPartitioner;
19 
20 public class SamplerApp {
21 
22     public static void main(String[] args) throws Exception {
23 
24         Configuration conf = new Configuration();
25         conf.set("fs.defaultFS","file:///");
26 
27         Job job = Job.getInstance(conf);
28         FileSystem fs = FileSystem.get(conf);
29 
30         job.setJobName("Wordcount");
31         job.setJarByClass(SamplerApp.class);
32 
33         job.setMapperClass(SamplerMapper.class);
34         job.setReducerClass(SamplerReducer.class);
35         //job.setCombinerClass(WCReducer.class);
36 
37         //设置输入类型 ===> sequenceFile
38         job.setInputFormatClass(SequenceFileInputFormat.class);
39 
40         job.setOutputKeyClass(Text.class);
41         job.setOutputValueClass(IntWritable.class);
42 
43         Path localPath = new Path("D:\\10.Java\\IDE\\yhinzhengjieData\\MyHadoop\\MapReduce\\out");
44         if (fs.exists(localPath)) {
45             fs.delete(localPath, true);
46         }
47         FileInputFormat.addInputPath(job, new Path("D:\\10.Java\\IDE\\yhinzhengjieData\\MyHadoop\\MapReduce\\block.seq"));
48         FileOutputFormat.setOutputPath(job, localPath);
49 
50         job.setNumReduceTasks(5);
51 
52 
53         //设置全排序分区类
54         job.setPartitionerClass(TotalOrderPartitioner.class);
55 
56 
57         /**
58          * 采样代码一定要到job设置的最后部分
59          */
60         //设置分区文件,该文件为采样文件,作用是用于判断分区个数,比如有4个采样,那么就可以生成5个分区!
61         TotalOrderPartitioner.setPartitionFile(job.getConfiguration(),new Path("D:\\10.Java\\IDE\\yhinzhengjieData\\MyHadoop\\MapReduce\\par\\par.dat"));
62 
63         /**
64          * 初始化采样器
65          * freq             每个Key被选中的概率     freq x key > 分区数
66          * maxSplitsSampled 文件最大切片数         maxSplitsSampled > 当前切片数
67          *
68          */
69         InputSampler.IntervalSampler sampler = new InputSampler.IntervalSampler(0.01,10);
70 
71         //写入分区文件
72         InputSampler.writePartitionFile(job, sampler);
73 
74         job.waitForCompletion(true);
75     }
76 }
SamplerApp.java 文件内容

    执行以上代码后,会生成5个分区文件,如下:

  c>.切片采样(性能较好,适合有序的源数据

     对每个切片的前n个数据进行采样。

 1 /*
 2 @author :yinzhengjie
 3 Blog:http://www.cnblogs.com/yinzhengjie/tag/Hadoop%E8%BF%9B%E9%98%B6%E4%B9%8B%E8%B7%AF/
 4 EMAIL:y1053419035@qq.com
 5 */
 6 package cn.org.yinzhengjie.totalsampler;
 7 
 8 import org.apache.hadoop.io.IntWritable;
 9 import org.apache.hadoop.io.Text;
10 import org.apache.hadoop.mapreduce.Mapper;
11 
12 import java.io.IOException;
13 
14 public class SamplerMapper extends Mapper<Text, IntWritable, Text, IntWritable> {
15 
16     @Override
17     protected void map(Text key, IntWritable value, Context context) throws IOException, InterruptedException {
18         context.write(key, value);
19     }
20 }
SamplerMapper.java 文件内容
 1 /*
 2 @author :yinzhengjie
 3 Blog:http://www.cnblogs.com/yinzhengjie/tag/Hadoop%E8%BF%9B%E9%98%B6%E4%B9%8B%E8%B7%AF/
 4 EMAIL:y1053419035@qq.com
 5 */
 6 package cn.org.yinzhengjie.totalsampler;
 7 
 8 import org.apache.hadoop.io.IntWritable;
 9 import org.apache.hadoop.io.Text;
10 import org.apache.hadoop.mapreduce.Reducer;
11 
12 import java.io.IOException;
13 
14 public class SamplerReducer extends Reducer<Text, IntWritable , Text, IntWritable> {
15     @Override
16     protected void reduce(Text key, Iterable<IntWritable> values, Context context) throws IOException, InterruptedException {
17         Integer sum = 0;
18         for(IntWritable value : values){
19             sum += value.get();
20         }
21         context.write(key, new IntWritable(sum));
22     }
23 }
SamplerReducer.java 文件内容
 1 /*
 2 @author :yinzhengjie
 3 Blog:http://www.cnblogs.com/yinzhengjie/tag/Hadoop%E8%BF%9B%E9%98%B6%E4%B9%8B%E8%B7%AF/
 4 EMAIL:y1053419035@qq.com
 5 */
 6 package cn.org.yinzhengjie.totalsampler;
 7 
 8 import org.apache.hadoop.conf.Configuration;
 9 import org.apache.hadoop.fs.FileSystem;
10 import org.apache.hadoop.fs.Path;
11 import org.apache.hadoop.io.IntWritable;
12 import org.apache.hadoop.io.Text;
13 import org.apache.hadoop.mapreduce.Job;
14 import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
15 import org.apache.hadoop.mapreduce.lib.input.SequenceFileInputFormat;
16 import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
17 import org.apache.hadoop.mapreduce.lib.partition.InputSampler;
18 import org.apache.hadoop.mapreduce.lib.partition.TotalOrderPartitioner;
19 
20 public class SamplerApp {
21 
22     public static void main(String[] args) throws Exception {
23 
24         Configuration conf = new Configuration();
25         conf.set("fs.defaultFS","file:///");
26 
27         Job job = Job.getInstance(conf);
28         FileSystem fs = FileSystem.get(conf);
29 
30         job.setJobName("Wordcount");
31         job.setJarByClass(SamplerApp.class);
32 
33         job.setMapperClass(SamplerMapper.class);
34         job.setReducerClass(SamplerReducer.class);
35         //job.setCombinerClass(WCReducer.class);
36 
37         //设置输入类型 ===> sequenceFile
38         job.setInputFormatClass(SequenceFileInputFormat.class);
39 
40         job.setOutputKeyClass(Text.class);
41         job.setOutputValueClass(IntWritable.class);
42 
43         Path localPath = new Path("D:\\10.Java\\IDE\\yhinzhengjieData\\MyHadoop\\MapReduce\\out");
44         if (fs.exists(localPath)) {
45             fs.delete(localPath, true);
46         }
47         FileInputFormat.addInputPath(job, new Path("D:\\10.Java\\IDE\\yhinzhengjieData\\MyHadoop\\MapReduce\\block.seq"));
48         FileOutputFormat.setOutputPath(job, localPath);
49 
50         job.setNumReduceTasks(5);
51 
52 
53         //设置全排序分区类
54         job.setPartitionerClass(TotalOrderPartitioner.class);
55 
56 
57         /**
58          * 采样代码一定要到job设置的最后部分
59          */
60         //设置分区文件,该文件为采样文件,作用是用于判断分区个数,比如有4个采样,那么就可以生成5个分区!
61         TotalOrderPartitioner.setPartitionFile(job.getConfiguration(),new Path("D:\\10.Java\\IDE\\yhinzhengjieData\\MyHadoop\\MapReduce\\par\\par.dat"));
62 
63         /**
64          * 初始化采样器
65          * numSamples       需要的样本数           numSamples  > 分区数
66          * maxSplitsSampled 文件最大切片数         maxSplitsSampled > 当前切片数
67          *
68          */
69         InputSampler.SplitSampler sampler = new InputSampler.SplitSampler(10,5);
70 
71         //写入分区文件
72         InputSampler.writePartitionFile(job, sampler);
73 
74         job.waitForCompletion(true);
75     }
76 }
SamplerApp.java 文件内容

    执行以上代码后,会生成5个分区文件,如下:

 

 

三.二次排序实现方案

   1 1901    -172
   2 1901    -172
   3 1901    -72
   4 1901    -89
   5 1901    -117
   6 1901    -56
   7 1901    -111
   8 1901    -156
   9 1901    -39
  10 1901    -56
  11 1901    -33
  12 1901    11
  13 1901    6
  14 1901    17
  15 1901    17
  16 1901    0
  17 1901    -39
  18 1901    0
  19 1901    -6
  20 1901    11
  21 1901    28
  22 1901    17
  23 1901    6
  24 1901    17
  25 1901    6
  26 1901    -11
  27 1901    0
  28 1901    -22
  29 1901    -44
  30 1901    -6
  31 1901    -39
  32 1901    -50
  33 1901    22
  34 1901    6
  35 1901    0
  36 1901    22
  37 1901    17
  38 1901    11
  39 1901    33
  40 1901    22
  41 1901    0
  42 1901    28
  43 1901    -6
  44 1901    -6
  45 1901    -11
  46 1901    -17
  47 1901    -11
  48 1901    0
  49 1901    -28
  50 1901    -28
  51 1901    -28
  52 1901    -28
  53 1901    -56
  54 1901    -50
  55 1901    -50
  56 1901    -61
  57 1901    -44
  58 1901    -61
  59 1901    -39
  60 1901    0
  61 1901    0
  62 1901    6
  63 1901    6
  64 1901    -6
  65 1901    -6
  66 1901    0
  67 1901    -28
  68 1901    -11
  69 1901    -6
  70 1901    -17
  71 1901    -11
  72 1901    -6
  73 1901    -17
  74 1901    0
  75 1901    17
  76 1901    0
  77 1901    17
  78 1901    11
  79 1901    -11
  80 1901    -17
  81 1901    17
  82 1901    -11
  83 1901    11
  84 1901    28
  85 1901    -11
  86 1901    0
  87 1901    22
  88 1901    22
  89 1901    6
  90 1901    28
  91 1901    0
  92 1901    11
  93 1901    33
  94 1901    0
  95 1901    11
  96 1901    22
  97 1901    17
  98 1901    11
  99 1901    28
 100 1901    17
 101 1901    11
 102 1901    44
 103 1901    17
 104 1901    6
 105 1901    50
 106 1901    6
 107 1901    22
 108 1901    39
 109 1901    17
 110 1901    -11
 111 1901    0
 112 1901    -22
 113 1901    -28
 114 1901    0
 115 1901    -17
 116 1901    -22
 117 1901    -11
 118 1901    -11
 119 1901    -22
 120 1901    0
 121 1901    -6
 122 1901    -6
 123 1901    33
 124 1901    -17
 125 1901    17
 126 1901    44
 127 1901    6
 128 1901    17
 129 1901    33
 130 1901    33
 131 1901    33
 132 1901    72
 133 1901    33
 134 1901    72
 135 1901    72
 136 1901    56
 137 1901    72
 138 1901    89
 139 1901    83
 140 1901    67
 141 1901    50
 142 1901    67
 143 1901    67
 144 1901    83
 145 1901    39
 146 1901    22
 147 1901    33
 148 1901    17
 149 1901    11
 150 1901    17
 151 1901    17
 152 1901    17
 153 1901    28
 154 1901    6
 155 1901    17
 156 1901    33
 157 1901    17
 158 1901    11
 159 1901    50
 160 1901    17
 161 1901    22
 162 1901    44
 163 1901    39
 164 1901    33
 165 1901    50
 166 1901    33
 167 1901    33
 168 1901    50
 169 1901    33
 170 1901    33
 171 1901    50
 172 1901    33
 173 1901    33
 174 1901    56
 175 1901    33
 176 1901    50
 177 1901    61
 178 1901    39
 179 1901    33
 180 1901    39
 181 1901    28
 182 1901    33
 183 1901    44
 184 1901    28
 185 1901    22
 186 1901    33
 187 1901    28
 188 1901    44
 189 1901    50
 190 1901    33
 191 1901    44
 192 1901    67
 193 1901    44
 194 1901    56
 195 1901    50
 196 1901    44
 197 1901    61
 198 1901    94
 199 1901    67
 200 1901    44
 201 1901    61
 202 1901    44
 203 1901    50
 204 1901    67
 205 1901    61
 206 1901    94
 207 1901    128
 208 1901    122
 209 1901    94
 210 1901    89
 211 1901    78
 212 1901    72
 213 1901    100
 214 1901    72
 215 1901    72
 216 1901    100
 217 1901    89
 218 1901    100
 219 1901    117
 220 1901    128
 221 1901    156
 222 1901    117
 223 1901    117
 224 1901    94
 225 1901    94
 226 1901    106
 227 1901    100
 228 1901    89
 229 1901    72
 230 1901    72
 231 1901    94
 232 1901    50
 233 1901    67
 234 1901    78
 235 1901    56
 236 1901    61
 237 1901    78
 238 1901    67
 239 1901    67
 240 1901    78
 241 1901    67
 242 1901    78
 243 1901    111
 244 1901    83
 245 1901    100
 246 1901    111
 247 1901    100
 248 1901    100
 249 1901    111
 250 1901    94
 251 1901    100
 252 1901    122
 253 1901    100
 254 1901    83
 255 1901    106
 256 1901    83
 257 1901    100
 258 1901    133
 259 1901    117
 260 1901    128
 261 1901    161
 262 1901    156
 263 1901    172
 264 1901    200
 265 1901    183
 266 1901    172
 267 1901    194
 268 1901    144
 269 1901    150
 270 1901    178
 271 1901    144
 272 1901    133
 273 1901    128
 274 1901    111
 275 1901    111
 276 1901    128
 277 1901    100
 278 1901    100
 279 1901    111
 280 1901    94
 281 1901    106
 282 1901    128
 283 1901    117
 284 1901    111
 285 1901    128
 286 1901    111
 287 1901    111
 288 1901    111
 289 1901    117
 290 1901    111
 291 1901    117
 292 1901    122
 293 1901    111
 294 1901    122
 295 1901    133
 296 1901    122
 297 1901    128
 298 1901    128
 299 1901    150
 300 1901    161
 301 1901    133
 302 1901    139
 303 1901    172
 304 1901    156
 305 1901    133
 306 1901    144
 307 1901    139
 308 1901    133
 309 1901    167
 310 1901    150
 311 1901    133
 312 1901    178
 313 1901    161
 314 1901    172
 315 1901    167
 316 1901    161
 317 1901    150
 318 1901    144
 319 1901    150
 320 1901    156
 321 1901    178
 322 1901    161
 323 1901    178
 324 1901    167
 325 1901    172
 326 1901    156
 327 1901    161
 328 1901    150
 329 1901    167
 330 1901    161
 331 1901    156
 332 1901    161
 333 1901    189
 334 1901    144
 335 1901    156
 336 1901    178
 337 1901    167
 338 1901    172
 339 1901    200
 340 1901    194
 341 1901    183
 342 1901    211
 343 1901    178
 344 1901    178
 345 1901    200
 346 1901    183
 347 1901    178
 348 1901    206
 349 1901    194
 350 1901    183
 351 1901    239
 352 1901    222
 353 1901    200
 354 1901    222
 355 1901    194
 356 1901    200
 357 1901    222
 358 1901    206
 359 1901    200
 360 1901    211
 361 1901    194
 362 1901    194
 363 1901    206
 364 1901    194
 365 1901    194
 366 1901    228
 367 1901    206
 368 1901    200
 369 1901    217
 370 1901    206
 371 1901    189
 372 1901    194
 373 1901    194
 374 1901    172
 375 1901    194
 376 1901    172
 377 1901    150
 378 1901    183
 379 1901    172
 380 1901    183
 381 1901    211
 382 1901    189
 383 1901    133
 384 1901    167
 385 1901    156
 386 1901    150
 387 1901    189
 388 1901    172
 389 1901    161
 390 1901    156
 391 1901    156
 392 1901    144
 393 1901    167
 394 1901    156
 395 1901    144
 396 1901    156
 397 1901    150
 398 1901    156
 399 1901    172
 400 1901    167
 401 1901    144
 402 1901    156
 403 1901    144
 404 1901    150
 405 1901    200
 406 1901    178
 407 1901    183
 408 1901    194
 409 1901    167
 410 1901    150
 411 1901    161
 412 1901    150
 413 1901    156
 414 1901    172
 415 1901    178
 416 1901    156
 417 1901    167
 418 1901    167
 419 1901    178
 420 1901    200
 421 1901    178
 422 1901    183
 423 1901    217
 424 1901    194
 425 1901    183
 426 1901    217
 427 1901    183
 428 1901    183
 429 1901    183
 430 1901    178
 431 1901    172
 432 1901    189
 433 1901    161
 434 1901    144
 435 1901    156
 436 1901    139
 437 1901    139
 438 1901    139
 439 1901    133
 440 1901    150
 441 1901    161
 442 1901    161
 443 1901    161
 444 1901    172
 445 1901    161
 446 1901    144
 447 1901    150
 448 1901    150
 449 1901    139
 450 1901    144
 451 1901    128
 452 1901    122
 453 1901    150
 454 1901    144
 455 1901    133
 456 1901    161
 457 1901    156
 458 1901    167
 459 1901    183
 460 1901    156
 461 1901    133
 462 1901    161
 463 1901    133
 464 1901    100
 465 1901    133
 466 1901    122
 467 1901    117
 468 1901    106
 469 1901    106
 470 1901    78
 471 1901    100
 472 1901    83
 473 1901    56
 474 1901    72
 475 1901    89
 476 1901    72
 477 1901    89
 478 1901    100
 479 1901    94
 480 1901    106
 481 1901    106
 482 1901    83
 483 1901    106
 484 1901    94
 485 1901    83
 486 1901    106
 487 1901    100
 488 1901    72
 489 1901    111
 490 1901    94
 491 1901    78
 492 1901    111
 493 1901    94
 494 1901    106
 495 1901    117
 496 1901    106
 497 1901    94
 498 1901    117
 499 1901    100
 500 1901    106
 501 1901    106
 502 1901    83
 503 1901    94
 504 1901    100
 505 1901    89
 506 1901    89
 507 1901    106
 508 1901    100
 509 1901    100
 510 1901    111
 511 1901    111
 512 1901    100
 513 1901    111
 514 1901    100
 515 1901    100
 516 1901    117
 517 1901    106
 518 1901    106
 519 1901    122
 520 1901    106
 521 1901    106
 522 1901    117
 523 1901    106
 524 1901    106
 525 1901    117
 526 1901    106
 527 1901    111
 528 1901    122
 529 1901    106
 530 1901    100
 531 1901    94
 532 1901    94
 533 1901    83
 534 1901    111
 535 1901    106
 536 1901    111
 537 1901    111
 538 1901    106
 539 1901    111
 540 1901    117
 541 1901    111
 542 1901    111
 543 1901    106
 544 1901    106
 545 1901    111
 546 1901    111
 547 1901    100
 548 1901    100
 549 1901    117
 550 1901    117
 551 1901    100
 552 1901    117
 553 1901    117
 554 1901    117
 555 1901    117
 556 1901    100
 557 1901    106
 558 1901    122
 559 1901    117
 560 1901    100
 561 1901    94
 562 1901    78
 563 1901    67
 564 1901    89
 565 1901    94
 566 1901    89
 567 1901    111
 568 1901    106
 569 1901    111
 570 1901    117
 571 1901    111
 572 1901    117
 573 1901    117
 574 1901    106
 575 1901    117
 576 1901    128
 577 1901    111
 578 1901    94
 579 1901    106
 580 1901    111
 581 1901    94
 582 1901    100
 583 1901    78
 584 1901    89
 585 1901    89
 586 1901    94
 587 1901    83
 588 1901    89
 589 1901    89
 590 1901    83
 591 1901    111
 592 1901    94
 593 1901    78
 594 1901    83
 595 1901    72
 596 1901    67
 597 1901    89
 598 1901    78
 599 1901    50
 600 1901    61
 601 1901    61
 602 1901    33
 603 1901    67
 604 1901    50
 605 1901    67
 606 1901    83
 607 1901    78
 608 1901    83
 609 1901    89
 610 1901    83
 611 1901    78
 612 1901    100
 613 1901    94
 614 1901    72
 615 1901    78
 616 1901    78
 617 1901    78
 618 1901    78
 619 1901    78
 620 1901    72
 621 1901    94
 622 1901    89
 623 1901    83
 624 1901    94
 625 1901    89
 626 1901    56
 627 1901    50
 628 1901    44
 629 1901    61
 630 1901    72
 631 1901    72
 632 1901    83
 633 1901    78
 634 1901    78
 635 1901    72
 636 1901    78
 637 1901    72
 638 1901    78
 639 1901    78
 640 1901    78
 641 1901    83
 642 1901    89
 643 1901    83
 644 1901    67
 645 1901    67
 646 1901    72
 647 1901    61
 648 1901    56
 649 1901    39
 650 1901    33
 651 1901    61
 652 1901    78
 653 1901    67
 654 1901    61
 655 1901    78
 656 1901    72
 657 1901    78
 658 1901    78
 659 1901    33
 660 1901    28
 661 1901    33
 662 1901    17
 663 1901    28
 664 1901    39
 665 1901    67
 666 1901    56
 667 1901    39
 668 1901    61
 669 1901    56
 670 1901    56
 671 1901    50
 672 1901    33
 673 1901    22
 674 1901    -17
 675 1901    -6
 676 1901    -11
 677 1901    17
 678 1901    -6
 679 1901    0
 680 1901    -6
 681 1901    17
 682 1901    -22
 683 1901    -33
 684 1901    -22
 685 1901    -17
 686 1901    -6
 687 1901    -11
 688 1901    -11
 689 1901    -22
 690 1901    -33
 691 1901    -67
 692 1901    -78
 693 1901    -72
 694 1901    -50
 695 1901    -39
 696 1901    -39
 697 1901    -28
 698 1901    -28
 699 1901    -61
 700 1901    6
 701 1901    -6
 702 1901    -17
 703 1901    -22
 704 1901    -11
 705 1901    -17
 706 1901    -17
 707 1901    -22
 708 1901    -33
 709 1901    -33
 710 1901    -44
 711 1901    -39
 712 1901    -33
 713 1901    -22
 714 1901    -22
 715 1901    -22
 716 1901    -50
 717 1901    -61
 718 1901    -56
 719 1901    -33
 720 1901    0
 721 1901    -6
 722 1901    -17
 723 1901    -17
 724 1901    -17
 725 1901    22
 726 1901    22
 727 1901    22
 728 1901    -33
 729 1901    -28
 730 1901    -22
 731 1901    28
 732 1901    33
 733 1901    22
 734 1901    -11
 735 1901    -22
 736 1901    -28
 737 1901    -33
 738 1901    -44
 739 1901    -44
 740 1901    -89
 741 1901    -89
 742 1901    -94
 743 1901    -94
 744 1901    -72
 745 1901    -61
 746 1901    -44
 747 1901    -39
 748 1901    -39
 749 1901    -61
 750 1901    -61
 751 1901    -83
 752 1901    -72
 753 1901    -17
 754 1901    -6
 755 1901    6
 756 1901    6
 757 1901    -11
 758 1901    0
 759 1901    -17
 760 1901    6
 761 1901    0
 762 1901    0
 763 1901    0
 764 1901    11
 765 1901    11
 766 1901    0
 767 1901    -22
 768 1901    -44
 769 1901    -67
 770 1901    -89
 771 1901    -78
 772 1901    -61
 773 1901    -67
 774 1901    -56
 775 1901    -78
 776 1901    -94
 777 1901    -89
 778 1901    -72
 779 1901    -83
 780 1901    -72
 781 1901    -50
 782 1901    -44
 783 1901    -39
 784 1901    -44
 785 1901    -72
 786 1901    -89
 787 1901    -111
 788 1901    -78
 789 1901    -78
 790 1901    -78
 791 1901    -94
 792 1901    -72
 793 1901    -94
 794 1901    -61
 795 1901    -56
 796 1901    -28
 797 1901    -67
 798 1901    -33
 799 1901    -28
 800 1901    -33
 801 1901    -44
 802 1901    -39
 803 1901    0
 804 1901    6
 805 1901    0
 806 1901    6
 807 1901    6
 808 1901    -11
 809 1901    -33
 810 1901    -50
 811 1901    -44
 812 1901    -28
 813 1901    -33
 814 1901    -33
 815 1901    -50
 816 1901    -33
 817 1901    -28
 818 1901    -44
 819 1901    -44
 820 1901    -44
 821 1901    -39
 822 1901    -50
 823 1901    -44
 824 1901    -39
 825 1901    -33
 826 1901    -22
 827 1901    0
 828 1901    -6
 829 1901    -17
 830 1901    -44
 831 1901    -39
 832 1901    -33
 833 1901    -6
 834 1901    17
 835 1901    22
 836 1901    22
 837 1901    28
 838 1901    28
 839 1901    22
 840 1901    11
 841 1901    17
 842 1901    22
 843 1901    17
 844 1901    17
 845 1901    -22
 846 1901    -44
 847 1901    -44
 848 1901    -28
 849 1901    -33
 850 1901    -50
 851 1901    -50
 852 1901    -61
 853 1901    -72
 854 1901    -67
 855 1901    -67
 856 1901    -67
 857 1901    -78
 858 1901    -67
 859 1901    -56
 860 1901    -33
 861 1901    -28
 862 1901    -28
 863 1901    -6
 864 1901    -6
 865 1901    0
 866 1901    11
 867 1901    11
 868 1901    6
 869 1901    11
 870 1901    6
 871 1901    0
 872 1901    6
 873 1901    -6
 874 1901    -22
 875 1901    -28
 876 1901    0
 877 1901    6
 878 1901    -28
 879 1901    -67
 880 1901    -72
 881 1901    -6
 882 1901    0
 883 1901    0
 884 1901    -6
 885 1901    -17
 886 1901    -11
 887 1901    -22
 888 1901    -39
 889 1901    -61
 890 1901    -111
 891 1901    -122
 892 1901    -111
 893 1901    -111
 894 1901    -94
 895 1901    -139
 896 1901    -94
 897 1901    -106
 898 1901    -128
 899 1901    -122
 900 1901    -122
 901 1901    -106
 902 1901    -156
 903 1901    -122
 904 1901    -206
 905 1901    -206
 906 1901    -172
 907 1901    -156
 908 1901    -89
 909 1901    -33
 910 1901    -28
 911 1901    -17
 912 1901    -11
 913 1901    -11
 914 1901    -17
 915 1901    -28
 916 1901    -39
 917 1901    -50
 918 1901    -78
 919 1901    -117
 920 1901    -89
 921 1901    -67
 922 1901    -100
 923 1902    22
 924 1902    -28
 925 1902    -33
 926 1902    -28
 927 1902    -22
 928 1902    -44
 929 1902    -28
 930 1902    -17
 931 1902    -22
 932 1902    -22
 933 1902    6
 934 1902    0
 935 1902    -11
 936 1902    0
 937 1902    -6
 938 1902    -33
 939 1902    -17
 940 1902    -22
 941 1902    0
 942 1902    6
 943 1902    6
 944 1902    50
 945 1902    22
 946 1902    17
 947 1902    22
 948 1902    28
 949 1902    6
 950 1902    17
 951 1902    -22
 952 1902    -22
 953 1902    0
 954 1902    -6
 955 1902    11
 956 1902    0
 957 1902    6
 958 1902    0
 959 1902    11
 960 1902    6
 961 1902    -17
 962 1902    -17
 963 1902    11
 964 1902    6
 965 1902    11
 966 1902    17
 967 1902    22
 968 1902    28
 969 1902    6
 970 1902    17
 971 1902    17
 972 1902    28
 973 1902    28
 974 1902    28
 975 1902    17
 976 1902    17
 977 1902    22
 978 1902    28
 979 1902    22
 980 1902    11
 981 1902    -11
 982 1902    -17
 983 1902    6
 984 1902    11
 985 1902    11
 986 1902    17
 987 1902    0
 988 1902    0
 989 1902    6
 990 1902    6
 991 1902    0
 992 1902    17
 993 1902    0
 994 1902    0
 995 1902    6
 996 1902    6
 997 1902    0
 998 1902    0
 999 1902    6
1000 1902    11
1001 1902    -6
1002 1902    -17
1003 1902    -33
1004 1902    -28
1005 1902    -33
1006 1902    -39
1007 1902    -44
1008 1902    -56
1009 1902    -83
1010 1902    -94
1011 1902    -89
1012 1902    -78
1013 1902    -94
1014 1902    -94
1015 1902    -94
1016 1902    -89
1017 1902    -67
1018 1902    -50
1019 1902    -44
1020 1902    -50
1021 1902    -44
1022 1902    -33
1023 1902    -22
1024 1902    -17
1025 1902    11
1026 1902    28
1027 1902    22
1028 1902    17
1029 1902    11
1030 1902    -28
1031 1902    -22
1032 1902    -22
1033 1902    -17
1034 1902    11
1035 1902    22
1036 1902    0
1037 1902    0
1038 1902    11
1039 1902    17
1040 1902    17
1041 1902    6
1042 1902    11
1043 1902    22
1044 1902    6
1045 1902    28
1046 1902    33
1047 1902    28
1048 1902    22
1049 1902    28
1050 1902    33
1051 1902    33
1052 1902    -11
1053 1902    11
1054 1902    17
1055 1902    17
1056 1902    17
1057 1902    33
1058 1902    11
1059 1902    6
1060 1902    17
1061 1902    -6
1062 1902    28
1063 1902    50
1064 1902    44
1065 1902    56
1066 1902    56
1067 1902    50
1068 1902    56
1069 1902    56
1070 1902    33
1071 1902    28
1072 1902    28
1073 1902    44
1074 1902    50
1075 1902    61
1076 1902    61
1077 1902    56
1078 1902    61
1079 1902    50
1080 1902    56
1081 1902    61
1082 1902    56
1083 1902    44
1084 1902    44
1085 1902    50
1086 1902    39
1087 1902    39
1088 1902    28
1089 1902    0
1090 1902    0
1091 1902    -33
1092 1902    0
1093 1902    28
1094 1902    33
1095 1902    39
1096 1902    39
1097 1902    44
1098 1902    61
1099 1902    50
1100 1902    39
1101 1902    56
1102 1902    61
1103 1902    61
1104 1902    83
1105 1902    94
1106 1902    67
1107 1902    50
1108 1902    56
1109 1902    61
1110 1902    61
1111 1902    67
1112 1902    61
1113 1902    72
1114 1902    67
1115 1902    61
1116 1902    56
1117 1902    72
1118 1902    50
1119 1902    67
1120 1902    72
1121 1902    61
1122 1902    61
1123 1902    67
1124 1902    50
1125 1902    56
1126 1902    67
1127 1902    56
1128 1902    89
1129 1902    89
1130 1902    72
1131 1902    50
1132 1902    33
1133 1902    22
1134 1902    28
1135 1902    56
1136 1902    61
1137 1902    72
1138 1902    61
1139 1902    33
1140 1902    28
1141 1902    39
1142 1902    28
1143 1902    39
1144 1902    44
1145 1902    56
1146 1902    78
1147 1902    78
1148 1902    78
1149 1902    83
1150 1902    78
1151 1902    78
1152 1902    67
1153 1902    44
1154 1902    17
1155 1902    6
1156 1902    22
1157 1902    67
1158 1902    72
1159 1902    78
1160 1902    72
1161 1902    61
1162 1902    56
1163 1902    50
1164 1902    56
1165 1902    56
1166 1902    50
1167 1902    61
1168 1902    56
1169 1902    78
1170 1902    72
1171 1902    72
1172 1902    50
1173 1902    39
1174 1902    50
1175 1902    33
1176 1902    61
1177 1902    67
1178 1902    67
1179 1902    67
1180 1902    94
1181 1902    78
1182 1902    67
1183 1902    78
1184 1902    61
1185 1902    67
1186 1902    61
1187 1902    50
1188 1902    39
1189 1902    33
1190 1902    33
1191 1902    78
1192 1902    78
1193 1902    50
1194 1902    50
1195 1902    67
1196 1902    33
1197 1902    28
1198 1902    44
1199 1902    33
1200 1902    44
1201 1902    50
1202 1902    72
1203 1902    106
1204 1902    89
1205 1902    72
1206 1902    67
1207 1902    72
1208 1902    83
1209 1902    83
1210 1902    83
1211 1902    94
1212 1902    94
1213 1902    94
1214 1902    72
1215 1902    83
1216 1902    78
1217 1902    94
1218 1902    94
1219 1902    100
1220 1902    94
1221 1902    100
1222 1902    100
1223 1902    89
1224 1902    89
1225 1902    83
1226 1902    100
1227 1902    56
1228 1902    67
1229 1902    61
1230 1902    50
1231 1902    61
1232 1902    61
1233 1902    61
1234 1902    61
1235 1902    72
1236 1902    78
1237 1902    72
1238 1902    94
1239 1902    94
1240 1902    117
1241 1902    100
1242 1902    106
1243 1902    106
1244 1902    100
1245 1902    100
1246 1902    100
1247 1902    83
1248 1902    89
1249 1902    78
1250 1902    50
1251 1902    72
1252 1902    78
1253 1902    83
1254 1902    111
1255 1902    94
1256 1902    111
1257 1902    94
1258 1902    94
1259 1902    89
1260 1902    117
1261 1902    106
1262 1902    111
1263 1902    128
1264 1902    133
1265 1902    128
1266 1902    128
1267 1902    117
1268 1902    94
1269 1902    106
1270 1902    133
1271 1902    100
1272 1902    106
1273 1902    128
1274 1902    122
1275 1902    144
1276 1902    150
1277 1902    139
1278 1902    133
1279 1902    150
1280 1902    150
1281 1902    139
1282 1902    139
1283 1902    133
1284 1902    117
1285 1902    150
1286 1902    133
1287 1902    128
1288 1902    128
1289 1902    117
1290 1902    128
1291 1902    133
1292 1902    122
1293 1902    106
1294 1902    117
1295 1902    122
1296 1902    133
1297 1902    128
1298 1902    133
1299 1902    133
1300 1902    133
1301 1902    122
1302 1902    128
1303 1902    122
1304 1902    133
1305 1902    139
1306 1902    133
1307 1902    144
1308 1902    144
1309 1902    133
1310 1902    128
1311 1902    133
1312 1902    144
1313 1902    133
1314 1902    111
1315 1902    106
1316 1902    128
1317 1902    122
1318 1902    106
1319 1902    122
1320 1902    122
1321 1902    128
1322 1902    133
1323 1902    133
1324 1902    144
1325 1902    133
1326 1902    144
1327 1902    133
1328 1902    133
1329 1902    150
1330 1902    133
1331 1902    122
1332 1902    122
1333 1902    128
1334 1902    133
1335 1902    122
1336 1902    122
1337 1902    122
1338 1902    128
1339 1902    139
1340 1902    128
1341 1902    133
1342 1902    128
1343 1902    122
1344 1902    172
1345 1902    128
1346 1902    122
1347 1902    133
1348 1902    128
1349 1902    122
1350 1902    128
1351 1902    133
1352 1902    128
1353 1902    128
1354 1902    144
1355 1902    133
1356 1902    150
1357 1902    156
1358 1902    133
1359 1902    172
1360 1902    156
1361 1902    128
1362 1902    156
1363 1902    128
1364 1902    133
1365 1902    133
1366 1902    156
1367 1902    128
1368 1902    144
1369 1902    133
1370 1902    122
1371 1902    144
1372 1902    133
1373 1902    128
1374 1902    144
1375 1902    150
1376 1902    122
1377 1902    122
1378 1902    128
1379 1902    122
1380 1902    128
1381 1902    150
1382 1902    117
1383 1902    133
1384 1902    111
1385 1902    122
1386 1902    128
1387 1902    122
1388 1902    111
1389 1902    117
1390 1902    106
1391 1902    128
1392 1902    144
1393 1902    150
1394 1902    144
1395 1902    150
1396 1902    150
1397 1902    133
1398 1902    133
1399 1902    122
1400 1902    133
1401 1902    156
1402 1902    133
1403 1902    133
1404 1902    128
1405 1902    150
1406 1902    117
1407 1902    139
1408 1902    117
1409 1902    100
1410 1902    161
1411 1902    128
1412 1902    128
1413 1902    133
1414 1902    133
1415 1902    128
1416 1902    117
1417 1902    106
1418 1902    100
1419 1902    133
1420 1902    128
1421 1902    128
1422 1902    133
1423 1902    150
1424 1902    117
1425 1902    122
1426 1902    128
1427 1902    133
1428 1902    122
1429 1902    111
1430 1902    100
1431 1902    100
1432 1902    100
1433 1902    94
1434 1902    94
1435 1902    106
1436 1902    106
1437 1902    122
1438 1902    100
1439 1902    83
1440 1902    89
1441 1902    106
1442 1902    106
1443 1902    111
1444 1902    100
1445 1902    106
1446 1902    111
1447 1902    111
1448 1902    106
1449 1902    83
1450 1902    89
1451 1902    100
1452 1902    111
1453 1902    89
1454 1902    106
1455 1902    122
1456 1902    100
1457 1902    83
1458 1902    106
1459 1902    78
1460 1902    83
1461 1902    106
1462 1902    106
1463 1902    117
1464 1902    128
1465 1902    111
1466 1902    94
1467 1902    100
1468 1902    128
1469 1902    89
1470 1902    94
1471 1902    94
1472 1902    83
1473 1902    122
1474 1902    128
1475 1902    100
1476 1902    100
1477 1902    89
1478 1902    106
1479 1902    106
1480 1902    100
1481 1902    144
1482 1902    144
1483 1902    144
1484 1902    100
1485 1902    111
1486 1902    106
1487 1902    117
1488 1902    111
1489 1902    111
1490 1902    100
1491 1902    106
1492 1902    100
1493 1902    100
1494 1902    111
1495 1902    78
1496 1902    100
1497 1902    94
1498 1902    78
1499 1902    94
1500 1902    94
1501 1902    78
1502 1902    100
1503 1902    100
1504 1902    106
1505 1902    122
1506 1902    94
1507 1902    89
1508 1902    111
1509 1902    133
1510 1902    111
1511 1902    89
1512 1902    89
1513 1902    72
1514 1902    67
1515 1902    67
1516 1902    67
1517 1902    67
1518 1902    72
1519 1902    61
1520 1902    61
1521 1902    78
1522 1902    78
1523 1902    89
1524 1902    100
1525 1902    89
1526 1902    94
1527 1902    111
1528 1902    106
1529 1902    83
1530 1902    83
1531 1902    56
1532 1902    67
1533 1902    61
1534 1902    61
1535 1902    67
1536 1902    72
1537 1902    50
1538 1902    50
1539 1902    56
1540 1902    67
1541 1902    72
1542 1902    67
1543 1902    61
1544 1902    61
1545 1902    72
1546 1902    72
1547 1902    56
1548 1902    67
1549 1902    67
1550 1902    100
1551 1902    78
1552 1902    94
1553 1902    100
1554 1902    106
1555 1902    133
1556 1902    78
1557 1902    72
1558 1902    72
1559 1902    89
1560 1902    83
1561 1902    67
1562 1902    50
1563 1902    56
1564 1902    56
1565 1902    100
1566 1902    72
1567 1902    72
1568 1902    78
1569 1902    111
1570 1902    122
1571 1902    67
1572 1902    89
1573 1902    78
1574 1902    67
1575 1902    72
1576 1902    67
1577 1902    61
1578 1902    67
1579 1902    61
1580 1902    61
1581 1902    56
1582 1902    67
1583 1902    56
1584 1902    67
1585 1902    122
1586 1902    56
1587 1902    56
1588 1902    50
1589 1902    61
1590 1902    50
1591 1902    44
1592 1902    50
1593 1902    78
1594 1902    61
1595 1902    56
1596 1902    61
1597 1902    44
1598 1902    50
1599 1902    28
1600 1902    17
1601 1902    33
1602 1902    33
1603 1902    33
1604 1902    50
1605 1902    50
1606 1902    44
1607 1902    33
1608 1902    33
1609 1902    28
1610 1902    17
1611 1902    44
1612 1902    39
1613 1902    39
1614 1902    50
1615 1902    28
1616 1902    39
1617 1902    39
1618 1902    33
1619 1902    17
1620 1902    67
1621 1902    28
1622 1902    22
1623 1902    28
1624 1902    11
1625 1902    17
1626 1902    28
1627 1902    17
1628 1902    22
1629 1902    22
1630 1902    11
1631 1902    17
1632 1902    22
1633 1902    11
1634 1902    6
1635 1902    6
1636 1902    0
1637 1902    17
1638 1902    33
1639 1902    33
1640 1902    33
1641 1902    50
1642 1902    33
1643 1902    44
1644 1902    22
1645 1902    33
1646 1902    11
1647 1902    28
1648 1902    11
1649 1902    28
1650 1902    22
1651 1902    17
1652 1902    28
1653 1902    50
1654 1902    44
1655 1902    11
1656 1902    22
1657 1902    17
1658 1902    0
1659 1902    50
1660 1902    28
1661 1902    6
1662 1902    33
1663 1902    22
1664 1902    -6
1665 1902    28
1666 1902    6
1667 1902    -17
1668 1902    -6
1669 1902    -6
1670 1902    6
1671 1902    11
1672 1902    6
1673 1902    17
1674 1902    22
1675 1902    11
1676 1902    11
1677 1902    44
1678 1902    17
1679 1902    11
1680 1902    22
1681 1902    22
1682 1902    11
1683 1902    6
1684 1902    17
1685 1902    22
1686 1902    22
1687 1902    11
1688 1902    17
1689 1902    22
1690 1902    22
1691 1902    50
1692 1902    28
1693 1902    17
1694 1902    22
1695 1902    33
1696 1902    28
1697 1902    28
1698 1902    33
1699 1902    28
1700 1902    22
1701 1902    44
1702 1902    22
1703 1902    6
1704 1902    50
1705 1902    22
1706 1902    22
1707 1902    28
1708 1902    11
1709 1902    17
1710 1902    11
1711 1902    6
1712 1902    -11
1713 1902    33
1714 1902    6
1715 1902    -6
1716 1902    22
1717 1902    22
1718 1902    -6
1719 1902    17
1720 1902    0
1721 1902    -17
1722 1902    6
1723 1902    -22
1724 1902    -39
1725 1902    -28
1726 1902    -22
1727 1902    -17
1728 1902    0
1729 1902    -11
1730 1902    17
1731 1902    0
1732 1902    -11
1733 1902    -17
1734 1902    -17
1735 1902    -33
1736 1902    -28
1737 1902    -11
1738 1902    -6
1739 1902    -11
1740 1902    -22
1741 1902    -28
1742 1902    -17
1743 1902    -11
1744 1902    -17
1745 1902    -28
1746 1902    -11
1747 1902    -22
1748 1902    -17
1749 1902    -22
1750 1902    -33
1751 1902    -17
1752 1902    -6
1753 1902    -6
1754 1902    -17
1755 1902    -22
1756 1902    -44
1757 1902    -44
1758 1902    -33
1759 1902    -22
1760 1902    -17
1761 1902    -6
1762 1902    -22
1763 1902    -17
1764 1902    17
1765 1902    -17
1766 1902    6
1767 1902    11
1768 1902    0
1769 1902    11
1770 1902    22
1771 1902    -6
1772 1902    -11
1773 1902    -6
1774 1902    -33
1775 1902    -28
1776 1902    -11
1777 1902    -28
1778 1902    -78
1779 1902    -50
1780 1902    -22
1781 1902    17
1782 1902    6
1783 1902    11
1784 1902    17
1785 1902    17
1786 1902    0
1787 1902    -33
1788 1902    -28
1789 1902    -28
1790 1902    6
1791 1902    -17
1792 1902    -11
1793 1902    6
1794 1902    11
1795 1902    6
1796 1902    -6
1797 1902    6
1798 1902    0
1799 1902    -6
1800 1902    -6
1801 1902    -28
1802 1902    -17
1803 1902    -17
1804 1902    -50
1805 1902    -100
1806 1902    -111
1807 1902    -122
1808 1902    -83
1809 1902    -72
1810 1902    -17
1811 1902    -28
1812 1902    -78
1813 1902    -100
1814 1902    -94
1815 1902    -117
1816 1902    -106
1817 1902    -83
1818 1902    -72
1819 1902    -44
1820 1902    -22
1821 1902    0
1822 1902    6
1823 1902    11
1824 1902    6
1825 1902    6
1826 1902    6
1827 1902    0
1828 1902    -17
1829 1902    -56
1830 1902    -56
1831 1902    -44
1832 1902    -28
1833 1902    -11
1834 1902    -6
1835 1902    -6
1836 1902    -6
1837 1902    -6
1838 1902    6
1839 1902    6
1840 1902    6
1841 1902    6
1842 1902    0
1843 1902    -6
1844 1902    -6
1845 1902    -6
1846 1902    -17
1847 1902    -28
1848 1902    -22
1849 1902    -11
1850 1902    -11
1851 1902    -17
1852 1902    -28
1853 1902    -33
1854 1902    -28
1855 1902    -28
1856 1902    -28
1857 1902    -17
1858 1902    -28
1859 1902    -17
1860 1902    -22
1861 1902    -33
1862 1902    -11
1863 1902    -6
1864 1902    -6
1865 1902    -22
1866 1902    -33
1867 1902    -39
1868 1902    -33
1869 1902    -33
1870 1902    -28
1871 1902    -28
1872 1902    0
1873 1902    -6
1874 1902    0
1875 1902    6
1876 1902    0
1877 1902    6
1878 1902    6
1879 1902    6
1880 1902    -6
1881 1902    -28
1882 1902    -50
1883 1902    -33
1884 1902    -44
1885 1902    -78
1886 1902    -50
1887 1902    -17
1888 1902    -11
1889 1902    -11
1890 1902    -11
1891 1902    0
1892 1902    -67
1893 1902    -61
1894 1902    -67
1895 1902    -28
1896 1902    -33
1897 1902    -67
1898 1902    -72
1899 1902    -50
1900 1902    -50
1901 1902    0
1902 1902    -17
1903 1902    -28
1904 1902    -28
1905 1902    -22
1906 1902    -11
1907 1902    -11
1908 1902    -11
1909 1902    -11
1910 1902    -50
1911 1902    -56
1912 1902    -78
1913 1902    -67
1914 1902    -33
1915 1902    -17
1916 1902    -17
1917 1902    -17
1918 1902    -6
1919 1902    0
1920 1902    0
1921 1902    0
1922 1902    6
1923 1902    -6
1924 1902    -11
1925 1902    -33
1926 1902    -17
1927 1902    -22
1928 1902    -33
1929 1902    -50
1930 1902    -44
1931 1902    -11
1932 1902    -6
1933 1902    -6
1934 1902    -11
1935 1902    -22
1936 1902    -6
1937 1902    11
1938 1902    0
1939 1902    0
1940 1902    11
1941 1902    11
1942 1902    17
1943 1902    11
1944 1902    22
1945 1902    22
1946 1902    22
1947 1902    22
1948 1902    22
1949 1902    6
1950 1902    6
1951 1902    6
1952 1902    -6
1953 1902    -56
1954 1902    -22
1955 1902    11
1956 1902    6
1957 1902    6
1958 1902    22
1959 1902    22
1960 1902    22
1961 1902    -6
1962 1902    -50
1963 1902    -61
1964 1902    -67
1965 1902    -67
1966 1902    -17
1967 1902    -17
1968 1902    0
1969 1902    0
1970 1902    -17
1971 1902    28
1972 1902    28
1973 1902    -11
1974 1902    -28
1975 1902    -39
1976 1902    -56
1977 1902    -50
1978 1902    -22
1979 1902    -28
1980 1902    -33
1981 1902    -6
1982 1902    -11
1983 1902    -17
1984 1902    -17
1985 1902    -17
1986 1902    6
1987 1902    6
1988 1902    22
1989 1902    33
1990 1902    22
1991 1902    28
1992 1902    28
1993 1902    22
1994 1902    28
1995 1902    28
1996 1902    22
1997 1902    28
1998 1902    17
1999 1902    -6
2000 1902    6
2001 1902    11
2002 1902    0
2003 1902    11
2004 1902    17
2005 1902    22
2006 1902    28
2007 1902    28
2008 1902    -6
2009 1902    -83
2010 1902    -78
2011 1902    -61
2012 1902    -11
2013 1902    6
2014 1902    11
2015 1902    6
2016 1902    28
2017 1902    28
2018 1902    -106
2019 1902    -83
2020 1902    -100
2021 1902    -78
2022 1902    -28
2023 1902    -72
2024 1902    -78
2025 1902    -50
2026 1902    -33
2027 1902    -33
2028 1902    -33
2029 1902    -33
2030 1902    -67
2031 1902    -33
2032 1902    -33
2033 1902    -22
2034 1902    -50
2035 1902    -39
2036 1902    0
2037 1902    22
2038 1902    28
2039 1902    -17
2040 1902    0
2041 1902    0
2042 1902    -6
2043 1902    -6
2044 1902    -6
2045 1902    -144
2046 1902    -89
2047 1902    -67
2048 1902    -89
2049 1902    -89
2050 1902    -83
2051 1902    -50
2052 1902    -33
2053 1902    -44
2054 1902    -72
2055 1902    -56
2056 1902    -56
2057 1902    -44
2058 1902    -44
2059 1902    -44
2060 1902    -28
2061 1902    -6
2062 1902    0
2063 1902    -22
2064 1902    -11
2065 1902    0
2066 1902    22
2067 1902    22
2068 1902    11
2069 1902    0
2070 1902    11
2071 1902    6
2072 1902    -39
2073 1902    -56
2074 1902    -61
2075 1902    -28
2076 1902    -17
2077 1902    -33
2078 1902    -44
2079 1902    -11
2080 1902    -22
2081 1902    -28
2082 1902    -28
2083 1902    -83
2084 1902    -89
2085 1902    -50
2086 1902    -72
2087 1902    -39
2088 1902    -11
2089 1902    -6
2090 1902    -22
2091 1902    -39
2092 1902    -67
2093 1902    -50
2094 1902    -39
2095 1902    -67
2096 1902    -83
2097 1902    -67
2098 1902    -117
2099 1902    -217
2100 1902    -189
2101 1902    -228
2102 1902    -222
2103 1902    -183
2104 1902    -211
2105 1902    -206
2106 1902    -178
2107 1902    -183
2108 1902    -167
2109 1902    -167
2110 1902    -161
2111 1902    -161
2112 1902    -111
2113 1902    -133
2114 1902    -111
2115 1902    -106
2116 1902    -83
2117 1902    -67
2118 1902    -61
2119 1902    -17
2120 1902    0
2121 1902    11
2122 1902    -6
2123 1902    -83
2124 1902    -106
2125 1902    -156
2126 1902    -128
2127 1902    -94
2128 1902    -111
2129 1902    -44
2130 1902    0
2131 1902    -6
2132 1902    0
2133 1902    28
2134 1902    6
2135 1902    11
2136 1902    17
2137 1902    6
2138 1902    -67
2139 1902    -6
2140 1902    -6
2141 1902    11
2142 1902    22
2143 1902    -44
2144 1902    0
2145 1902    22
2146 1902    22
2147 1902    0
2148 1902    6
2149 1902    -6
2150 1902    0
2151 1902    11
2152 1902    -78
2153 1902    -67
2154 1902    -39
2155 1902    -78
2156 1902    -6
2157 1902    39
2158 1902    17
2159 1902    44
2160 1902    56
2161 1902    50
2162 1902    50
2163 1902    50
2164 1902    44
2165 1902    22
2166 1902    33
2167 1902    -17
2168 1902    33
2169 1902    56
2170 1902    56
2171 1902    56
2172 1902    50
2173 1902    44
2174 1902    44
2175 1902    33
2176 1902    22
2177 1902    22
2178 1902    33
2179 1902    33
2180 1902    33
2181 1902    28
2182 1902    6
2183 1902    -67
2184 1902    -39
2185 1902    -33
2186 1902    -50
2187 1902    -11
2188 1902    0
2189 1902    17
2190 1902    39
2191 1902    22
2192 1902    50
2193 1902    44
2194 1902    0
2195 1902    33
2196 1902    33
2197 1902    33
2198 1902    56
2199 1902    83
2200 1902    39
2201 1902    28
2202 1902    50
2203 1902    56
2204 1902    56
2205 1902    61
2206 1902    61
2207 1902    72
2208 1902    72
2209 1902    61
2210 1902    28
2211 1902    44
2212 1902    -11
2213 1902    44
2214 1902    56
2215 1902    33
2216 1902    28
2217 1902    67
2218 1902    22
2219 1902    39
2220 1902    61
2221 1902    28
2222 1902    83
2223 1902    78
2224 1902    56
2225 1902    -39
2226 1902    -50
2227 1902    -61
2228 1902    -17
2229 1902    0
2230 1902    11
2231 1902    22
2232 1902    33
2233 1902    11
2234 1902    6
2235 1902    17
2236 1902    0
2237 1902    6
2238 1902    33
2239 1902    33
2240 1902    56
2241 1902    83
2242 1902    67
2243 1902    67
2244 1902    22
2245 1902    33
2246 1902    6
2247 1902    -17
2248 1902    -61
2249 1902    -28
2250 1902    -11
2251 1902    11
2252 1902    39
2253 1902    56
2254 1902    67
2255 1902    0
2256 1902    56
2257 1902    6
2258 1902    0
2259 1902    56
2260 1902    28
2261 1902    39
2262 1902    61
2263 1902    33
2264 1902    61
2265 1902    67
2266 1902    39
2267 1902    -17
2268 1902    50
2269 1902    -11
2270 1902    6
2271 1902    72
2272 1902    33
2273 1902    28
2274 1902    89
2275 1902    56
2276 1902    39
2277 1902    100
2278 1902    56
2279 1902    56
2280 1902    72
2281 1902    6
2282 1902    -11
2283 1902    28
2284 1902    -6
2285 1902    44
2286 1902    83
2287 1902    61
2288 1902    39
2289 1902    50
2290 1902    -17
2291 1902    -6
2292 1902    33
2293 1902    -6
2294 1902    11
2295 1902    44
2296 1902    22
2297 1902    72
2298 1902    111
2299 1902    72
2300 1902    28
2301 1902    78
2302 1902    67
2303 1902    50
2304 1902    100
2305 1902    94
2306 1902    89
2307 1902    111
2308 1902    89
2309 1902    72
2310 1902    139
2311 1902    56
2312 1902    94
2313 1902    122
2314 1902    83
2315 1902    83
2316 1902    122
2317 1902    78
2318 1902    67
2319 1902    100
2320 1902    11
2321 1902    11
2322 1902    72
2323 1902    22
2324 1902    11
2325 1902    50
2326 1902    22
2327 1902    50
2328 1902    72
2329 1902    67
2330 1902    78
2331 1902    100
2332 1902    100
2333 1902    94
2334 1902    128
2335 1902    111
2336 1902    117
2337 1902    111
2338 1902    89
2339 1902    94
2340 1902    100
2341 1902    72
2342 1902    67
2343 1902    67
2344 1902    61
2345 1902    72
2346 1902    100
2347 1902    111
2348 1902    106
2349 1902    111
2350 1902    122
2351 1902    50
2352 1902    117
2353 1902    83
2354 1902    89
2355 1902    100
2356 1902    106
2357 1902    117
2358 1902    183
2359 1902    133
2360 1902    122
2361 1902    156
2362 1902    106
2363 1902    100
2364 1902    167
2365 1902    106
2366 1902    117
2367 1902    183
2368 1902    122
2369 1902    139
2370 1902    172
2371 1902    156
2372 1902    144
2373 1902    150
2374 1902    156
2375 1902    133
2376 1902    161
2377 1902    72
2378 1902    83
2379 1902    161
2380 1902    111
2381 1902    111
2382 1902    144
2383 1902    106
2384 1902    100
2385 1902    150
2386 1902    106
2387 1902    89
2388 1902    128
2389 1902    89
2390 1902    106
2391 1902    122
2392 1902    128
2393 1902    133
2394 1902    172
2395 1902    150
2396 1902    128
2397 1902    172
2398 1902    133
2399 1902    128
2400 1902    128
2401 1902    128
2402 1902    133
2403 1902    156
2404 1902    128
2405 1902    144
2406 1902    111
2407 1902    106
2408 1902    183
2409 1902    133
2410 1902    128
2411 1902    172
2412 1902    122
2413 1902    122
2414 1902    156
2415 1902    111
2416 1902    117
2417 1902    156
2418 1902    106
2419 1902    78
2420 1902    178
2421 1902    83
2422 1902    56
2423 1902    133
2424 1902    100
2425 1902    72
2426 1902    122
2427 1902    100
2428 1902    72
2429 1902    144
2430 1902    117
2431 1902    111
2432 1902    167
2433 1902    133
2434 1902    128
2435 1902    178
2436 1902    144
2437 1902    100
2438 1902    150
2439 1902    78
2440 1902    72
2441 1902    150
2442 1902    117
2443 1902    100
2444 1902    122
2445 1902    106
2446 1902    106
2447 1902    133
2448 1902    72
2449 1902    100
2450 1902    156
2451 1902    117
2452 1902    117
2453 1902    150
2454 1902    122
2455 1902    117
2456 1902    139
2457 1902    122
2458 1902    89
2459 1902    128
2460 1902    122
2461 1902    106
2462 1902    167
2463 1902    133
2464 1902    122
2465 1902    183
2466 1902    117
2467 1902    117
2468 1902    172
2469 1902    122
2470 1902    111
2471 1902    178
2472 1902    117
2473 1902    117
2474 1902    156
2475 1902    117
2476 1902    117
2477 1902    150
2478 1902    133
2479 1902    122
2480 1902    200
2481 1902    144
2482 1902    139
2483 1902    189
2484 1902    122
2485 1902    117
2486 1902    172
2487 1902    122
2488 1902    117
2489 1902    156
2490 1902    122
2491 1902    111
2492 1902    139
2493 1902    117
2494 1902    122
2495 1902    172
2496 1902    122
2497 1902    117
2498 1902    144
2499 1902    117
2500 1902    128
2501 1902    167
2502 1902    156
2503 1902    139
2504 1902    183
2505 1902    128
2506 1902    106
2507 1902    178
2508 1902    139
2509 1902    128
2510 1902    178
2511 1902    128
2512 1902    128
2513 1902    194
2514 1902    111
2515 1902    133
2516 1902    194
2517 1902    111
2518 1902    128
2519 1902    156
2520 1902    139
2521 1902    128
2522 1902    172
2523 1902    139
2524 1902    122
2525 1902    167
2526 1902    122
2527 1902    150
2528 1902    200
2529 1902    172
2530 1902    161
2531 1902    194
2532 1902    144
2533 1902    139
2534 1902    150
2535 1902    122
2536 1902    111
2537 1902    178
2538 1902    100
2539 1902    133
2540 1902    178
2541 1902    106
2542 1902    117
2543 1902    133
2544 1902    111
2545 1902    117
2546 1902    161
2547 1902    106
2548 1902    128
2549 1902    144
2550 1902    117
2551 1902    111
2552 1902    144
2553 1902    122
2554 1902    111
2555 1902    167
2556 1902    117
2557 1902    111
2558 1902    128
2559 1902    111
2560 1902    111
2561 1902    156
2562 1902    100
2563 1902    117
2564 1902    161
2565 1902    117
2566 1902    139
2567 1902    172
2568 1902    117
2569 1902    106
2570 1902    133
2571 1902    128
2572 1902    139
2573 1902    172
2574 1902    122
2575 1902    94
2576 1902    156
2577 1902    111
2578 1902    111
2579 1902    150
2580 1902    89
2581 1902    94
2582 1902    183
2583 1902    144
2584 1902    94
2585 1902    128
2586 1902    106
2587 1902    106
2588 1902    167
2589 1902    128
2590 1902    161
2591 1902    200
2592 1902    139
2593 1902    111
2594 1902    144
2595 1902    122
2596 1902    111
2597 1902    183
2598 1902    117
2599 1902    144
2600 1902    206
2601 1902    133
2602 1902    156
2603 1902    161
2604 1902    122
2605 1902    128
2606 1902    167
2607 1902    117
2608 1902    117
2609 1902    139
2610 1902    144
2611 1902    128
2612 1902    167
2613 1902    150
2614 1902    167
2615 1902    189
2616 1902    150
2617 1902    172
2618 1902    189
2619 1902    122
2620 1902    139
2621 1902    150
2622 1902    89
2623 1902    94
2624 1902    89
2625 1902    94
2626 1902    117
2627 1902    133
2628 1902    117
2629 1902    122
2630 1902    150
2631 1902    106
2632 1902    117
2633 1902    144
2634 1902    156
2635 1902    144
2636 1902    178
2637 1902    128
2638 1902    106
2639 1902    150
2640 1902    89
2641 1902    67
2642 1902    67
2643 1902    61
2644 1902    56
2645 1902    89
2646 1902    78
2647 1902    67
2648 1902    72
2649 1902    106
2650 1902    83
2651 1902    133
2652 1902    83
2653 1902    72
2654 1902    106
2655 1902    67
2656 1902    67
2657 1902    111
2658 1902    78
2659 1902    83
2660 1902    139
2661 1902    128
2662 1902    150
2663 1902    200
2664 1902    133
2665 1902    117
2666 1902    156
2667 1902    133
2668 1902    94
2669 1902    133
2670 1902    89
2671 1902    100
2672 1902    83
2673 1902    78
2674 1902    122
2675 1902    133
2676 1902    106
2677 1902    100
2678 1902    167
2679 1902    144
2680 1902    133
2681 1902    167
2682 1902    122
2683 1902    100
2684 1902    150
2685 1902    83
2686 1902    83
2687 1902    128
2688 1902    100
2689 1902    78
2690 1902    133
2691 1902    72
2692 1902    111
2693 1902    172
2694 1902    106
2695 1902    89
2696 1902    122
2697 1902    111
2698 1902    83
2699 1902    122
2700 1902    100
2701 1902    94
2702 1902    144
2703 1902    83
2704 1902    67
2705 1902    144
2706 1902    122
2707 1902    78
2708 1902    117
2709 1902    78
2710 1902    72
2711 1902    117
2712 1902    100
2713 1902    100
2714 1902    111
2715 1902    89
2716 1902    61
2717 1902    78
2718 1902    28
2719 1902    44
2720 1902    78
2721 1902    83
2722 1902    67
2723 1902    106
2724 1902    61
2725 1902    67
2726 1902    111
2727 1902    83
2728 1902    44
2729 1902    78
2730 1902    -17
2731 1902    33
2732 1902    78
2733 1902    33
2734 1902    33
2735 1902    67
2736 1902    22
2737 1902    17
2738 1902    44
2739 1902    22
2740 1902    11
2741 1902    33
2742 1902    0
2743 1902    6
2744 1902    17
2745 1902    11
2746 1902    17
2747 1902    33
2748 1902    44
2749 1902    50
2750 1902    117
2751 1902    50
2752 1902    56
2753 1902    122
2754 1902    72
2755 1902    67
2756 1902    117
2757 1902    39
2758 1902    33
2759 1902    78
2760 1902    28
2761 1902    22
2762 1902    28
2763 1902    0
2764 1902    6
2765 1902    61
2766 1902    17
2767 1902    11
2768 1902    56
2769 1902    6
2770 1902    -6
2771 1902    44
2772 1902    -22
2773 1902    -22
2774 1902    22
2775 1902    -22
2776 1902    -28
2777 1902    6
2778 1902    -33
2779 1902    -28
2780 1902    17
2781 1902    -6
2782 1902    -6
2783 1902    56
2784 1902    28
2785 1902    -6
2786 1902    67
2787 1902    11
2788 1902    -6
2789 1902    67
2790 1902    -22
2791 1902    -11
2792 1902    33
2793 1902    -11
2794 1902    28
2795 1902    67
2796 1902    11
2797 1902    22
2798 1902    56
2799 1902    -6
2800 1902    17
2801 1902    39
2802 1902    33
2803 1902    28
2804 1902    67
2805 1902    22
2806 1902    -6
2807 1902    72
2808 1902    -11
2809 1902    6
2810 1902    61
2811 1902    -6
2812 1902    -11
2813 1902    67
2814 1902    -44
2815 1902    6
2816 1902    72
2817 1902    11
2818 1902    0
2819 1902    83
2820 1902    -94
2821 1902    -33
2822 1902    50
2823 1902    -83
2824 1902    -67
2825 1902    28
2826 1902    -150
2827 1902    -94
2828 1902    -17
2829 1902    -183
2830 1902    -117
2831 1902    -28
2832 1902    -183
2833 1902    -89
2834 1902    -28
2835 1902    -172
2836 1902    -78
2837 1902    -17
2838 1902    -111
2839 1902    -44
2840 1902    17
2841 1902    -44
2842 1902    -67
2843 1902    -11
2844 1902    -72
2845 1902    -11
2846 1902    33
2847 1902    -39
2848 1902    -94
2849 1902    -11
2850 1902    -44
2851 1902    -28
2852 1902    11
2853 1902    -56
2854 1902    -83
2855 1902    11
2856 1902    -128
2857 1902    -72
2858 1902    6
2859 1902    -161
2860 1902    -89
2861 1902    28
2862 1902    -106
2863 1902    -44
2864 1902    -11
2865 1902    -44
2866 1902    -39
2867 1902    -17
2868 1902    -28
2869 1902    -22
2870 1902    17
2871 1902    -17
2872 1902    -11
2873 1902    0
2874 1902    -6
2875 1902    17
2876 1902    22
2877 1902    17
2878 1902    17
2879 1902    22
2880 1902    -44
2881 1902    -50
2882 1902    -6
2883 1902    -67
2884 1902    -72
2885 1902    -61
2886 1902    -111
2887 1902    -128
2888 1902    -111
2889 1902    -94
2890 1902    -67
2891 1902    -6
2892 1902    -22
2893 1902    17
2894 1902    17
2895 1902    -56
2896 1902    -72
2897 1902    -28
2898 1902    -39
2899 1902    -67
2900 1902    -33
2901 1902    -56
2902 1902    0
2903 1902    11
2904 1902    -11
2905 1902    -6
2906 1902    11
2907 1902    -17
2908 1902    -22
2909 1902    -17
2910 1902    -56
2911 1902    -94
2912 1902    -22
2913 1902    -106
2914 1902    -156
2915 1902    -100
2916 1902    -328
2917 1902    -172
2918 1902    -83
2919 1902    -106
2920 1902    -150
2921 1902    -72
2922 1902    -278
2923 1902    -161
2924 1902    -106
2925 1902    -156
2926 1902    -139
2927 1902    -111
2928 1902    -100
2929 1902    -17
2930 1902    22
2931 1902    6
2932 1902    -6
2933 1902    17
2934 1902    0
2935 1902    -44
2936 1902    -44
2937 1902    -89
2938 1902    -67
2939 1902    -56
2940 1902    -78
2941 1902    -67
2942 1902    -33
2943 1902    -44
2944 1902    -6
2945 1902    22
2946 1902    6
2947 1902    6
2948 1902    17
2949 1902    -6
2950 1902    -22
2951 1902    -22
2952 1902    -33
2953 1902    -39
2954 1902    -28
2955 1902    -78
2956 1902    -83
2957 1902    -33
2958 1902    -56
2959 1902    -22
2960 1902    -6
2961 1902    -44
2962 1902    -28
2963 1902    -11
2964 1902    -44
2965 1902    -28
2966 1902    0
2967 1902    -22
2968 1902    -22
2969 1902    -6
2970 1902    -50
2971 1902    -78
2972 1902    -22
2973 1902    -61
2974 1902    -67
2975 1902    -56
2976 1902    -144
2977 1902    -106
2978 1902    -56
2979 1902    -56
2980 1902    -67
2981 1902    -44
2982 1902    -100
2983 1902    -39
2984 1902    22
2985 1902    11
2986 1902    6
2987 1902    11
2988 1902    -22
2989 1902    -89
2990 1902    -56
2991 1902    -122
2992 1902    -144
2993 1902    -94
2994 1902    -167
2995 1902    -106
2996 1902    -67
2997 1902    -156
2998 1902    -83
2999 1902    -56
3000 1902    -122
3001 1902    -106
3002 1902    -89
3003 1902    -133
3004 1902    -133
3005 1902    -117
3006 1902    -156
3007 1902    -178
3008 1902    -44
3009 1902    -56
3010 1902    -78
3011 1902    -72
3012 1902    -89
3013 1902    -78
3014 1902    -89
3015 1902    -100
3016 1902    -67
3017 1902    -100
3018 1902    -128
3019 1902    -217
3020 1902    -189
3021 1902    -300
3022 1902    -194
3023 1902    -133
3024 1902    -133
3025 1902    -122
3026 1902    -50
3027 1902    -11
3028 1902    -89
3029 1902    -11
3030 1902    -28
3031 1902    -17
3032 1902    -11
3033 1902    -78
3034 1902    -228
3035 1902    -139
3036 1902    -178
3037 1902    -156
3038 1902    -94
3039 1902    -67
3040 1902    -56
3041 1902    -61
3042 1902    -33
3043 1902    -100
3044 1902    -33
3045 1902    -11
3046 1902    -11
3047 1902    6
3048 1902    -6
3049 1902    6
3050 1902    11
3051 1902    6
3052 1902    11
3053 1902    11
3054 1902    11
3055 1902    22
3056 1902    22
3057 1902    17
3058 1902    -17
3059 1902    -28
3060 1902    -33
3061 1902    -139
3062 1902    -194
3063 1902    -178
3064 1902    -133
3065 1902    -78
3066 1902    -11
3067 1902    0
3068 1902    17
3069 1902    -44
3070 1902    -106
3071 1902    -156
3072 1902    -289
3073 1902    -150
3074 1902    -144
3075 1902    -156
3076 1902    -150
3077 1902    -50
3078 1902    -28
3079 1902    -33
3080 1902    17
3081 1902    -6
3082 1902    -61
3083 1902    -189
3084 1902    -300
3085 1902    -194
3086 1902    -111
3087 1902    -106
3088 1902    -78
3089 1902    -61
3090 1902    -72
3091 1902    -150
3092 1902    -111
3093 1902    -139
3094 1902    -133
3095 1902    -94
3096 1902    -33
3097 1902    11
3098 1902    17
3099 1902    6
3100 1902    -117
3101 1902    0
3102 1902    6
3103 1902    -6
3104 1902    -6
3105 1902    -17
3106 1902    -17
3107 1902    -17
3108 1902    -78
3109 1902    -167
3110 1902    -150
3111 1902    -133
3112 1902    -11
3113 1902    0
3114 1902    6
3115 1902    -6
3116 1902    -44
3117 1902    -156
3118 1902    -267
3119 1902    -200
3120 1902    -167
3121 1902    -128
3122 1902    -106
3123 1902    -89
3124 1902    -56
3125 1902    -33
3126 1902    -28
3127 1902    -128
3128 1902    -111
3129 1902    -133
3130 1902    -111
3131 1902    -94
3132 1902    -94
3133 1902    -89
3134 1902    -67
3135 1902    -56
3136 1902    -39
3137 1902    -22
3138 1902    -17
3139 1902    -39
3140 1902    -28
3141 1902    -11
3142 1902    0
3143 1902    -17
3144 1902    -39
3145 1902    6
3146 1902    11
3147 1902    22
3148 1902    6
3149 1902    17
3150 1902    28
3151 1902    6
3152 1902    0
3153 1902    0
3154 1902    -72
3155 1902    -44
3156 1902    -50
3157 1902    -56
3158 1902    -67
3159 1902    -61
3160 1902    -39
3161 1902    -22
3162 1902    -28
3163 1902    -44
3164 1902    -33
3165 1902    -33
3166 1902    -28
3167 1902    -28
3168 1902    -39
3169 1902    -17
3170 1902    0
3171 1902    0
3172 1902    -6
3173 1902    -6
3174 1902    0
3175 1902    11
3176 1902    17
3177 1902    0
3178 1902    0
3179 1902    6
3180 1902    0
3181 1902    -44
3182 1902    -50
3183 1902    -22
3184 1902    -33
3185 1902    6
3186 1902    6
3187 1902    17
3188 1902    17
3189 1902    22
3190 1902    17
3191 1902    6
3192 1902    0
3193 1902    -33
3194 1902    -11
3195 1902    6
3196 1902    6
3197 1902    -17
3198 1902    -6
3199 1902    0
3200 1902    -17
3201 1902    0
3202 1902    6
3203 1902    11
3204 1902    6
3205 1902    -6
3206 1902    -6
3207 1902    -22
3208 1902    -67
3209 1902    -94
3210 1902    -139
3211 1902    -161
3212 1902    -144
3213 1902    -144
3214 1902    -156
3215 1902    -144
3216 1902    -122
3217 1902    -111
3218 1902    -122
3219 1902    -122
3220 1902    -122
3221 1902    -100
3222 1902    -50
3223 1902    -100
3224 1902    -89
3225 1902    -100
3226 1902    -50
3227 1902    -44
3228 1902    -56
3229 1902    6
3230 1902    17
3231 1902    11
3232 1902    -61
3233 1902    -72
3234 1902    -100
3235 1902    -94
3236 1902    -89
3237 1902    -106
3238 1902    -72
3239 1902    -6
3240 1902    22
3241 1902    33
3242 1902    39
3243 1902    33
3244 1902    28
3245 1902    28
3246 1902    28
3247 1902    -33
3248 1902    0
3249 1902    11
3250 1902    39
3251 1902    33
3252 1902    28
3253 1902    28
3254 1902    39
3255 1902    28
3256 1902    22
3257 1902    11
3258 1902    6
3259 1902    17
3260 1902    22
3261 1902    -11
3262 1902    -50
3263 1902    -44
3264 1902    -50
3265 1902    11
3266 1902    17
3267 1902    22
3268 1902    39
3269 1902    50
3270 1902    44
3271 1902    50
3272 1902    44
3273 1902    106
3274 1902    111
3275 1902    128
3276 1902    94
3277 1902    100
3278 1902    144
3279 1902    111
3280 1902    117
3281 1902    156
3282 1902    122
3283 1902    122
3284 1902    150
3285 1902    106
3286 1902    78
3287 1902    133
3288 1902    83
3289 1902    83
3290 1902    100
3291 1902    83
3292 1902    78
3293 1902    111
3294 1902    89
3295 1902    83
3296 1902    83
3297 1902    122
3298 1902    117
3299 1902    122
3300 1902    111
3301 1902    122
3302 1902    150
3303 1902    122
3304 1902    106
3305 1902    111
3306 1902    111
3307 1902    111
3308 1902    128
3309 1902    117
3310 1902    122
3311 1902    117
3312 1902    89
3313 1902    94
3314 1902    100
3315 1902    89
3316 1902    89
3317 1902    106
3318 1902    94
3319 1902    94
3320 1902    94
3321 1902    94
3322 1902    94
3323 1902    94
3324 1902    83
3325 1902    78
3326 1902    89
3327 1902    94
3328 1902    89
3329 1902    94
3330 1902    89
3331 1902    89
3332 1902    89
3333 1902    94
3334 1902    78
3335 1902    89
3336 1902    78
3337 1902    83
3338 1902    100
3339 1902    100
3340 1902    94
3341 1902    100
3342 1902    128
3343 1902    94
3344 1902    100
3345 1902    89
3346 1902    94
3347 1902    89
3348 1902    72
3349 1902    67
3350 1902    94
3351 1902    83
3352 1902    67
3353 1902    89
3354 1902    83
3355 1902    78
3356 1902    89
3357 1902    72
3358 1902    78
3359 1902    100
3360 1902    83
3361 1902    89
3362 1902    78
3363 1902    83
3364 1902    72
3365 1902    94
3366 1902    78
3367 1902    94
3368 1902    111
3369 1902    78
3370 1902    78
3371 1902    83
3372 1902    72
3373 1902    61
3374 1902    72
3375 1902    72
3376 1902    67
3377 1902    78
3378 1902    72
3379 1902    78
3380 1902    83
3381 1902    61
3382 1902    78
3383 1902    83
3384 1902    67
3385 1902    50
3386 1902    56
3387 1902    61
3388 1902    56
3389 1902    100
3390 1902    89
3391 1902    61
3392 1902    100
3393 1902    56
3394 1902    44
3395 1902    50
3396 1902    39
3397 1902    50
3398 1902    61
3399 1902    61
3400 1902    56
3401 1902    67
3402 1902    61
3403 1902    67
3404 1902    67
3405 1902    61
3406 1902    61
3407 1902    89
3408 1902    67
3409 1902    28
3410 1902    50
3411 1902    44
3412 1902    33
3413 1902    44
3414 1902    33
3415 1902    22
3416 1902    28
3417 1902    33
3418 1902    61
3419 1902    56
3420 1902    56
3421 1902    44
3422 1902    50
3423 1902    44
3424 1902    33
3425 1902    50
3426 1902    33
3427 1902    17
3428 1902    28
3429 1902    17
3430 1902    28
3431 1902    33
3432 1902    33
3433 1902    39
3434 1902    44
3435 1902    44
3436 1902    33
3437 1902    61
3438 1902    39
3439 1902    28
3440 1902    44
3441 1902    39
3442 1902    17
3443 1902    39
3444 1902    22
3445 1902    28
3446 1902    39
3447 1902    28
3448 1902    44
3449 1902    61
3450 1902    22
3451 1902    50
3452 1902    61
3453 1902    61
3454 1902    44
3455 1902    44
3456 1902    44
3457 1902    22
3458 1902    33
3459 1902    22
3460 1902    17
3461 1902    28
3462 1902    22
3463 1902    50
3464 1902    33
3465 1902    17
3466 1902    22
3467 1902    33
3468 1902    22
3469 1902    6
3470 1902    33
3471 1902    -6
3472 1902    6
3473 1902    33
3474 1902    6
3475 1902    22
3476 1902    44
3477 1902    22
3478 1902    11
3479 1902    33
3480 1902    17
3481 1902    28
3482 1902    33
3483 1902    44
3484 1902    44
3485 1902    72
3486 1902    50
3487 1902    28
3488 1902    72
3489 1902    11
3490 1902    17
3491 1902    67
3492 1902    28
3493 1902    39
3494 1902    39
3495 1902    6
3496 1902    0
3497 1902    33
3498 1902    0
3499 1902    -6
3500 1902    11
3501 1902    -6
3502 1902    -17
3503 1902    17
3504 1902    0
3505 1902    0
3506 1902    17
3507 1902    0
3508 1902    -6
3509 1902    6
3510 1902    0
3511 1902    -6
3512 1902    -6
3513 1902    -28
3514 1902    -11
3515 1902    11
3516 1902    -17
3517 1902    0
3518 1902    6
3519 1902    -22
3520 1902    -44
3521 1902    -11
3522 1902    -6
3523 1902    6
3524 1902    11
3525 1902    -11
3526 1902    0
3527 1902    17
3528 1902    11
3529 1902    6
3530 1902    22
3531 1902    6
3532 1902    -28
3533 1902    28
3534 1902    -17
3535 1902    -39
3536 1902    -22
3537 1902    -78
3538 1902    -56
3539 1902    -17
3540 1902    -72
3541 1902    -61
3542 1902    -6
3543 1902    -56
3544 1902    -72
3545 1902    -22
3546 1902    -94
3547 1902    -100
3548 1902    -56
3549 1902    -100
3550 1902    -67
3551 1902    -11
3552 1902    -17
3553 1902    -44
3554 1902    0
3555 1902    -33
3556 1902    -33
3557 1902    17
3558 1902    -11
3559 1902    -11
3560 1902    17
3561 1902    -22
3562 1902    -67
3563 1902    22
3564 1902    -22
3565 1902    -56
3566 1902    -28
3567 1902    -22
3568 1902    -6
3569 1902    11
3570 1902    17
3571 1902    -6
3572 1902    39
3573 1902    6
3574 1902    -6
3575 1902    39
3576 1902    -17
3577 1902    -11
3578 1902    22
3579 1902    6
3580 1902    6
3581 1902    17
3582 1902    -33
3583 1902    -17
3584 1902    22
3585 1902    -44
3586 1902    -28
3587 1902    28
3588 1902    11
3589 1902    0
3590 1902    28
3591 1902    -11
3592 1902    -33
3593 1902    17
3594 1902    -67
3595 1902    -39
3596 1902    -11
3597 1902    -100
3598 1902    -100
3599 1902    -39
3600 1902    -156
3601 1902    -83
3602 1902    -61
3603 1902    -161
3604 1902    -144
3605 1902    -83
3606 1902    -172
3607 1902    -117
3608 1902    -61
3609 1902    -111
3610 1902    -106
3611 1902    -28
3612 1902    -122
3613 1902    -133
3614 1902    -78
3615 1902    -150
3616 1902    -72
3617 1902    0
3618 1902    -50
3619 1902    -139
3620 1902    -72
3621 1902    -78
3622 1902    -50
3623 1902    -44
3624 1902    -56
3625 1902    -111
3626 1902    -78
3627 1902    -150
3628 1902    -117
3629 1902    -50
3630 1902    -83
3631 1902    -117
3632 1902    -44
3633 1902    -44
3634 1902    -28
3635 1902    -11
3636 1902    -44
3637 1902    -44
3638 1902    -50
3639 1902    -72
3640 1902    -39
3641 1902    -33
3642 1902    -61
3643 1902    -11
3644 1902    6
3645 1902    11
3646 1902    17
3647 1902    28
3648 1902    17
3649 1902    -22
3650 1902    -61
3651 1902    -100
3652 1902    -100
3653 1902    -61
3654 1902    -100
3655 1902    -122
3656 1902    -133
3657 1902    -178
3658 1902    -172
3659 1902    -194
3660 1902    -233
3661 1902    -194
3662 1902    -178
3663 1902    -183
3664 1902    -133
3665 1902    -106
3666 1902    -117
3667 1902    -161
3668 1902    -117
3669 1902    -150
3670 1902    -33
3671 1902    -22
3672 1902    -94
3673 1902    -39
3674 1902    -17
3675 1902    -67
3676 1902    -33
3677 1902    -6
3678 1902    -44
3679 1902    -22
3680 1902    -11
3681 1902    -83
3682 1902    -89
3683 1902    -83
3684 1902    -144
3685 1902    -100
3686 1902    -122
3687 1902    -217
3688 1902    -194
3689 1902    -161
3690 1902    -183
3691 1902    -144
3692 1902    -128
3693 1902    -206
3694 1902    -228
3695 1902    -178
3696 1902    -222
3697 1902    -189
3698 1902    -150
3699 1902    -211
3700 1902    -100
3701 1902    -72
3702 1902    -83
3703 1902    -44
3704 1902    -33
3705 1902    -44
3706 1902    -67
3707 1902    -67
3708 1902    -94
3709 1902    -144
3710 1902    -72
3711 1902    -128
3712 1902    -94
3713 1902    -56
3714 1902    -61
3715 1902    -83
3716 1902    -67
3717 1902    -117
3718 1902    -67
3719 1902    -94
3720 1902    -50
3721 1902    -28
3722 1902    -22
3723 1902    -44
3724 1902    -50
3725 1902    -44
3726 1902    -78
3727 1902    -17
3728 1902    -6
3729 1902    -17
3730 1902    -28
3731 1902    -28
3732 1902    -50
3733 1902    -28
3734 1902    -22
3735 1902    -28
3736 1902    -67
3737 1902    -56
3738 1902    -67
3739 1902    -28
3740 1902    -11
3741 1902    -39
3742 1902    -28
3743 1902    -6
3744 1902    -28
3745 1902    -50
3746 1902    -33
3747 1902    -61
3748 1902    -67
3749 1902    -50
3750 1902    -56
3751 1902    -50
3752 1902    -83
3753 1902    -111
3754 1902    -122
3755 1902    -89
3756 1902    -33
3757 1902    -17
3758 1902    0
3759 1902    -56
3760 1902    -133
3761 1902    -128
3762 1902    -150
3763 1902    -100
3764 1902    -117
3765 1902    -161
3766 1902    -178
3767 1902    -139
3768 1902    -111
3769 1902    -83
3770 1902    -117
3771 1902    -156
3772 1902    -217
3773 1902    -228
3774 1902    -261
3775 1902    -183
3776 1902    -189
3777 1902    -211
3778 1902    -194
3779 1902    -161
3780 1902    -167
3781 1902    -172
3782 1902    -156
3783 1902    -167
3784 1902    -128
3785 1902    -111
3786 1902    -111
3787 1902    -94
3788 1902    -111
3789 1902    -161
3790 1902    -178
3791 1902    -161
3792 1902    -178
3793 1902    -161
3794 1902    -144
3795 1902    -139
3796 1902    -89
3797 1902    -78
3798 1902    -67
3799 1902    6
3800 1902    6
3801 1902    17
3802 1902    22
3803 1902    11
3804 1902    -6
3805 1902    -144
3806 1902    -128
3807 1902    -178
3808 1902    -106
3809 1902    -128
3810 1902    -128
3811 1902    -128
3812 1902    -83
3813 1902    -72
3814 1902    -67
3815 1902    -39
3816 1902    -17
3817 1902    -22
3818 1902    -11
3819 1902    -6
3820 1902    6
3821 1902    11
3822 1902    6
3823 1902    11
3824 1902    6
3825 1902    11
3826 1902    -22
3827 1902    -33
3828 1902    -28
3829 1902    -22
3830 1902    -44
3831 1902    -39
3832 1902    -122
3833 1902    -150
3834 1902    -178
3835 1902    -139
3836 1902    -150
3837 1902    -122
3838 1902    -100
3839 1902    -94
3840 1902    -100
3841 1902    -106
3842 1902    -128
3843 1902    -183
3844 1902    -150
3845 1902    -128
3846 1902    -128
3847 1902    -83
3848 1902    -61
3849 1902    -44
3850 1902    -44
3851 1902    -11
3852 1902    -17
3853 1902    -78
3854 1902    -139
3855 1902    -144
3856 1902    -139
3857 1902    -139
3858 1902    -122
3859 1902    -89
3860 1902    -78
3861 1902    -78
3862 1902    -117
3863 1902    -117
3864 1902    -100
3865 1902    -122
3866 1902    -117
3867 1902    -89
3868 1902    -67
3869 1902    -67
3870 1902    -78
3871 1902    -89
3872 1902    -72
3873 1902    -61
3874 1902    -17
3875 1902    -17
3876 1902    -33
3877 1902    -11
3878 1902    -44
3879 1902    -144
3880 1902    -128
3881 1902    -128
3882 1902    -117
3883 1902    -94
3884 1902    -61
3885 1902    -72
3886 1902    -100
3887 1902    -94
3888 1902    -106
3889 1902    -150
3890 1902    -172
3891 1902    -178
3892 1902    -178
3893 1902    -172
3894 1902    -161
3895 1902    -117
3896 1902    -100
3897 1902    -94
3898 1903    -50
3899 1903    -50
3900 1903    -28
3901 1903    -50
3902 1903    -39
3903 1903    -50
3904 1903    -61
3905 1903    -6
3906 1903    -6
3907 1903    6
3908 1903    0
3909 1903    6
3910 1903    17
3911 1903    17
3912 1903    22
3913 1903    6
3914 1903    0
3915 1903    6
3916 1903    11
3917 1903    33
3918 1903    28
3919 1903    28
3920 1903    22
3921 1903    22
3922 1903    -6
3923 1903    17
3924 1903    -6
3925 1903    6
3926 1903    11
3927 1903    22
3928 1903    -17
3929 1903    -39
3930 1903    -67
3931 1903    -72
3932 1903    -56
3933 1903    -44
3934 1903    -44
3935 1903    -39
3936 1903    -28
3937 1903    11
3938 1903    17
3939 1903    17
3940 1903    0
3941 1903    0
3942 1903    -11
3943 1903    -11
3944 1903    -11
3945 1903    -11
3946 1903    6
3947 1903    0
3948 1903    -11
3949 1903    -17
3950 1903    -17
3951 1903    -22
3952 1903    -33
3953 1903    -17
3954 1903    -22
3955 1903    -50
3956 1903    -28
3957 1903    0
3958 1903    -17
3959 1903    -28
3960 1903    -61
3961 1903    -72
3962 1903    -61
3963 1903    -56
3964 1903    -17
3965 1903    -17
3966 1903    -28
3967 1903    -50
3968 1903    -11
3969 1903    -11
3970 1903    6
3971 1903    6
3972 1903    11
3973 1903    11
3974 1903    17
3975 1903    22
3976 1903    22
3977 1903    33
3978 1903    28
3979 1903    28
3980 1903    22
3981 1903    22
3982 1903    17
3983 1903    17
3984 1903    22
3985 1903    22
3986 1903    39
3987 1903    22
3988 1903    11
3989 1903    17
3990 1903    22
3991 1903    22
3992 1903    17
3993 1903    11
3994 1903    17
3995 1903    6
3996 1903    17
3997 1903    6
3998 1903    0
3999 1903    0
4000 1903    -6
4001 1903    6
4002 1903    6
4003 1903    17
4004 1903    17
4005 1903    28
4006 1903    22
4007 1903    22
4008 1903    28
4009 1903    11
4010 1903    17
4011 1903    28
4012 1903    33
4013 1903    28
4014 1903    17
4015 1903    6
4016 1903    11
4017 1903    11
4018 1903    6
4019 1903    -6
4020 1903    17
4021 1903    33
4022 1903    44
4023 1903    22
4024 1903    0
4025 1903    -17
4026 1903    -33
4027 1903    -44
4028 1903    -33
4029 1903    -39
4030 1903    -44
4031 1903    -44
4032 1903    -50
4033 1903    -44
4034 1903    -50
4035 1903    -89
4036 1903    -72
4037 1903    -50
4038 1903    -33
4039 1903    -22
4040 1903    6
4041 1903    -33
4042 1903    -78
4043 1903    -50
4044 1903    -28
4045 1903    22
4046 1903    11
4047 1903    22
4048 1903    28
4049 1903    33
4050 1903    39
4051 1903    33
4052 1903    33
4053 1903    33
4054 1903    17
4055 1903    33
4056 1903    33
4057 1903    6
4058 1903    28
4059 1903    28
4060 1903    17
4061 1903    6
4062 1903    6
4063 1903    11
4064 1903    22
4065 1903    28
4066 1903    17
4067 1903    17
4068 1903    28
4069 1903    22
4070 1903    28
4071 1903    17
4072 1903    28
4073 1903    22
4074 1903    28
4075 1903    11
4076 1903    22
4077 1903    22
4078 1903    11
4079 1903    28
4080 1903    6
4081 1903    6
4082 1903    11
4083 1903    17
4084 1903    6
4085 1903    22
4086 1903    28
4087 1903    6
4088 1903    22
4089 1903    11
4090 1903    17
4091 1903    28
4092 1903    22
4093 1903    6
4094 1903    39
4095 1903    22
4096 1903    0
4097 1903    17
4098 1903    11
4099 1903    17
4100 1903    28
4101 1903    11
4102 1903    0
4103 1903    11
4104 1903    11
4105 1903    11
4106 1903    17
4107 1903    11
4108 1903    11
4109 1903    6
4110 1903    11
4111 1903    17
4112 1903    11
4113 1903    0
4114 1903    11
4115 1903    6
4116 1903    0
4117 1903    6
4118 1903    22
4119 1903    11
4120 1903    6
4121 1903    11
4122 1903    11
4123 1903    0
4124 1903    0
4125 1903    -6
4126 1903    6
4127 1903    6
4128 1903    6
4129 1903    17
4130 1903    11
4131 1903    22
4132 1903    28
4133 1903    44
4134 1903    39
4135 1903    28
4136 1903    28
4137 1903    33
4138 1903    39
4139 1903    44
4140 1903    56
4141 1903    44
4142 1903    56
4143 1903    67
4144 1903    56
4145 1903    33
4146 1903    28
4147 1903    28
4148 1903    6
4149 1903    0
4150 1903    11
4151 1903    39
4152 1903    56
4153 1903    44
4154 1903    50
4155 1903    28
4156 1903    33
4157 1903    50
4158 1903    50
4159 1903    50
4160 1903    50
4161 1903    39
4162 1903    39
4163 1903    50
4164 1903    39
4165 1903    33
4166 1903    50
4167 1903    44
4168 1903    11
4169 1903    -11
4170 1903    -11
4171 1903    -22
4172 1903    0
4173 1903    0
4174 1903    -17
4175 1903    -17
4176 1903    -6
4177 1903    -28
4178 1903    -17
4179 1903    -11
4180 1903    6
4181 1903    44
4182 1903    22
4183 1903    17
4184 1903    28
4185 1903    11
4186 1903    17
4187 1903    22
4188 1903    28
4189 1903    39
4190 1903    28
4191 1903    17
4192 1903    6
4193 1903    17
4194 1903    22
4195 1903    17
4196 1903    39
4197 1903    22
4198 1903    22
4199 1903    33
4200 1903    11
4201 1903    33
4202 1903    39
4203 1903    28
4204 1903    22
4205 1903    44
4206 1903    22
4207 1903    22
4208 1903    28
4209 1903    28
4210 1903    17
4211 1903    33
4212 1903    28
4213 1903    17
4214 1903    44
4215 1903    11
4216 1903    11
4217 1903    39
4218 1903    11
4219 1903    6
4220 1903    0
4221 1903    17
4222 1903    17
4223 1903    28
4224 1903    22
4225 1903    33
4226 1903    33
4227 1903    28
4228 1903    6
4229 1903    28
4230 1903    17
4231 1903    17
4232 1903    78
4233 1903    22
4234 1903    28
4235 1903    44
4236 1903    22
4237 1903    28
4238 1903    39
4239 1903    50
4240 1903    61
4241 1903    67
4242 1903    61
4243 1903    56
4244 1903    56
4245 1903    72
4246 1903    44
4247 1903    50
4248 1903    50
4249 1903    44
4250 1903    39
4251 1903    39
4252 1903    33
4253 1903    56
4254 1903    61
4255 1903    50
4256 1903    78
4257 1903    78
4258 1903    50
4259 1903    50
4260 1903    44
4261 1903    44
4262 1903    44
4263 1903    39
4264 1903    28
4265 1903    50
4266 1903    44
4267 1903    44
4268 1903    56
4269 1903    39
4270 1903    50
4271 1903    44
4272 1903    44
4273 1903    33
4274 1903    56
4275 1903    50
4276 1903    33
4277 1903    33
4278 1903    28
4279 1903    33
4280 1903    28
4281 1903    33
4282 1903    39
4283 1903    44
4284 1903    28
4285 1903    33
4286 1903    39
4287 1903    33
4288 1903    33
4289 1903    39
4290 1903    44
4291 1903    44
4292 1903    72
4293 1903    44
4294 1903    39
4295 1903    56
4296 1903    33
4297 1903    83
4298 1903    61
4299 1903    50
4300 1903    61
4301 1903    83
4302 1903    67
4303 1903    72
4304 1903    78
4305 1903    72
4306 1903    61
4307 1903    67
4308 1903    61
4309 1903    61
4310 1903    50
4311 1903    50
4312 1903    56
4313 1903    50
4314 1903    44
4315 1903    50
4316 1903    89
4317 1903    56
4318 1903    72
4319 1903    89
4320 1903    78
4321 1903    67
4322 1903    100
4323 1903    106
4324 1903    83
4325 1903    122
4326 1903    128
4327 1903    150
4328 1903    94
4329 1903    78
4330 1903    78
4331 1903    122
4332 1903    106
4333 1903    111
4334 1903    100
4335 1903    106
4336 1903    94
4337 1903    122
4338 1903    94
4339 1903    111
4340 1903    111
4341 1903    111
4342 1903    156
4343 1903    189
4344 1903    139
4345 1903    144
4346 1903    156
4347 1903    128
4348 1903    150
4349 1903    144
4350 1903    117
4351 1903    133
4352 1903    117
4353 1903    128
4354 1903    156
4355 1903    133
4356 1903    128
4357 1903    128
4358 1903    128
4359 1903    128
4360 1903    122
4361 1903    122
4362 1903    117
4363 1903    128
4364 1903    111
4365 1903    122
4366 1903    106
4367 1903    117
4368 1903    117
4369 1903    161
4370 1903    94
4371 1903    78
4372 1903    89
4373 1903    100
4374 1903    128
4375 1903    144
4376 1903    111
4377 1903    122
4378 1903    133
4379 1903    128
4380 1903    156
4381 1903    144
4382 1903    144
4383 1903    128
4384 1903    117
4385 1903    100
4386 1903    117
4387 1903    139
4388 1903    139
4389 1903    139
4390 1903    167
4391 1903    161
4392 1903    167
4393 1903    178
4394 1903    144
4395 1903    139
4396 1903    156
4397 1903    139
4398 1903    128
4399 1903    133
4400 1903    139
4401 1903    144
4402 1903    150
4403 1903    144
4404 1903    139
4405 1903    161
4406 1903    144
4407 1903    156
4408 1903    156
4409 1903    144
4410 1903    133
4411 1903    139
4412 1903    133
4413 1903    133
4414 1903    150
4415 1903    133
4416 1903    139
4417 1903    139
4418 1903    144
4419 1903    139
4420 1903    144
4421 1903    144
4422 1903    133
4423 1903    139
4424 1903    122
4425 1903    106
4426 1903    122
4427 1903    133
4428 1903    150
4429 1903    167
4430 1903    144
4431 1903    122
4432 1903    128
4433 1903    133
4434 1903    150
4435 1903    139
4436 1903    139
4437 1903    139
4438 1903    150
4439 1903    133
4440 1903    128
4441 1903    139
4442 1903    128
4443 1903    128
4444 1903    122
4445 1903    133
4446 1903    161
4447 1903    150
4448 1903    133
4449 1903    139
4450 1903    156
4451 1903    144
4452 1903    106
4453 1903    117
4454 1903    133
4455 1903    128
4456 1903    128
4457 1903    133
4458 1903    144
4459 1903    156
4460 1903    144
4461 1903    178
4462 1903    161
4463 1903    144
4464 1903    133
4465 1903    139
4466 1903    144
4467 1903    156
4468 1903    161
4469 1903    167
4470 1903    161
4471 1903    178
4472 1903    172
4473 1903    172
4474 1903    194
4475 1903    178
4476 1903    189
4477 1903    217
4478 1903    167
4479 1903    217
4480 1903    194
4481 1903    172
4482 1903    172
4483 1903    189
4484 1903    178
4485 1903    167
4486 1903    194
4487 1903    167
4488 1903    161
4489 1903    172
4490 1903    156
4491 1903    167
4492 1903    178
4493 1903    156
4494 1903    144
4495 1903    161
4496 1903    156
4497 1903    178
4498 1903    156
4499 1903    156
4500 1903    156
4501 1903    156
4502 1903    156
4503 1903    156
4504 1903    161
4505 1903    156
4506 1903    150
4507 1903    150
4508 1903    144
4509 1903    133
4510 1903    144
4511 1903    144
4512 1903    128
4513 1903    144
4514 1903    156
4515 1903    133
4516 1903    156
4517 1903    156
4518 1903    150
4519 1903    156
4520 1903    150
4521 1903    144
4522 1903    150
4523 1903    150
4524 1903    133
4525 1903    144
4526 1903    144
4527 1903    133
4528 1903    150
4529 1903    144
4530 1903    139
4531 1903    156
4532 1903    133
4533 1903    183
4534 1903    178
4535 1903    150
4536 1903    156
4537 1903    167
4538 1903    156
4539 1903    167
4540 1903    150
4541 1903    139
4542 1903    144
4543 1903    167
4544 1903    144
4545 1903    144
4546 1903    206
4547 1903    144
4548 1903    139
4549 1903    150
4550 1903    144
4551 1903    150
4552 1903    150
4553 1903    139
4554 1903    128
4555 1903    133
4556 1903    128
4557 1903    111
4558 1903    122
4559 1903    117
4560 1903    122
4561 1903    106
4562 1903    122
4563 1903    106
4564 1903    128
4565 1903    111
4566 1903    117
4567 1903    117
4568 1903    117
4569 1903    106
4570 1903    139
4571 1903    117
4572 1903    122
4573 1903    122
4574 1903    128
4575 1903    117
4576 1903    128
4577 1903    111
4578 1903    144
4579 1903    128
4580 1903    106
4581 1903    122
4582 1903    106
4583 1903    106
4584 1903    122
4585 1903    117
4586 1903    128
4587 1903    133
4588 1903    117
4589 1903    133
4590 1903    150
4591 1903    128
4592 1903    111
4593 1903    122
4594 1903    139
4595 1903    133
4596 1903    172
4597 1903    139
4598 1903    139
4599 1903    150
4600 1903    133
4601 1903    133
4602 1903    139
4603 1903    89
4604 1903    111
4605 1903    122
4606 1903    128
4607 1903    122
4608 1903    106
4609 1903    122
4610 1903    111
4611 1903    106
4612 1903    94
4613 1903    100
4614 1903    100
4615 1903    94
4616 1903    100
4617 1903    106
4618 1903    100
4619 1903    106
4620 1903    111
4621 1903    100
4622 1903    100
4623 1903    111
4624 1903    100
4625 1903    100
4626 1903    117
4627 1903    111
4628 1903    100
4629 1903    111
4630 1903    117
4631 1903    117
4632 1903    122
4633 1903    117
4634 1903    122
4635 1903    122
4636 1903    106
4637 1903    122
4638 1903    133
4639 1903    139
4640 1903    117
4641 1903    122
4642 1903    128
4643 1903    117
4644 1903    122
4645 1903    117
4646 1903    117
4647 1903    117
4648 1903    117
4649 1903    117
4650 1903    117
4651 1903    117
4652 1903    117
4653 1903    122
4654 1903    122
4655 1903    117
4656 1903    117
4657 1903    133
4658 1903    111
4659 1903    111
4660 1903    122
4661 1903    117
4662 1903    117
4663 1903    117
4664 1903    117
4665 1903    117
4666 1903    100
4667 1903    100
4668 1903    106
4669 1903    111
4670 1903    106
4671 1903    117
4672 1903    117
4673 1903    111
4674 1903    122
4675 1903    106
4676 1903    106
4677 1903    117
4678 1903    100
4679 1903    111
4680 1903    117
4681 1903    78
4682 1903    33
4683 1903    28
4684 1903    39
4685 1903    33
4686 1903    28
4687 1903    33
4688 1903    56
4689 1903    39
4690 1903    33
4691 1903    50
4692 1903    56
4693 1903    56
4694 1903    44
4695 1903    17
4696 1903    22
4697 1903    17
4698 1903    28
4699 1903    28
4700 1903    39
4701 1903    28
4702 1903    28
4703 1903    22
4704 1903    28
4705 1903    33
4706 1903    33
4707 1903    44
4708 1903    39
4709 1903    22
4710 1903    17
4711 1903    17
4712 1903    22
4713 1903    33
4714 1903    33
4715 1903    39
4716 1903    33
4717 1903    67
4718 1903    89
4719 1903    83
4720 1903    83
4721 1903    72
4722 1903    78
4723 1903    72
4724 1903    33
4725 1903    33
4726 1903    17
4727 1903    0
4728 1903    0
4729 1903    17
4730 1903    22
4731 1903    33
4732 1903    33
4733 1903    33
4734 1903    39
4735 1903    44
4736 1903    67
4737 1903    78
4738 1903    72
4739 1903    67
4740 1903    78
4741 1903    89
4742 1903    89
4743 1903    89
4744 1903    78
4745 1903    67
4746 1903    83
4747 1903    89
4748 1903    83
4749 1903    83
4750 1903    89
4751 1903    89
4752 1903    89
4753 1903    78
4754 1903    67
4755 1903    61
4756 1903    72
4757 1903    78
4758 1903    67
4759 1903    72
4760 1903    67
4761 1903    72
4762 1903    78
4763 1903    89
4764 1903    78
4765 1903    78
4766 1903    78
4767 1903    83
4768 1903    78
4769 1903    61
4770 1903    67
4771 1903    67
4772 1903    67
4773 1903    67
4774 1903    61
4775 1903    72
4776 1903    72
4777 1903    78
4778 1903    67
4779 1903    67
4780 1903    61
4781 1903    56
4782 1903    67
4783 1903    61
4784 1903    67
4785 1903    78
4786 1903    72
4787 1903    67
4788 1903    72
4789 1903    67
4790 1903    50
4791 1903    67
4792 1903    67
4793 1903    67
4794 1903    67
4795 1903    72
4796 1903    61
4797 1903    56
4798 1903    56
4799 1903    28
4800 1903    17
4801 1903    11
4802 1903    -6
4803 1903    0
4804 1903    6
4805 1903    6
4806 1903    22
4807 1903    22
4808 1903    39
4809 1903    17
4810 1903    22
4811 1903    33
4812 1903    33
4813 1903    50
4814 1903    33
4815 1903    22
4816 1903    22
4817 1903    17
4818 1903    11
4819 1903    22
4820 1903    28
4821 1903    22
4822 1903    28
4823 1903    50
4824 1903    50
4825 1903    56
4826 1903    44
4827 1903    44
4828 1903    33
4829 1903    6
4830 1903    17
4831 1903    17
4832 1903    22
4833 1903    22
4834 1903    22
4835 1903    61
4836 1903    67
4837 1903    11
4838 1903    6
4839 1903    17
4840 1903    17
4841 1903    6
4842 1903    0
4843 1903    11
4844 1903    -28
4845 1903    -22
4846 1903    -28
4847 1903    -11
4848 1903    0
4849 1903    6
4850 1903    6
4851 1903    6
4852 1903    0
4853 1903    0
4854 1903    -6
4855 1903    17
4856 1903    0
4857 1903    6
4858 1903    6
4859 1903    -6
4860 1903    0
4861 1903    6
4862 1903    0
4863 1903    0
4864 1903    22
4865 1903    44
4866 1903    44
4867 1903    39
4868 1903    28
4869 1903    39
4870 1903    44
4871 1903    50
4872 1903    33
4873 1903    33
4874 1903    56
4875 1903    56
4876 1903    44
4877 1903    50
4878 1903    50
4879 1903    56
4880 1903    56
4881 1903    56
4882 1903    61
4883 1903    56
4884 1903    39
4885 1903    44
4886 1903    28
4887 1903    17
4888 1903    28
4889 1903    17
4890 1903    28
4891 1903    28
4892 1903    22
4893 1903    28
4894 1903    28
4895 1903    22
4896 1903    17
4897 1903    11
4898 1903    0
4899 1903    0
4900 1903    0
4901 1903    0
4902 1903    6
4903 1903    11
4904 1903    6
4905 1903    11
4906 1903    6
4907 1903    11
4908 1903    17
4909 1903    22
4910 1903    11
4911 1903    0
4912 1903    -6
4913 1903    6
4914 1903    11
4915 1903    22
4916 1903    -6
4917 1903    11
4918 1903    28
4919 1903    28
4920 1903    22
4921 1903    33
4922 1903    28
4923 1903    28
4924 1903    28
4925 1903    28
4926 1903    17
4927 1903    17
4928 1903    28
4929 1903    0
4930 1903    6
4931 1903    17
4932 1903    6
4933 1903    -17
4934 1903    -56
4935 1903    -50
4936 1903    -44
4937 1903    -17
4938 1903    0
4939 1903    6
4940 1903    22
4941 1903    28
4942 1903    28
4943 1903    22
4944 1903    22
4945 1903    22
4946 1903    17
4947 1903    11
4948 1903    11
4949 1903    -17
4950 1903    -11
4951 1903    -22
4952 1903    -11
4953 1903    -11
4954 1903    -6
4955 1903    -17
4956 1903    -11
4957 1903    -11
4958 1903    -11
4959 1903    -17
4960 1903    -33
4961 1903    -28
4962 1903    -28
4963 1903    -28
4964 1903    -11
4965 1903    -17
4966 1903    0
4967 1903    -6
4968 1903    11
4969 1903    17
4970 1903    28
4971 1903    17
4972 1903    11
4973 1903    0
4974 1903    -6
4975 1903    -11
4976 1903    -6
4977 1903    -6
4978 1903    -6
4979 1903    -17
4980 1903    -44
4981 1903    -72
4982 1903    -128
4983 1903    -133
4984 1903    -156
4985 1903    -122
4986 1903    -61
4987 1903    -17
4988 1903    0
4989 1903    -11
4990 1903    -39
4991 1903    -44
4992 1903    -33
4993 1903    -33
4994 1903    -17
4995 1903    -39
4996 1903    -33
4997 1903    -89
4998 1903    -89
4999 1903    -106
5000 1903    -94
5001 1903    -83
5002 1903    -128
5003 1903    -172
5004 1903    -72
5005 1903    -50
5006 1903    -56
5007 1903    -56
5008 1903    -17
5009 1903    6
5010 1903    6
5011 1903    0
5012 1903    6
5013 1903    -11
5014 1903    -17
5015 1903    0
5016 1903    6
5017 1903    22
5018 1903    11
5019 1903    17
5020 1903    6
5021 1903    -28
5022 1903    -17
5023 1903    -17
5024 1903    -28
5025 1903    -17
5026 1903    -17
5027 1903    -61
5028 1903    -78
5029 1903    -117
5030 1903    -156
5031 1903    -144
5032 1903    -217
5033 1903    -133
5034 1903    -67
5035 1903    -39
5036 1903    -39
5037 1903    -22
5038 1903    -61
5039 1903    -22
5040 1903    -33
5041 1903    -33
5042 1903    -78
5043 1903    -78
5044 1903    -61
5045 1903    -39
5046 1903    -22
5047 1903    -39
5048 1903    -56
5049 1903    -56
5050 1903    -89
5051 1903    -106
5052 1903    -56
5053 1903    -67
5054 1903    -83
5055 1903    -44
5056 1903    -78
5057 1903    -122
5058 1903    -39
5059 1903    -94
5060 1903    -100
5061 1903    -78
5062 1903    -61
5063 1903    -44
5064 1903    -44
5065 1903    -61
5066 1903    -72
5067 1903    -78
5068 1903    -83
5069 1903    -89
5070 1903    -83
5071 1903    -61
5072 1903    -39
5073 1903    -11
5074 1903    6
5075 1903    17
5076 1903    28
5077 1903    28
5078 1903    6
5079 1903    22
5080 1903    0
5081 1903    -17
5082 1903    -6
5083 1903    -17
5084 1903    11
5085 1903    33
5086 1903    6
5087 1903    -6
5088 1903    0
5089 1903    6
5090 1903    22
5091 1903    22
5092 1903    6
5093 1903    11
5094 1903    17
5095 1903    6
5096 1903    -22
5097 1903    6
5098 1903    -44
5099 1903    -17
5100 1903    -11
5101 1903    -6
5102 1903    -22
5103 1903    0
5104 1903    22
5105 1903    11
5106 1903    11
5107 1903    17
5108 1903    11
5109 1903    11
5110 1903    17
5111 1903    22
5112 1903    11
5113 1903    0
5114 1903    -6
5115 1903    28
5116 1903    11
5117 1903    -33
5118 1903    -6
5119 1903    0
5120 1903    33
5121 1903    39
5122 1903    22
5123 1903    -11
5124 1903    -17
5125 1903    -44
5126 1903    -111
5127 1903    -61
5128 1903    -122
5129 1903    -106
5130 1903    -50
5131 1903    -106
5132 1903    -150
5133 1903    -111
5134 1903    -150
5135 1903    -139
5136 1903    -67
5137 1903    -94
5138 1903    -11
5139 1903    -17
5140 1903    -100
5141 1903    -150
5142 1903    -100
5143 1903    -50
5144 1903    11
5145 1903    22
5146 1903    11
5147 1903    28
5148 1903    39
5149 1903    28
5150 1903    22
5151 1903    22
5152 1903    22
5153 1903    6
5154 1903    28
5155 1903    33
5156 1903    -11
5157 1903    6
5158 1903    0
5159 1903    -6
5160 1903    6
5161 1903    -11
5162 1903    -78
5163 1903    11
5164 1903    17
5165 1903    11
5166 1903    28
5167 1903    22
5168 1903    22
5169 1903    28
5170 1903    11
5171 1903    28
5172 1903    33
5173 1903    22
5174 1903    11
5175 1903    11
5176 1903    -11
5177 1903    28
5178 1903    33
5179 1903    0
5180 1903    -17
5181 1903    -11
5182 1903    6
5183 1903    17
5184 1903    22
5185 1903    17
5186 1903    17
5187 1903    28
5188 1903    11
5189 1903    6
5190 1903    28
5191 1903    6
5192 1903    0
5193 1903    28
5194 1903    11
5195 1903    6
5196 1903    11
5197 1903    -11
5198 1903    6
5199 1903    33
5200 1903    -6
5201 1903    -6
5202 1903    39
5203 1903    -17
5204 1903    -6
5205 1903    0
5206 1903    -6
5207 1903    -6
5208 1903    6
5209 1903    -6
5210 1903    6
5211 1903    17
5212 1903    -17
5213 1903    -28
5214 1903    6
5215 1903    -11
5216 1903    -11
5217 1903    17
5218 1903    6
5219 1903    6
5220 1903    39
5221 1903    -11
5222 1903    -28
5223 1903    -11
5224 1903    -44
5225 1903    -44
5226 1903    6
5227 1903    -22
5228 1903    -28
5229 1903    11
5230 1903    6
5231 1903    17
5232 1903    28
5233 1903    33
5234 1903    17
5235 1903    44
5236 1903    11
5237 1903    17
5238 1903    44
5239 1903    50
5240 1903    50
5241 1903    100
5242 1903    56
5243 1903    72
5244 1903    50
5245 1903    22
5246 1903    -22
5247 1903    6
5248 1903    -28
5249 1903    0
5250 1903    44
5251 1903    56
5252 1903    44
5253 1903    106
5254 1903    33
5255 1903    17
5256 1903    56
5257 1903    39
5258 1903    39
5259 1903    78
5260 1903    39
5261 1903    44
5262 1903    94
5263 1903    39
5264 1903    11
5265 1903    83
5266 1903    44
5267 1903    -33
5268 1903    -33
5269 1903    -28
5270 1903    -56
5271 1903    6
5272 1903    -39
5273 1903    -33
5274 1903    -11
5275 1903    -33
5276 1903    -50
5277 1903    -11
5278 1903    -39
5279 1903    -39
5280 1903    0
5281 1903    -6
5282 1903    22
5283 1903    44
5284 1903    11
5285 1903    22
5286 1903    11
5287 1903    22
5288 1903    17
5289 1903    50
5290 1903    22
5291 1903    11
5292 1903    67
5293 1903    22
5294 1903    17
5295 1903    67
5296 1903    6
5297 1903    11
5298 1903    33
5299 1903    -6
5300 1903    11
5301 1903    44
5302 1903    39
5303 1903    22
5304 1903    17
5305 1903    11
5306 1903    22
5307 1903    39
5308 1903    11
5309 1903    17
5310 1903    28
5311 1903    11
5312 1903    22
5313 1903    39
5314 1903    17
5315 1903    17
5316 1903    39
5317 1903    6
5318 1903    6
5319 1903    39
5320 1903    11
5321 1903    11
5322 1903    22
5323 1903    39
5324 1903    28
5325 1903    56
5326 1903    28
5327 1903    17
5328 1903    22
5329 1903    11
5330 1903    22
5331 1903    44
5332 1903    22
5333 1903    11
5334 1903    83
5335 1903    33
5336 1903    22
5337 1903    89
5338 1903    94
5339 1903    117
5340 1903    172
5341 1903    117
5342 1903    122
5343 1903    156
5344 1903    94
5345 1903    89
5346 1903    183
5347 1903    122
5348 1903    100
5349 1903    150
5350 1903    100
5351 1903    106
5352 1903    189
5353 1903    133
5354 1903    117
5355 1903    183
5356 1903    128
5357 1903    122
5358 1903    167
5359 1903    100
5360 1903    44
5361 1903    67
5362 1903    61
5363 1903    67
5364 1903    100
5365 1903    67
5366 1903    61
5367 1903    100
5368 1903    72
5369 1903    67
5370 1903    117
5371 1903    72
5372 1903    67
5373 1903    50
5374 1903    50
5375 1903    44
5376 1903    50
5377 1903    44
5378 1903    44
5379 1903    83
5380 1903    56
5381 1903    83
5382 1903    106
5383 1903    44
yinzhengjie.txt 文件内容

  对以上文件的value进行二次排序(降序排序),具体代码如下:

 1 /*
 2 @author :yinzhengjie
 3 Blog:http://www.cnblogs.com/yinzhengjie/tag/Hadoop%E8%BF%9B%E9%98%B6%E4%B9%8B%E8%B7%AF/
 4 EMAIL:y1053419035@qq.com
 5 */
 6 package cn.org.yinzhengjie.mapreduce.SecondReducer;
 7 
 8 import org.apache.hadoop.io.WritableComparable;
 9 
10 import java.io.DataInput;
11 import java.io.DataOutput;
12 import java.io.IOException;
13 
14 /**
15  * 定义组合key
16  */
17 public class CompKey implements WritableComparable<CompKey>{
18 
19     private String year;
20     private int temp;
21 
22     public int compareTo(CompKey o) {
23         //如果年份相等的情况下
24         if( this.getYear().equals(o.getYear())){
25             //返回temp的比较
26             return  o.getTemp() - this.getTemp() ;
27         }
28         else {
29             //年分不等,返回年份比较
30             return this.getYear().compareTo(o.getYear());
31         }
32     }
33 
34     //序列化方式
35     public void write(DataOutput out) throws IOException {
36         out.writeUTF(year);
37         out.writeInt(temp);
38     }
39 
40     //反序列化方式
41     public void readFields(DataInput in) throws IOException {
42         year = in.readUTF();
43         temp = in.readInt();
44     }
45 
46 
47 
48     public String getYear() {
49         return year;
50     }
51 
52     public void setYear(String year) {
53         this.year = year;
54     }
55 
56     public int getTemp() {
57         return temp;
58     }
59 
60     public void setTemp(int temp) {
61         this.temp = temp;
62     }
63 
64     @Override
65     public String toString() {
66         return year + '\t' + temp;
67     }
68 }
CompKey.java 文件内容
 1 /*
 2 @author :yinzhengjie
 3 Blog:http://www.cnblogs.com/yinzhengjie/tag/Hadoop%E8%BF%9B%E9%98%B6%E4%B9%8B%E8%B7%AF/
 4 EMAIL:y1053419035@qq.com
 5 */
 6 package cn.org.yinzhengjie.mapreduce.SecondReducer;
 7 
 8 import org.apache.hadoop.io.WritableComparable;
 9 import org.apache.hadoop.io.WritableComparator;
10 
11 
12 /**
13  * 定义分组对比器
14  */
15 public class MyGroupComparator extends WritableComparator {
16 
17     //标准写法,
18     public MyGroupComparator() {
19         //将我们定义的组合key类传递进去,并创建实例
20         super(CompKey.class, true);
21     }
22 
23     @Override
24     public int compare(WritableComparable a, WritableComparable b) {
25         //将a和b进行向下转型,将其类型转化为CompKey(因为我们已经实现了CompKey的WritableComparable接口)。这样就可以调用getYear()方法了!
26         CompKey ck1 = (CompKey)a;
27         CompKey ck2 = (CompKey)b;
28         return ck1.getYear().compareTo(ck2.getYear());
29     }
30 }
MyGroupComparator.java 文件内容
 1 /*
 2 @author :yinzhengjie
 3 Blog:http://www.cnblogs.com/yinzhengjie/tag/Hadoop%E8%BF%9B%E9%98%B6%E4%B9%8B%E8%B7%AF/
 4 EMAIL:y1053419035@qq.com
 5 */
 6 package cn.org.yinzhengjie.mapreduce.SecondReducer;
 7 
 8 import org.apache.hadoop.io.NullWritable;
 9 import org.apache.hadoop.io.Text;
10 import org.apache.hadoop.mapreduce.Mapper;
11 
12 import java.io.IOException;
13 
14 public class SecondMapper extends Mapper<Text,Text,CompKey,NullWritable> {
15 
16     @Override
17     protected void map(Text key, Text value, Context context) throws IOException, InterruptedException {
18 
19         String year = key.toString();
20         int temp = Integer.parseInt(value.toString());
21 
22         CompKey ck = new CompKey();
23         ck.setYear(year);
24         ck.setTemp(temp);
25 
26         context.write(ck,NullWritable.get());
27 
28     }
29 }
SecondMapper.java 文件内容
 1 /*
 2 @author :yinzhengjie
 3 Blog:http://www.cnblogs.com/yinzhengjie/tag/Hadoop%E8%BF%9B%E9%98%B6%E4%B9%8B%E8%B7%AF/
 4 EMAIL:y1053419035@qq.com
 5 */
 6 package cn.org.yinzhengjie.mapreduce.SecondReducer;
 7 
 8 import org.apache.hadoop.io.NullWritable;
 9 import org.apache.hadoop.mapreduce.Reducer;
10 
11 import java.io.IOException;
12 
13 public class SecondReducer extends Reducer<CompKey,NullWritable,CompKey,NullWritable> {
14 
15     @Override
16     protected void reduce(CompKey key, Iterable<NullWritable> values, Context context) throws IOException, InterruptedException {
17 
18         String Delimiter = "==================== 我是分隔符 ====================";
19         CompKey ck2 = new CompKey();
20         //下面事物给ck2传递了两个参数,一个是String,一个是int类型,做这个操作的目的就是为了在每个key输出玩之后打印一下这个分隔符!
21         ck2.setYear(Delimiter);
22         ck2.setTemp(2018);
23 
24         for (NullWritable value : values) {
25             context.write(key,value);
26         }
27         //将变量Delimiter在每次循环后进行打印
28         context.write(ck2,NullWritable.get());
29     }
30 }
SecondReducer.java 文件内容
 1 /*
 2 @author :yinzhengjie
 3 Blog:http://www.cnblogs.com/yinzhengjie/tag/Hadoop%E8%BF%9B%E9%98%B6%E4%B9%8B%E8%B7%AF/
 4 EMAIL:y1053419035@qq.com
 5 */
 6 package cn.org.yinzhengjie.mapreduce.SecondReducer;
 7 
 8 import org.apache.hadoop.conf.Configuration;
 9 import org.apache.hadoop.fs.FileSystem;
10 import org.apache.hadoop.fs.Path;
11 import org.apache.hadoop.io.NullWritable;
12 import org.apache.hadoop.mapreduce.Job;
13 import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
14 import org.apache.hadoop.mapreduce.lib.input.KeyValueTextInputFormat;
15 import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
16 
17 public class App {
18 
19     public static void main(String[] args) throws Exception {
20 
21 
22         Configuration conf = new Configuration();
23         conf.set("fs.defaultFS","file:///");
24 
25         //如果conf设置了新值,一定要在初始化job时将conf传进去
26         Job job = Job.getInstance(conf);
27         FileSystem fs = FileSystem.get(conf);
28 
29         job.setJobName("SecondarySort");
30         job.setJarByClass(App.class);
31 
32         job.setInputFormatClass(KeyValueTextInputFormat.class);
33 
34         job.setOutputKeyClass(CompKey.class);
35         job.setOutputValueClass(NullWritable.class);
36 
37         job.setMapperClass(SecondMapper.class);
38         job.setReducerClass(SecondReducer.class);
39         //设置分组对比器的类,这里指定我们自定义的分组对比器即可
40         job.setGroupingComparatorClass(MyGroupComparator.class);
41 
42 
43         FileInputFormat.addInputPath(job,new Path("D:\\10.Java\\IDE\\yhinzhengjieData\\MyHadoop\\MapReduce\\yinzhengjie.txt"));
44         Path localPath = new Path("D:\\10.Java\\IDE\\yhinzhengjieData\\MyHadoop\\MapReduce\\second");
45         if (fs.exists(localPath)) {
46             fs.delete(localPath, true);
47         }
48         FileOutputFormat.setOutputPath(job,localPath);
49 
50         job.waitForCompletion(true);
51 
52 
53 
54     }
55 
56 
57 }
App.java 文件内容

   执行以上代码会生成一个分区文件,如下:

 

posted @ 2018-06-25 20:48  尹正杰  阅读(1042)  评论(0编辑  收藏  举报