core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java
/**
   * the method decide and set the lock type based on the configured system type
   *
   * @param lockTypeConfigured
   */
the method decide and set the lock type based on the configured system type
@param lockTypeConfigured
the method decide and set the lock type based on the configured system type @param lockTypeConfigured
private void validateAndConfigureLockType(String lockTypeConfigured) {
    Configuration configuration = new Configuration(true);
    String defaultFs = configuration.get("fs.defaultFS");
    if (null != defaultFs && (defaultFs.startsWith(CarbonCommonConstants.HDFSURL_PREFIX)
        || defaultFs.startsWith(CarbonCommonConstants.VIEWFSURL_PREFIX) || defaultFs
        .startsWith(CarbonCommonConstants.ALLUXIOURL_PREFIX))
        && !CarbonCommonConstants.CARBON_LOCK_TYPE_HDFS.equalsIgnoreCase(lockTypeConfigured)) {
      LOGGER.warn("The value \"" + lockTypeConfigured + "\" configured for key "
          + LOCK_TYPE + " is invalid for current file system. "
          + "Use the default value " + CarbonCommonConstants.CARBON_LOCK_TYPE_HDFS + " instead.");
      carbonProperties.setProperty(LOCK_TYPE,
          CarbonCommonConstants.CARBON_LOCK_TYPE_HDFS);
    } else if (null != defaultFs && defaultFs.startsWith(CarbonCommonConstants.LOCAL_FILE_PREFIX)
        && !CarbonCommonConstants.CARBON_LOCK_TYPE_LOCAL.equalsIgnoreCase(lockTypeConfigured)) {
      carbonProperties.setProperty(LOCK_TYPE,
          CarbonCommonConstants.CARBON_LOCK_TYPE_LOCAL);
      LOGGER.warn("The value \"" + lockTypeConfigured + "\" configured for key "
          + LOCK_TYPE + " is invalid for current file system. "
          + "Use the default value " + CarbonCommonConstants.CARBON_LOCK_TYPE_LOCAL + " instead.");
    }
  }
private void validateAndConfigureLockType ( String lockTypeConfigured ) { Configuration configuration = new Configuration ( true ) ; String defaultFs = configuration . get ( "fs.defaultFS" ) ; if ( null != defaultFs && ( defaultFs . startsWith ( CarbonCommonConstants . HDFSURL_PREFIX ) || defaultFs . startsWith ( CarbonCommonConstants . VIEWFSURL_PREFIX ) || defaultFs . startsWith ( CarbonCommonConstants . ALLUXIOURL_PREFIX ) ) && ! CarbonCommonConstants . CARBON_LOCK_TYPE_HDFS . equalsIgnoreCase ( lockTypeConfigured ) ) { LOGGER . warn ( "The value \"" + lockTypeConfigured + "\" configured for key " + LOCK_TYPE + " is invalid for current file system. " + "Use the default value " + CarbonCommonConstants . CARBON_LOCK_TYPE_HDFS + " instead." ) ; carbonProperties . setProperty ( LOCK_TYPE , CarbonCommonConstants . CARBON_LOCK_TYPE_HDFS ) ; } else if ( null != defaultFs && defaultFs . startsWith ( CarbonCommonConstants . LOCAL_FILE_PREFIX ) && ! CarbonCommonConstants . CARBON_LOCK_TYPE_LOCAL . equalsIgnoreCase ( lockTypeConfigured ) ) { carbonProperties . setProperty ( LOCK_TYPE , CarbonCommonConstants . CARBON_LOCK_TYPE_LOCAL ) ; LOGGER . warn ( "The value \"" + lockTypeConfigured + "\" configured for key " + LOCK_TYPE + " is invalid for current file system. " + "Use the default value " + CarbonCommonConstants . CARBON_LOCK_TYPE_LOCAL + " instead." ) ; } }
the method decide and set the lock type based on the configured system type
 @param lockTypeConfigured
the method decide and set the lock type based on the configured system type @param lockTypeConfigured