private void preReadMetricSetting() {
        String tmpValue;
        // read whether enable file metric
        tmpValue = this.props.get(KEY_ENABLE_FILE_METRIC);
        if (StringUtils.isNotEmpty(tmpValue)) {
            this.enableFileMetric = "TRUE".equalsIgnoreCase(tmpValue.trim());
        }
        // read file metric statistic interval
        tmpValue = this.props.get(KEY_FILE_METRIC_STAT_INTERVAL_SEC);
        if (StringUtils.isNotEmpty(tmpValue)) {
            int statInvl = NumberUtils.toInt(
                    tmpValue.trim(), VAL_DEF_FILE_METRIC_STAT_INVL_SEC);
            if (statInvl >= VAL_MIN_FILE_METRIC_STAT_INVL_SEC) {
                this.fileMetricStatInvlSec = statInvl;
            }
        }
        // read file metric statistic max cache count
        tmpValue = this.props.get(KEY_FILE_METRIC_MAX_CACHE_CNT);
        if (StringUtils.isNotEmpty(tmpValue)) {
            int maxCacheCnt = NumberUtils.toInt(
                    tmpValue.trim(), VAL_DEF_FILE_METRIC_MAX_CACHE_CNT);
            if (maxCacheCnt >= VAL_MIN_FILE_METRIC_MAX_CACHE_CNT) {
                this.fileMetricStatCacheCnt = maxCacheCnt;
            }
        }
        // read source file statistic output name
        tmpValue = this.props.get(KEY_FILE_METRIC_SOURCE_OUTPUT_NAME);
        if (StringUtils.isNotBlank(tmpValue)) {
            this.fileMetricSourceOutName = tmpValue.trim();
        }
        // read sink file statistic output name
        tmpValue = this.props.get(KEY_FILE_METRIC_SINK_OUTPUT_NAME);
        if (StringUtils.isNotBlank(tmpValue)) {
            this.fileMetricSinkOutName = tmpValue.trim();
        }
        // read event file statistic output name
        tmpValue = this.props.get(KEY_FILE_METRIC_EVENT_OUTPUT_NAME);
        if (StringUtils.isNotBlank(tmpValue)) {
            this.fileMetricEventOutName = tmpValue.trim();
        }
    }
getStringFromContext

@param context
@param key
@param defaultValue
@return
inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/config/CommonConfigHolder.java