You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "keith-turner (via GitHub)" <gi...@apache.org> on 2023/11/06 18:05:19 UTC

[I] Look into adding filters to Ample [accumulo]

keith-turner opened a new issue, #3933:
URL: https://github.com/apache/accumulo/issues/3933

   As outlined in [this comment](https://github.com/apache/accumulo/pull/3929#discussion_r1382616473) it may be useful to add filters to Ample.  These filters could configure an iterator on the scanner to do server side filtering.
   
   A use case for this could be the GarbageCollectWriteAheadLogs class which needs to find all tablets with write ahead logs.  In #3904 the WAL GC class was moved away from using the TabletManagmentIterator to just using Ample.  This was done because the TabletMgmtIter is tightly coupled to the TabletGroupWatcher and using it elsewhere may introduce bugs (because when it is modified, only the TGW uses cases may be considered).  When GarbageCollectWriteAheadLogs was using the TabletManagmentIterator it was getting some server side filtering (although it was tricky to reason about the correctness of that filtering).
   
   Looking at [this code](https://github.com/apache/accumulo/blob/84419e33fc601e52626df25a1032dc0a20488eac/server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectWriteAheadLogs.java#L85) maybe it could be modified to look like the following.
   
   ```java
       this.store = () -> Iterators.concat(
           context.getAmple().readTablets().forLevel(DataLevel.ROOT).filter(new HasWalsFilter())
               .fetch(LOCATION, LAST, LOGS, PREV_ROW, SUSPEND).checkConsistency().build().iterator(),
           context.getAmple().readTablets().forLevel(DataLevel.METADATA).filter(new HasWalsFilter())
               .fetch(LOCATION, LAST, LOGS, PREV_ROW, SUSPEND).checkConsistency().build().iterator(),
           context.getAmple().readTablets().forLevel(DataLevel.USER).filter(new HasWalsFilter())
               .fetch(LOCATION, LAST, LOGS, PREV_ROW, SUSPEND).checkConsistency().build().iterator());
   ```
   
   In the example above `.filter(new HasWalsFilter())` add a custom filter to the Ample read that knows how to only returns tablet metadata rows from the server side that have write ahead logs.  


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

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Look into adding filters to Ample [accumulo]

Posted by "DomGarguilo (via GitHub)" <gi...@apache.org>.
DomGarguilo commented on issue #3933:
URL: https://github.com/apache/accumulo/issues/3933#issuecomment-1812844173

   Im going to assign myself as I plan to take a look into this ticket


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

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Look into adding filters to Ample [accumulo]

Posted by "DomGarguilo (via GitHub)" <gi...@apache.org>.
DomGarguilo commented on issue #3933:
URL: https://github.com/apache/accumulo/issues/3933#issuecomment-1878928398

   Fixed via #3968


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

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Look into adding filters to Ample [accumulo]

Posted by "DomGarguilo (via GitHub)" <gi...@apache.org>.
DomGarguilo closed issue #3933: Look into adding filters to Ample
URL: https://github.com/apache/accumulo/issues/3933


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

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org