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:21:30 GMT
Github user keith-turner commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/25#discussion_r27921845
  
    --- 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 --
    
    The batch scanner will not use more than one thread per tablet.  If each mapper is using
a batch scanner to read multiple ranges from a single tablet, then the batch scanner will
only use a single thread to do this even if it has more threads it could use.


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