dbwong commented on a change in pull request #482: PHOENIX-4925 Use Segment 
tree to organize Guide Post Info
URL: https://github.com/apache/phoenix/pull/482#discussion_r275093140
 
 

 ##########
 File path: 
phoenix-core/src/main/java/org/apache/phoenix/schema/stats/GuidePostsInfo.java
 ##########
 @@ -17,138 +17,771 @@
  */
 package org.apache.phoenix.schema.stats;
 
-import java.util.Collections;
-import java.util.List;
+import java.util.*;
 
-import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
+import com.google.common.annotations.VisibleForTesting;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Lists;
 import org.apache.hadoop.hbase.util.Bytes;
-import org.apache.phoenix.util.ByteUtil;
-import org.apache.phoenix.util.SizedUtil;
+import org.apache.hadoop.hbase.util.Pair;
+import org.apache.phoenix.schema.SortOrder;
+import org.apache.phoenix.util.ScanUtil;
+import org.apache.phoenix.util.ScanUtil.BytesComparator;
+import org.apache.phoenix.query.KeyRange;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
-import com.google.common.primitives.Longs;
-/**
- *  A class that holds the guidePosts of a region and also allows combining 
the 
- *  guidePosts of different regions when the GuidePostsInfo is formed for a 
table.
- */
-public class GuidePostsInfo {
-    public final static GuidePostsInfo NO_GUIDEPOST =
-            new GuidePostsInfo(Collections.<Long> emptyList(),
-                    new ImmutableBytesWritable(ByteUtil.EMPTY_BYTE_ARRAY),
-                    Collections.<Long> emptyList(), 0, 0, Collections.<Long> 
emptyList()) {
-                @Override
-                public int getEstimatedSize() {
-                    return 0;
-                }
-            };
-    
-    public final static byte[] EMPTY_GUIDEPOST_KEY = ByteUtil.EMPTY_BYTE_ARRAY;
-    
+class GuidePostTreeNode {
 
 Review comment:
   Also Unit tests please for all classes.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to