[GitHub] carbondata pull request #972: [WIP] Added set command in carbon to update pr...

classic Classic list List threaded Threaded
95 messages Options
12345
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #972: [WIP] Added set command in carbon to update pr...

qiuchenjian-2
GitHub user ManoharVanam opened a pull request:

    https://github.com/apache/carbondata/pull/972

    [WIP] Added set command in carbon to update properties dynamically

    Currently there is no way to set the carbon properties dynamically, always need to update the carbon.properties file and restart the driver.
    So it will be easy for users to give option to add/update the properties dynamically through set command.
    The below sql command updates the carbon properties in driver and as well as in executor

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ManoharVanam/incubator-carbondata dynamic_new

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/carbondata/pull/972.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #972
   
----
commit 018e9b43130b92d293c2090146c4c84597be4965
Author: ravipesala <[hidden email]>
Date:   2017-05-18T09:34:17Z

    Adding session based properties
   
    Added set command in carbon to update properties dynamically

commit 6daf608b1ae701ce6a4c1d98236a24c3be98bbf1
Author: Manohar <[hidden email]>
Date:   2017-05-25T13:40:21Z

    Added ThreadLocalSession params
   
    Dynamic parameter support
   
    # Conflicts:
    # processing/src/main/java/org/apache/carbondata/processing/model/CarbonLoadModel.java

commit 13b52243502a0211de66271253753e864512ba25
Author: mohammadshahidkhan <[hidden email]>
Date:   2017-05-26T17:08:59Z

    validation
   
    # Conflicts:
    # core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java

commit a48ea746fd595df0ea005879318a0be1df10b0d5
Author: Manohar <[hidden email]>
Date:   2017-05-29T12:28:01Z

    Added thresholdLocal session params

commit 63b68c0835c3a063cbf8ab499f499a43dc2754e7
Author: Manohar <[hidden email]>
Date:   2017-05-29T15:46:26Z

    Refactored the code
   
    # Conflicts:
    # processing/src/main/java/org/apache/carbondata/processing/model/CarbonLoadModel.java

----


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #972: [WIP] Added set command in carbon to update propertie...

qiuchenjian-2
Github user kumarvishal09 commented on the issue:

    https://github.com/apache/carbondata/pull/972
 
    retest this please


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #972: [WIP] Added set command in carbon to update pr...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ManoharVanam closed the pull request at:

    https://github.com/apache/carbondata/pull/972


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #972: [WIP] Added set command in carbon to update pr...

qiuchenjian-2
In reply to this post by qiuchenjian-2
GitHub user ManoharVanam reopened a pull request:

    https://github.com/apache/carbondata/pull/972

    [WIP] Added set command in carbon to update properties dynamically

    Currently there is no way to set the carbon properties dynamically, always need to update the carbon.properties file and restart the driver.
    So it will be easy for users to give option to add/update the properties dynamically through set command.
    The below sql command updates the carbon properties in driver and as well as in executor

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ManoharVanam/incubator-carbondata dynamic_new

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/carbondata/pull/972.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #972
   
----
commit 48761df4fcf919999a8203453b272266f54c2c18
Author: ravipesala <[hidden email]>
Date:   2017-05-18T09:34:17Z

    Adding session based properties
   
    Added set command in carbon to update properties dynamically

commit cbe6c2f61774cccd1222516774489b7841b2cc0a
Author: Manohar <[hidden email]>
Date:   2017-05-25T13:40:21Z

    Added ThreadLocalSession params
   
    Dynamic parameter support
   
    # Conflicts:
    # processing/src/main/java/org/apache/carbondata/processing/model/CarbonLoadModel.java

commit 762f5564221964941b970e4c216ed019fca286c4
Author: mohammadshahidkhan <[hidden email]>
Date:   2017-05-26T17:08:59Z

    validation
   
    # Conflicts:
    # core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java

commit 74727b5de5d774a9cfc19072d8e1e2653953ef36
Author: Manohar <[hidden email]>
Date:   2017-05-29T12:28:01Z

    Added thresholdLocal session params

commit da67426ae80e6ac42fdfd1b2df5a2d45c231b548
Author: Manohar <[hidden email]>
Date:   2017-05-29T15:46:26Z

    Refactored the code
   
    # Conflicts:
    # processing/src/main/java/org/apache/carbondata/processing/model/CarbonLoadModel.java

----


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #972: [WIP] Added set command in carbon to update propertie...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user ManoharVanam commented on the issue:

    https://github.com/apache/carbondata/pull/972
 
    retest this please


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #972: [WIP] Added set command in carbon to update pr...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user gvramana commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/972#discussion_r119383601
 
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/CarbonHiveCommands.scala ---
    @@ -41,3 +43,36 @@ case class CarbonDropDatabaseCommand(command: DropDatabaseCommand)
       }
     }
     
    +case class CarbonSetCommand(command: SetCommand)
    +  extends RunnableCommand {
    +
    +  override val output = command.output
    +
    +  override def run(sparkSession: SparkSession): Seq[Row] = {
    +    if (command.kv.isDefined) {
    --- End diff --
   
    When only set , set key are used, which keys are displayed by spark, carbon also should be  consistant. like if spark shows default parameters carbon should also show. if spark shows property file content, carbon behaviour also should match


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #972: [WIP] Added set command in carbon to update pr...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user gvramana commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/972#discussion_r119385878
 
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/CarbonHiveCommands.scala ---
    @@ -41,3 +43,36 @@ case class CarbonDropDatabaseCommand(command: DropDatabaseCommand)
       }
     }
     
    +case class CarbonSetCommand(command: SetCommand)
    +  extends RunnableCommand {
    +
    +  override val output = command.output
    +
    +  override def run(sparkSession: SparkSession): Seq[Row] = {
    +    if (command.kv.isDefined) {
    +      command.kv match {
    +        case Some((key, Some(value))) =>
    +          val isCarbonProperty: Boolean = CarbonProperties.getInstance().isCarbonProperty(key)
    +          if (isCarbonProperty) {
    +            CarbonEnv.getInstance(sparkSession).sessionParams
    +              .addProperty(key, value)
    +          }
    +        case _ =>
    +
    +      }
    +    }
    +    val rows = command.run(sparkSession)
    --- End diff --
   
    variable not required directly return


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #972: [WIP] Added set command in carbon to update pr...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user gvramana commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/972#discussion_r119378513
 
    --- Diff: integration/spark/src/main/scala/org/apache/spark/sql/hive/execution/command/CarbonHiveCommands.scala ---
    @@ -53,3 +55,15 @@ private[hive] case class DropDatabaseCascadeCommand(dbName: String,
         rows
       }
     }
    +
    +case class CarbonSetCommand(command: SetCommand)
    --- End diff --
   
    remove this


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #972: [WIP] Added set command in carbon to update pr...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user gvramana commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/972#discussion_r119385679
 
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/CarbonHiveCommands.scala ---
    @@ -41,3 +43,36 @@ case class CarbonDropDatabaseCommand(command: DropDatabaseCommand)
       }
     }
     
    +case class CarbonSetCommand(command: SetCommand)
    +  extends RunnableCommand {
    +
    +  override val output = command.output
    +
    +  override def run(sparkSession: SparkSession): Seq[Row] = {
    +    if (command.kv.isDefined) {
    --- End diff --
   
    remove if check


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #972: [WIP] Added set command in carbon to update pr...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user gvramana commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/972#discussion_r119370103
 
    --- Diff: core/src/main/java/org/apache/carbondata/core/util/SessionParams.java ---
    @@ -0,0 +1,148 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.carbondata.core.util;
    +
    +import java.io.Serializable;
    +import java.util.HashMap;
    +import java.util.Map;
    +
    +import org.apache.carbondata.common.logging.LogService;
    +import org.apache.carbondata.common.logging.LogServiceFactory;
    +import org.apache.carbondata.core.cache.CacheProvider;
    +import org.apache.carbondata.core.exception.InvalidConfigurationException;
    +import static org.apache.carbondata.core.constants.CarbonCommonConstants.*;
    +
    +import org.apache.commons.lang.StringUtils;
    +
    +
    +/**
    + * This class maintains carbon session params
    + */
    +public class SessionParams implements Serializable {
    +
    +  private static final LogService LOGGER =
    +      LogServiceFactory.getLogService(CacheProvider.class.getName());
    +
    +  private Map<String, String> sProps;
    +
    +  public SessionParams() {
    +    sProps = new HashMap<>();
    +  }
    +
    +  /**
    +   * This method will be used to get the properties value
    +   *
    +   * @param key
    +   * @return properties value
    +   */
    +  public String getProperty(String key) {
    +    return sProps.get(key);
    +  }
    +
    +  /**
    +   * This method will be used to add a new property
    +   *
    +   * @param key
    +   * @return properties value
    +   */
    +  public SessionParams addProperty(String key, String value) throws InvalidConfigurationException {
    +    boolean isValidConf = validateKeyValue(key, value);
    +    if (isValidConf) {
    +      LOGGER.audit("The key " + key + " with value " + value + " added in the session param");
    +      sProps.put(key, value);
    +    }
    +    return this;
    +  }
    +
    +  private boolean validateKeyValue(String key, String value) throws InvalidConfigurationException {
    --- End diff --
   
    Here also case sensitive problem will come


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #972: [WIP] Added set command in carbon to update pr...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user gvramana commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/972#discussion_r119378907
 
    --- Diff: integration/spark2/src/main/scala/org/apache/carbondata/spark/rdd/CarbonDataRDDFactory.scala ---
    @@ -268,7 +268,7 @@ object CarbonDataRDDFactory {
               }
               // continue in case of exception also, check for all the tables.
               val isConcurrentCompactionAllowed = CarbonProperties.getInstance()
    -              .getProperty(CarbonCommonConstants.ENABLE_CONCURRENT_COMPACTION,
    +            .getProperty(CarbonCommonConstants.ENABLE_CONCURRENT_COMPACTION,
    --- End diff --
   
    No formatting changes allowed. Remove all formatting changes


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #972: [WIP] Added set command in carbon to update pr...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user gvramana commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/972#discussion_r119369628
 
    --- Diff: core/src/main/java/org/apache/carbondata/core/util/SessionParams.java ---
    @@ -0,0 +1,148 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.carbondata.core.util;
    +
    +import java.io.Serializable;
    +import java.util.HashMap;
    +import java.util.Map;
    +
    +import org.apache.carbondata.common.logging.LogService;
    +import org.apache.carbondata.common.logging.LogServiceFactory;
    +import org.apache.carbondata.core.cache.CacheProvider;
    +import org.apache.carbondata.core.exception.InvalidConfigurationException;
    +import static org.apache.carbondata.core.constants.CarbonCommonConstants.*;
    +
    +import org.apache.commons.lang.StringUtils;
    +
    +
    +/**
    + * This class maintains carbon session params
    + */
    +public class SessionParams implements Serializable {
    +
    +  private static final LogService LOGGER =
    +      LogServiceFactory.getLogService(CacheProvider.class.getName());
    +
    +  private Map<String, String> sProps;
    --- End diff --
   
    pass comparator to allow insensitive matching.


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #972: [WIP] Added set command in carbon to update pr...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user gvramana commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/972#discussion_r119370617
 
    --- Diff: core/src/main/java/org/apache/carbondata/core/util/SessionParams.java ---
    @@ -0,0 +1,148 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.carbondata.core.util;
    +
    +import java.io.Serializable;
    +import java.util.HashMap;
    +import java.util.Map;
    +
    +import org.apache.carbondata.common.logging.LogService;
    +import org.apache.carbondata.common.logging.LogServiceFactory;
    +import org.apache.carbondata.core.cache.CacheProvider;
    +import org.apache.carbondata.core.exception.InvalidConfigurationException;
    +import static org.apache.carbondata.core.constants.CarbonCommonConstants.*;
    +
    +import org.apache.commons.lang.StringUtils;
    +
    +
    +/**
    + * This class maintains carbon session params
    + */
    +public class SessionParams implements Serializable {
    +
    +  private static final LogService LOGGER =
    +      LogServiceFactory.getLogService(CacheProvider.class.getName());
    +
    +  private Map<String, String> sProps;
    +
    +  public SessionParams() {
    +    sProps = new HashMap<>();
    +  }
    +
    +  /**
    +   * This method will be used to get the properties value
    +   *
    +   * @param key
    +   * @return properties value
    +   */
    +  public String getProperty(String key) {
    +    return sProps.get(key);
    +  }
    +
    +  /**
    +   * This method will be used to add a new property
    +   *
    +   * @param key
    +   * @return properties value
    +   */
    +  public SessionParams addProperty(String key, String value) throws InvalidConfigurationException {
    +    boolean isValidConf = validateKeyValue(key, value);
    +    if (isValidConf) {
    +      LOGGER.audit("The key " + key + " with value " + value + " added in the session param");
    +      sProps.put(key, value);
    +    }
    +    return this;
    +  }
    +
    +  private boolean validateKeyValue(String key, String value) throws InvalidConfigurationException {
    +    boolean isValid;
    +    switch (key) {
    +      case ENABLE_DATA_LOADING_STATISTICS:
    +      case ENABLE_UNSAFE_SORT:
    +      case ENABLE_OFFHEAP_SORT:
    +      case ENABLE_INMEMORY_MERGE_SORT:
    +      case ENABLE_UNSAFE_IN_QUERY_EXECUTION:
    +      case USE_OFFHEAP_IN_QUERY_PROCSSING:
    +      case CARBON_CUSTOM_BLOCK_DISTRIBUTION:
    +        isValid = validateBoolean(value);
    +        if (!isValid) {
    +          handleFailure(key, value);
    +        }
    +        break;
    +      default:
    +        isValid = false;
    +        throw new InvalidConfigurationException(
    +            "The key " + key + " not supported for dynamic configuration.");
    +    }
    +    return isValid;
    +  }
    +
    +  /**
    +   * the method does the range validation if the min or max value is passed.
    +   *
    +   * @param value
    +   * @param minValue
    +   * @param maxValue
    +   * @return
    +   */
    +  private boolean validateIntRange(String value, String minValue, String maxValue) {
    --- End diff --
   
    Reuse this functions, may be move to validate util, currently being used


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #972: [WIP] Added set command in carbon to update pr...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user mohammadshahidkhan commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/972#discussion_r119400763
 
    --- Diff: core/src/main/java/org/apache/carbondata/core/util/SessionParams.java ---
    @@ -0,0 +1,148 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.carbondata.core.util;
    +
    +import java.io.Serializable;
    +import java.util.HashMap;
    +import java.util.Map;
    +
    +import org.apache.carbondata.common.logging.LogService;
    +import org.apache.carbondata.common.logging.LogServiceFactory;
    +import org.apache.carbondata.core.cache.CacheProvider;
    +import org.apache.carbondata.core.exception.InvalidConfigurationException;
    +import static org.apache.carbondata.core.constants.CarbonCommonConstants.*;
    +
    +import org.apache.commons.lang.StringUtils;
    +
    +
    +/**
    + * This class maintains carbon session params
    + */
    +public class SessionParams implements Serializable {
    +
    +  private static final LogService LOGGER =
    +      LogServiceFactory.getLogService(CacheProvider.class.getName());
    +
    +  private Map<String, String> sProps;
    +
    +  public SessionParams() {
    +    sProps = new HashMap<>();
    +  }
    +
    +  /**
    +   * This method will be used to get the properties value
    +   *
    +   * @param key
    +   * @return properties value
    +   */
    +  public String getProperty(String key) {
    +    return sProps.get(key);
    +  }
    +
    +  /**
    +   * This method will be used to add a new property
    +   *
    +   * @param key
    +   * @return properties value
    +   */
    +  public SessionParams addProperty(String key, String value) throws InvalidConfigurationException {
    +    boolean isValidConf = validateKeyValue(key, value);
    +    if (isValidConf) {
    +      LOGGER.audit("The key " + key + " with value " + value + " added in the session param");
    +      sProps.put(key, value);
    +    }
    +    return this;
    +  }
    +
    +  private boolean validateKeyValue(String key, String value) throws InvalidConfigurationException {
    --- End diff --
   
    even CarbonProperties is case sensitive


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata pull request #972: [WIP] Added set command in carbon to update pr...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user mohammadshahidkhan commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/972#discussion_r119401097
 
    --- Diff: core/src/main/java/org/apache/carbondata/core/util/SessionParams.java ---
    @@ -0,0 +1,148 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.carbondata.core.util;
    +
    +import java.io.Serializable;
    +import java.util.HashMap;
    +import java.util.Map;
    +
    +import org.apache.carbondata.common.logging.LogService;
    +import org.apache.carbondata.common.logging.LogServiceFactory;
    +import org.apache.carbondata.core.cache.CacheProvider;
    +import org.apache.carbondata.core.exception.InvalidConfigurationException;
    +import static org.apache.carbondata.core.constants.CarbonCommonConstants.*;
    +
    +import org.apache.commons.lang.StringUtils;
    +
    +
    +/**
    + * This class maintains carbon session params
    + */
    +public class SessionParams implements Serializable {
    +
    +  private static final LogService LOGGER =
    +      LogServiceFactory.getLogService(CacheProvider.class.getName());
    +
    +  private Map<String, String> sProps;
    --- End diff --
   
    even CarbonProperties is case sensitive, so no problem in having case sensitive


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #972: [WIP] Added set command in carbon to update propertie...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/972
 
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/2133/



---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #972: [CARBONDATA-1065] Added set command in carbon to upda...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/972
 
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/2137/



---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #972: [CARBONDATA-1065] Added set command in carbon to upda...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user gvramana commented on the issue:

    https://github.com/apache/carbondata/pull/972
 
    retest this please


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #972: [CARBONDATA-1065] Added set command in carbon to upda...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:

    https://github.com/apache/carbondata/pull/972
 
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder/2141/



---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] carbondata issue #972: [CARBONDATA-1065] Added set command in carbon to upda...

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user asfgit commented on the issue:

    https://github.com/apache/carbondata/pull/972
 
   
    Refer to this link for build results (access rights to CI server needed):
    https://builds.apache.org/job/carbondata-pr-spark-1.6/185/<h2>Failed Tests: <span class='status-failure'>1</span></h2><h3><a name='carbondata-pr-spark-1.6/org.apache.carbondata:carbondata-spark-common-test' /><a href='https://builds.apache.org/job/carbondata-pr-spark-1.6/185/org.apache.carbondata$carbondata-spark-common-test/testReport'>carbondata-pr-spark-1.6/org.apache.carbondata:carbondata-spark-common-test</a>: <span class='status-failure'>1</span></h3><ul><li><a href='https://builds.apache.org/job/carbondata-pr-spark-1.6/185/org.apache.carbondata$carbondata-spark-common-test/testReport/org.apache.carbondata.spark.testsuite.dataretention/DataRetentionConcurrencyTestCase/DataRetention_Concurrency_load_date/'><strong>org.apache.carbondata.spark.testsuite.dataretention.DataRetentionConcurrencyTestCase.DataRetention_Concurrency_load_date</strong></a></li></ul>



---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
12345