public static int getIntValue(Context context, String fieldKey, int defVal) {
        String tmpVal = context.getString(fieldKey);
        if (StringUtils.isNotBlank(tmpVal)) {
            int result;
            tmpVal = tmpVal.trim();
            try {
                result = Integer.parseInt(tmpVal);
            } catch (Throwable e) {
                throw new IllegalArgumentException(
                        fieldKey + "(" + tmpVal + ") must specify an integer value!");
            }
            return result;
        }
        return defVal;
    }
Get the configuration value of integer type from the context

@param context  the context
@param fieldKey the configure key
@param defVal   the default value
@return the configuration value
inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/utils/ConfStringUtils.java