accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From keith-turner <...@git.apache.org>
Subject [GitHub] accumulo pull request: ACCUMULO-3602 BatchScanner optimization for...
Date Tue, 07 Apr 2015 21:55:58 GMT
Github user keith-turner commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/25#discussion_r27924910
  
    --- Diff: core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/impl/InputConfigurator.java
---
    @@ -517,6 +517,74 @@ public static Boolean isOfflineScan(Class<?> implementingClass,
Configuration co
       }
     
       /**
    +   * Controls the use of the {@link BatchScanner} in this job.
    +   * Using this feature will group ranges by their source tablet per InputSplit and use
BatchScanner to read them.
    +   *
    +   * <p>
    +   * By default, this feature is <b>disabled</b>.
    +   *
    +   * @param implementingClass
    +   *          the class whose name will be used as a prefix for the property configuration
key
    +   * @param conf
    +   *          the Hadoop configuration object to configure
    +   * @param enableFeature
    +   *          the feature is enabled if true, disabled otherwise
    +   * @since 1.7.0
    +   */
    +  public static void setBatchScan(Class<?> implementingClass, Configuration conf,
boolean enableFeature) {
    +    conf.setBoolean(enumToConfKey(implementingClass, Features.BATCH_SCANNER), enableFeature);
    +  }
    +
    +  /**
    +   * Determines whether a configuration has the BatchScanner feature enabled.
    +   *
    +   * @param implementingClass
    +   *          the class whose name will be used as a prefix for the property configuration
key
    +   * @param conf
    +   *          the Hadoop configuration object to configure
    +   * @return true if the feature is enabled, false otherwise
    +   * @since 1.7.0
    +   * @see #setBatchScan(Class, Configuration, boolean)
    +   */
    +  public static Boolean isBatchScan(Class<?> implementingClass, Configuration conf)
{
    +    return conf.getBoolean(enumToConfKey(implementingClass, Features.BATCH_SCANNER),
false);
    +  }
    +
    +  /**
    +   * Controls the use of the {@link BatchScanner} in this job.
    +   * Using this feature will group ranges by their source tablet per InputSplit and use
BatchScanner to read them.
    +   *
    +   * <p>
    +   * By default, this feature is <b>disabled</b>.
    +   *
    +   * @param implementingClass
    +   *          the class whose name will be used as a prefix for the property configuration
key
    +   * @param conf
    +   *          the Hadoop configuration object to configure
    +   * @param count
    +   *          number of threads to use with BatchScanner
    +   * @since 1.7.0
    +   */
    +  public static void setBatchScanThreads(Class<?> implementingClass, Configuration
conf, int count) {
    --- End diff --
    
    >  Should it still remain for future refactors where BatchInputSplit gets initialized
with ranges that span tablets?
    
    Could remove the methods for now and a future changes could add them if needed.  Having
them the way things work now is misleading.  
    
    > Perhaps reduce default to one thread for now?
    
    If the methods were removed, the implementation could do that.  


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