accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubbsii <...@git.apache.org>
Subject [GitHub] accumulo pull request: ACCUMULO-4187: Added rate limiting for majo...
Date Wed, 13 Apr 2016 18:12:31 GMT
Github user ctubbsii commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/90#discussion_r59597441
  
    --- 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 --
    
    > Somehow get the RateLimiterFactory directly from the config? That'd be a stop-gap.
    
    @joshelser Not sure exactly what you mean, but what I meant was along the lines of creating
a "FileOptions" (or similar) object to pass around instead of the AccumuloConfiguration object
which is narrowly applicable to the context of those utility methods (context: operations
on files?), and which is composed of the relevant configs from wherever they are sourced.
    
    @ShawnWalker I would consider it an optional improvement to this pull request. If the
code modified here can be clearly demarcated as a distinct context, it may benefit from this
kind of improvement as an alternative to adding the extra parameter everywhere. It can also
be done at some future point in time, as a more general improvement (and a much bigger one...
as it would require identifying multiple distinct contexts instead of possibly doing one at
a time).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message