mikewalch commented on a change in pull request #378: ACCUMULO-4800 Cache 
parsing of iterator config
URL: https://github.com/apache/accumulo/pull/378#discussion_r168858373
 
 

 ##########
 File path: 
server/base/src/main/java/org/apache/accumulo/server/conf/TableConfiguration.java
 ##########
 @@ -144,4 +163,50 @@ public String toString() {
   public long getUpdateCount() {
     return parent.getUpdateCount() + 
getPropCacheAccessor().getZooCache().getUpdateCount();
   }
+
+  public static class ParsedIteratorConfig {
+    private final List<IterInfo> tableIters;
+    private final Map<String,Map<String,String>> tableOpts;
+    private final String context;
+    private final long updateCount;
+
+    private ParsedIteratorConfig(List<IterInfo> ii, 
Map<String,Map<String,String>> opts, String context, long updateCount) {
+      this.tableIters = ImmutableList.copyOf(ii);
+      Builder<String,Map<String,String>> imb = ImmutableMap.builder();
+      for (Entry<String,Map<String,String>> entry : opts.entrySet()) {
+        imb.put(entry.getKey(), ImmutableMap.copyOf(entry.getValue()));
+      }
+      tableOpts = imb.build();
+      this.context = context;
+      this.updateCount = updateCount;
+    }
+
+    public List<IterInfo> getIterInfo() {
+      return tableIters;
+    }
+
+    public Map<String,Map<String,String>> getOpts() {
+      return tableOpts;
+    }
+
+    public String getContext() {
+      return context;
+    }
+  }
+
+  public ParsedIteratorConfig getParsedIteratorConfig(IteratorScope scope) {
+    long count = getUpdateCount();
 
 Review comment:
   I see that the iterator config will change if this count changes.  When does 
this count change?

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


With regards,
Apache Git Services

Reply via email to