phoenix-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [phoenix] kadirozde commented on a change in pull request #469: PHOENIX-5156 Consistent Global Indexes for Non-Transactional Tables
Date Thu, 09 May 2019 20:59:49 GMT
kadirozde commented on a change in pull request #469: PHOENIX-5156 Consistent Global Indexes
for Non-Transactional Tables
URL: https://github.com/apache/phoenix/pull/469#discussion_r282644127
 
 

 ##########
 File path: phoenix-core/src/main/java/org/apache/phoenix/hbase/index/Indexer.java
 ##########
 @@ -116,18 +110,67 @@
   private static final Log LOG = LogFactory.getLog(Indexer.class);
   private static final OperationStatus IGNORE = new OperationStatus(OperationStatusCode.SUCCESS);
   private static final OperationStatus NOWRITE = new OperationStatus(OperationStatusCode.SUCCESS);
-  
+
+  /**
+   * Class to represent pending data table rows
+   */
+  private static class PendingRow {
+      private long latestTimestamp;
+      private long count;
+      PendingRow(long latestTimestamp) {
+          count = 1;
+          this.latestTimestamp = latestTimestamp;
+      }
+
+      public void add(long timestamp) {
+          count++;
+          if (latestTimestamp < timestamp) {
+              latestTimestamp = timestamp;
+          }
+      }
+
+      public void remove() {
+          count--;
+      }
+
+      public long getCount() {
+          return count;
+      }
+
+      public long getLatestTimestamp() {
+          return latestTimestamp;
+      }
+  }
 
   protected IndexWriter writer;
 
 Review comment:
   I will change the name as you suggested.

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

Mime
View raw message