@@ -0,0 +1,877 @@
+package org.apache.hadoop.mapreduce.approx;%0D%0A%0D%0Aimport java.io.IOException;%0D%0Aimport java.util.ArrayList;%0D%0Aimport java.util.Collection;%0D%0Aimport java.util.LinkedList;%0D%0Aimport java.util.HashSet;%0D%0Aimport java.util.List;%0D%0Aimport java.util.HashMap;%0D%0Aimport java.util.Set;%0D%0Aimport java.util.Iterator;%0D%0Aimport java.util.Map;%0D%0A%0D%0Apublic class SegmentsMap %7B%0D%0A%0D%0A%09private static class Segment %7B%0D%0A  %09%09private long offset;%0D%0A  %09%09private long length;%0D%0A  %09%09private String keys;%0D%0A%0D%0A  %09%09public void addkey(String onekey)%7B%0D%0A%0D%0A  %09%09%09keys = keys + %22%5Ct%22 + onekey;%0D%0A  %09%09%7D%0D%0A%0D%0A  %09%09public long getOffset()%7B%0D%0A  %09%09%09return offset;%0D%0A  %09%09%7D%0D%0A  %09%09public long getLength()%7B%0D%0A  %09%09%09return length;%0D%0A  %09%09%7D%0D%0A  %09%7D%0D%0A%0D%0A%0D%0A%0D%0A  %09public Segment%5B%5D getSampleSegmentsList(double ratio)%7B%0D%0A%0D%0A  %09%09return null;%0D%0A  %09%7D%0D%0A%0D%0A  %09public Segment%5B%5D getSampleSegmentsList(double error, double s2, double confidence)%7B%0D%0A%0D%0A  %09%09return null;%0D%0A  %09%7D%0D%0A%7D

add segmentsmap.java for storing frequency statistics