本文整理了Java中com.alibaba.datax.common.util.Configuration.getChar()
方法的一些代码示例,展示了Configuration.getChar()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Configuration.getChar()
方法的具体详情如下:
包路径:com.alibaba.datax.common.util.Configuration
类名称:Configuration
方法名:getChar
[英]根据用户提供的json path,寻址Character对象
[中]根据用户提供的json路径寻址性格对象
代码示例来源:origin: ECNU-1X/DataX-Masking
/**
* 根据用户提供的json path,寻址Boolean对象,如果对象不存在,返回默认Character对象
*
* @return Character对象,如果path不存在或者Character不存在,返回默认Character对象
*/
public Character getChar(final String path, char defaultValue) {
Character result = this.getChar(path);
if (null == result) {
return defaultValue;
}
return result;
}
代码示例来源:origin: ECNU-1X/DataX-Masking
public static Record transportOneRecord(RecordSender recordSender,
Configuration configuration,
TaskPluginCollector taskPluginCollector,
String line){
List<ColumnEntry> column = UnstructuredStorageReaderUtil
.getListColumnEntry(configuration, Key.COLUMN);
// 注意: nullFormat 没有默认值
String nullFormat = configuration.getString(Key.NULL_FORMAT);
String delimiterInStr = configuration.getString(Key.FIELD_DELIMITER);
if (null != delimiterInStr && 1 != delimiterInStr.length()) {
throw DataXException.asDataXException(
UnstructuredStorageReaderErrorCode.ILLEGAL_VALUE,
String.format("仅仅支持单字符切分, 您配置的切分为 : [%s]", delimiterInStr));
}
if (null == delimiterInStr) {
LOG.warn(String.format("您没有配置列分隔符, 使用默认值[%s]",
Constant.DEFAULT_FIELD_DELIMITER));
}
// warn: default value ',', fieldDelimiter could be \n(lineDelimiter)
// for no fieldDelimiter
Character fieldDelimiter = configuration.getChar(Key.FIELD_DELIMITER,
Constant.DEFAULT_FIELD_DELIMITER);
String[] sourceLine = StringUtils.split(line, fieldDelimiter);
return transportOneRecord(recordSender, column, sourceLine, nullFormat, taskPluginCollector);
}
代码示例来源:origin: ECNU-1X/DataX-Masking
char fieldDelimiter = config.getChar(Key.FIELD_DELIMITER,
Constant.DEFAULT_FIELD_DELIMITER);
代码示例来源:origin: ECNU-1X/DataX-Masking
char fieldDelimiter = config.getChar(Key.FIELD_DELIMITER);
List<Configuration> columns = config.getListConfiguration(Key.COLUMN);
String compress = config.getString(Key.COMPRESS,null);
代码示例来源:origin: ECNU-1X/DataX-Masking
fieldDelimiter = readerSliceConfig.getChar(Key.FIELD_DELIMITER,
Constant.DEFAULT_FIELD_DELIMITER);
Boolean skipHeader = readerSliceConfig.getBool(Key.SKIP_HEADER,
代码示例来源:origin: ECNU-1X/DataX-Masking
com.alibaba.datax.plugin.unstructuredstorage.writer.Constant.DEFAULT_ENCODING);
this.fieldDelimiter = this.writerSliceConfig
.getChar(
com.alibaba.datax.plugin.unstructuredstorage.writer.Key.FIELD_DELIMITER,
com.alibaba.datax.plugin.unstructuredstorage.writer.Constant.DEFAULT_FIELD_DELIMITER);
内容来源于网络,如有侵权,请联系作者删除!