Github user ctubbsii commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/90#discussion_r59571367
  
    --- Diff: 
core/src/main/java/org/apache/accumulo/core/file/FileOperations.java ---
    @@ -55,23 +56,24 @@ public static FileOperations getInstance() {
        */
     
       public abstract FileSKVIterator openReader(String file, Range range, 
Set<ByteSequence> columnFamilies, boolean inclusive, FileSystem fs, 
Configuration conf,
    -      AccumuloConfiguration tableConf) throws IOException;
    +      RateLimiter readLimiter, AccumuloConfiguration tableConf) throws 
IOException;
     
       public abstract FileSKVIterator openReader(String file, Range range, 
Set<ByteSequence> columnFamilies, boolean inclusive, FileSystem fs, 
Configuration conf,
    -      AccumuloConfiguration tableConf, BlockCache dataCache, BlockCache 
indexCache) throws IOException;
    +      RateLimiter readLimiter, AccumuloConfiguration tableConf, BlockCache 
dataCache, BlockCache indexCache) throws IOException;
     
       /**
        * Open a reader that fully support seeking and also enable any 
optimizations related to seeking, like bloom filters.
        *
        */
     
    -  public abstract FileSKVIterator openReader(String file, boolean 
seekToBeginning, FileSystem fs, Configuration conf, AccumuloConfiguration 
acuconf)
    -      throws IOException;
    +  public abstract FileSKVIterator openReader(String file, boolean 
seekToBeginning, FileSystem fs, Configuration conf, RateLimiter readLimiter,
    --- End diff --
    
    So, I've had some thoughts on this as well. A lot of our internal passing 
around of AccumuloConfiguration makes it easy to lose track of where the 
configuration object came from, making it harder to ensure we're not using it 
outside the intended scope (for example, if it represents a TableConfiguration).
    
    In many parts of our internal code, I would prefer we grab what we need 
from AccumuloConfiguration, combine it with any additional configuration 
appropriate for that specific context, and create a new context-specific 
configuration object to pass around within that context.
    
    If we were to do something like that, what would the context granularity be 
here? "file operations options", "file reading options", something else?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to