本文整理了Java中org.apache.gobblin.configuration.State.removePropsWithPrefix()
方法的一些代码示例,展示了State.removePropsWithPrefix()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。State.removePropsWithPrefix()
方法的具体详情如下:
包路径:org.apache.gobblin.configuration.State
类名称:State
方法名:removePropsWithPrefix
[英]Remove all properties with a certain keyPrefix
[中]删除具有特定密钥前缀的所有属性
代码示例来源:origin: apache/incubator-gobblin
/**
* Remove all lineage related properties from a state
*/
public static void purgeLineageInfo(State state) {
state.removePropsWithPrefix(LineageEventBuilder.LIENAGE_EVENT_NAMESPACE);
}
代码示例来源:origin: apache/incubator-gobblin
@Override
public void removePropsWithPrefix(String prefix) {
super.removePropsWithPrefix(prefix);
this.workUnit.removePropsWithPrefix(prefix);
this.jobState.removePropsWithPrefix(prefix);
}
代码示例来源:origin: apache/incubator-gobblin
@Test
public void testRemovePropsWithPrefix() {
final State state = new State();
final String prefix = "prefix";
for (int i = 0; i < 10; i++) {
state.setProp("prefix." + i, i);
}
Assert.assertTrue(state.getPropertyNames().size() == 10);
state.removePropsWithPrefix(prefix);
Assert.assertTrue(state.getPropertyNames().size() == 0);
}
}
代码示例来源:origin: org.apache.gobblin/gobblin-metrics-base
/**
* Remove all lineage related properties from a state
*/
public static void purgeLineageInfo(State state) {
state.removePropsWithPrefix(LineageEventBuilder.LIENAGE_EVENT_NAMESPACE);
}
代码示例来源:origin: org.apache.gobblin/gobblin-api
@Override
public void removePropsWithPrefix(String prefix) {
super.removePropsWithPrefix(prefix);
this.workUnit.removePropsWithPrefix(prefix);
this.jobState.removePropsWithPrefix(prefix);
}
内容来源于网络,如有侵权,请联系作者删除!