carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jackylk <...@git.apache.org>
Subject [GitHub] incubator-carbondata pull request #362: [CARBONDATA-459] Block distribution ...
Date Tue, 29 Nov 2016 15:35:23 GMT
Github user jackylk commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/362#discussion_r90033528
  
    --- Diff: integration/spark/src/main/scala/org/apache/spark/sql/hive/DistributionUtil.scala
---
    @@ -101,47 +101,107 @@ object DistributionUtil {
        * Checking if the existing executors is greater than configured executors, if yes
        * returning configured executors.
        *
    -   * @param blockList
    +   * @param blockList total number of blocks in the identified segments
        * @param sparkContext
        * @return
        */
       def ensureExecutorsAndGetNodeList(blockList: Seq[Distributable],
         sparkContext: SparkContext): Seq[String] = {
         val nodeMapping = CarbonLoaderUtil.getRequiredExecutors(blockList.asJava)
    -    var confExecutorsTemp: String = null
    -    if (sparkContext.getConf.contains("spark.executor.instances")) {
    -      confExecutorsTemp = sparkContext.getConf.get("spark.executor.instances")
    -    } else if (sparkContext.getConf.contains("spark.dynamicAllocation.enabled")
    -               && sparkContext.getConf.get("spark.dynamicAllocation.enabled").trim
    -                 .equalsIgnoreCase("true")) {
    -      if (sparkContext.getConf.contains("spark.dynamicAllocation.maxExecutors")) {
    -        confExecutorsTemp = sparkContext.getConf.get("spark.dynamicAllocation.maxExecutors")
    +    ensureExecutorsByNumberAndGetNodeList(nodeMapping, blockList, sparkContext)
    +  }
    +
    +  /**
    +   * This method will ensure that the required/configured number of executors are requested
    +   * for processing the identified blocks
    +   *
    +   * @param nodeMapping
    +   * @param blockList
    +   * @param sparkContext
    +   * @return
    +   */
    +  private def ensureExecutorsByNumberAndGetNodeList(nodeMapping: java.util.Map[String,
java.util
    +  .List[Distributable]], blockList: Seq[Distributable],
    --- End diff --
    
    please format the code style for parameter list correctly


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