本文整理了Java中com.alibaba.datax.common.util.Configuration.getInternal()
方法的一些代码示例,展示了Configuration.getInternal()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Configuration.getInternal()
方法的具体详情如下:
包路径:com.alibaba.datax.common.util.Configuration
类名称:Configuration
方法名:getInternal
暂无
代码示例来源:origin: ECNU-1X/DataX-Masking
private Object extractFromConfiguration(final Object object) {
if (object instanceof Configuration) {
return ((Configuration) object).getInternal();
}
return object;
}
代码示例来源:origin: ECNU-1X/DataX-Masking
/**
* 格式化Configuration输出
*/
public String beautify() {
return JSON.toJSONString(this.getInternal(),
SerializerFeature.PrettyFormat);
}
代码示例来源:origin: ECNU-1X/DataX-Masking
/**
* 将Configuration作为JSON输出
*/
public String toJSON() {
return Configuration.toJSONString(this.getInternal());
}
代码示例来源:origin: ECNU-1X/DataX-Masking
/**
* 获取Configuration下所有叶子节点的key
* <p/>
* <br>
* <p/>
* 对于<br>
* <p/>
* {"a": {"b": {"c": [0,1,2,3]}}, "x": "y"}
* <p/>
* 下属的key包括: a.b.c[0],a.b.c[1],a.b.c[2],a.b.c[3],x
*/
public Set<String> getKeys() {
Set<String> collect = new HashSet<String>();
this.getKeysRecursive(this.getInternal(), "", collect);
return collect;
}
代码示例来源:origin: ECNU-1X/DataX-Masking
/**
* 拷贝当前Configuration,注意,这里使用了深拷贝,避免冲突
*/
public Configuration clone() {
Configuration config = Configuration
.from(Configuration.toJSONString(this.getInternal()));
config.addSecretKeyPath(this.secretKeyPathSet);
return config;
}
代码示例来源:origin: ECNU-1X/DataX-Masking
public static Configuration parseOnePluginConfig(final String path,
final String type,
Set<String> pluginSet, List<String> wantPluginNames) {
String filePath = path + File.separator + "plugin.json";
Configuration configuration = Configuration.from(new File(filePath));
String pluginPath = configuration.getString("path");
String pluginName = configuration.getString("name");
if(!pluginSet.contains(pluginName)) {
pluginSet.add(pluginName);
} else {
throw DataXException.asDataXException(FrameworkErrorCode.PLUGIN_INIT_ERROR, "插件加载失败,存在重复插件:" + filePath);
}
//不是想要的插件,返回null
if (wantPluginNames != null && wantPluginNames.size() > 0 && !wantPluginNames.contains(pluginName)) {
return null;
}
boolean isDefaultPath = StringUtils.isBlank(pluginPath);
if (isDefaultPath) {
configuration.set("path", path);
}
Configuration result = Configuration.newDefault();
result.set(
String.format("plugin.%s.%s", type, pluginName),
configuration.getInternal());
return result;
}
内容来源于网络,如有侵权,请联系作者删除!