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_r275087259
 
 

 ##########
 File path: 
phoenix-core/src/it/java/org/apache/phoenix/schema/stats/BaseStatsCollectorIT.java
 ##########
 @@ -734,20 +734,18 @@ public void 
testRowCountWhenNumKVsExceedCompactionScannerThreshold() throws Exce
     }
 
     private void verifyGuidePostGenerated(ConnectionQueryServices 
queryServices,
-            String tableName, String[] familyNames,
-            long guidePostWidth, boolean emptyGuidePostExpected) throws 
Exception {
+            String tableName, String[] familyNames, long 
expectedEstimatedSize) throws Exception {
         try (Table statsHTable =
                 queryServices.getTable(
                         
SchemaUtil.getPhysicalName(PhoenixDatabaseMetaData.SYSTEM_STATS_NAME_BYTES,
                                 queryServices.getProps()).getName())) {
             for (String familyName : familyNames) {
                 GuidePostsInfo gps =
-                        StatisticsUtil.readStatistics(statsHTable,
+                        StatisticsUtil.readStatistics(new 
GuidePostsInfoBuilder(), statsHTable,
                                 new GuidePostsKey(Bytes.toBytes(tableName), 
Bytes.toBytes(familyName)),
                                 HConstants.LATEST_TIMESTAMP);
-                assertTrue(emptyGuidePostExpected ? gps.isEmptyGuidePost() : 
!gps.isEmptyGuidePost());
-                assertTrue(gps.getByteCounts()[0] >= guidePostWidth);
-                assertTrue(gps.getGuidePostTimestamps()[0] > 0);
+                assertTrue(gps.getTotalEstimation().getByteCount() >= 
expectedEstimatedSize);
 
 Review comment:
   how much effort is it to get this to an assertEquals? 

----------------------------------------------------------------
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