You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by GitBox <gi...@apache.org> on 2019/06/25 01:03:16 UTC

[GitHub] [phoenix] yanxinyi commented on a change in pull request #482: PHOENIX-4925 Use a Variant Segment tree to organize Guide Post Info

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

 ##########
 File path: phoenix-core/src/main/java/org/apache/phoenix/schema/stats/GuidePostChunk.java
 ##########
 @@ -0,0 +1,227 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.phoenix.schema.stats;
+
+import com.google.common.collect.Lists;
+import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
+import org.apache.phoenix.query.KeyRange;
+import org.apache.phoenix.util.Closeables;
+import org.apache.phoenix.util.PrefixByteCodec;
+import org.apache.phoenix.util.PrefixByteDecoder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.ByteArrayInputStream;
+import java.io.DataInput;
+import java.io.DataInputStream;
+import java.io.EOFException;
+import java.util.List;
+
+/**
+ * A guide post chunk is comprised of a group of guide posts, and it has one of key ranges below:
+ *     (UNBOUND, gp_i0], (gp_i0, gp_i1], (gp_i1, gp_i2], ..., (gp_in, gp_n], (gp_n, UNBOUND)
+ * where gp_x is one of guide post collected on the server side. The last guide post chunk is a DUMMY chunk
+ * which contains one DUMMY guide post.
+ *
+ * Eventually the guide post chunk should be built and compressed on the server side when collecting stats.
+ * It is now the minimal data unit for compression/decompression and will be the minimal data unit stored
+ * into the SYSTEM_STATS table in the future.
+ */
+public final class GuidePostChunk {
+    public static final int INVALID_GUIDEPOST_CHUNK_INDEX = -1;
+    public static final Logger logger = LoggerFactory.getLogger(GuidePostChunk.class);
 
 Review comment:
   Let's use `LOGGER` instead of `logger` here.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services