本文整理汇总了Java中org.apache.flink.util.InstantiationUtil.readObjectFromConfig方法的典型用法代码示例。如果您正苦于以下问题:Java InstantiationUtil.readObjectFromConfig方法的具体用法?Java InstantiationUtil.readObjectFromConfig怎么用?Java InstantiationUtil.readObjectFromConfig使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.flink.util.InstantiationUtil
的用法示例。
在下文中一共展示了InstantiationUtil.readObjectFromConfig方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getStubWrapper
import org.apache.flink.util.InstantiationUtil; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public <T> UserCodeWrapper<T> getStubWrapper(ClassLoader cl) {
try {
return (UserCodeWrapper<T>) InstantiationUtil.readObjectFromConfig(this.config, STUB_OBJECT, cl);
} catch (ClassNotFoundException | IOException e) {
throw new CorruptConfigurationException("Could not read the user code wrapper: " + e.getMessage(), e);
}
}
示例2: getOutputPartitioner
import org.apache.flink.util.InstantiationUtil; //导入方法依赖的package包/类
public Partitioner<?> getOutputPartitioner(int outputNum, final ClassLoader cl) throws ClassNotFoundException {
try {
return (Partitioner<?>) InstantiationUtil.readObjectFromConfig(config, OUTPUT_PARTITIONER + outputNum, cl);
}
catch (ClassNotFoundException e) {
throw e;
}
catch (Throwable t) {
throw new RuntimeException("Could not deserialize custom partitioner.", t);
}
}
示例3: getTypeSerializerIn1
import org.apache.flink.util.InstantiationUtil; //导入方法依赖的package包/类
public <T> TypeSerializer<T> getTypeSerializerIn1(ClassLoader cl) {
try {
return InstantiationUtil.readObjectFromConfig(this.config, TYPE_SERIALIZER_IN_1, cl);
} catch (Exception e) {
throw new StreamTaskException("Could not instantiate serializer.", e);
}
}
示例4: getTypeSerializerIn2
import org.apache.flink.util.InstantiationUtil; //导入方法依赖的package包/类
public <T> TypeSerializer<T> getTypeSerializerIn2(ClassLoader cl) {
try {
return InstantiationUtil.readObjectFromConfig(this.config, TYPE_SERIALIZER_IN_2, cl);
} catch (Exception e) {
throw new StreamTaskException("Could not instantiate serializer.", e);
}
}
示例5: getTypeSerializerOut
import org.apache.flink.util.InstantiationUtil; //导入方法依赖的package包/类
public <T> TypeSerializer<T> getTypeSerializerOut(ClassLoader cl) {
try {
return InstantiationUtil.readObjectFromConfig(this.config, TYPE_SERIALIZER_OUT_1, cl);
} catch (Exception e) {
throw new StreamTaskException("Could not instantiate serializer.", e);
}
}
示例6: getTypeSerializerSideOut
import org.apache.flink.util.InstantiationUtil; //导入方法依赖的package包/类
public <T> TypeSerializer<T> getTypeSerializerSideOut(OutputTag<?> outputTag, ClassLoader cl) {
Preconditions.checkNotNull(outputTag, "Side output id must not be null.");
try {
return InstantiationUtil.readObjectFromConfig(this.config, TYPE_SERIALIZER_SIDEOUT_PREFIX + outputTag.getId(), cl);
} catch (Exception e) {
throw new StreamTaskException("Could not instantiate serializer.", e);
}
}
示例7: getOutputSelectors
import org.apache.flink.util.InstantiationUtil; //导入方法依赖的package包/类
public <T> List<OutputSelector<T>> getOutputSelectors(ClassLoader userCodeClassloader) {
try {
List<OutputSelector<T>> selectors =
InstantiationUtil.readObjectFromConfig(this.config, OUTPUT_SELECTOR_WRAPPER, userCodeClassloader);
return selectors == null ? Collections.<OutputSelector<T>>emptyList() : selectors;
} catch (Exception e) {
throw new StreamTaskException("Could not read output selectors", e);
}
}
示例8: getNonChainedOutputs
import org.apache.flink.util.InstantiationUtil; //导入方法依赖的package包/类
public List<StreamEdge> getNonChainedOutputs(ClassLoader cl) {
try {
List<StreamEdge> nonChainedOutputs = InstantiationUtil.readObjectFromConfig(this.config, NONCHAINED_OUTPUTS, cl);
return nonChainedOutputs == null ? new ArrayList<StreamEdge>() : nonChainedOutputs;
} catch (Exception e) {
throw new StreamTaskException("Could not instantiate non chained outputs.", e);
}
}
示例9: getChainedOutputs
import org.apache.flink.util.InstantiationUtil; //导入方法依赖的package包/类
public List<StreamEdge> getChainedOutputs(ClassLoader cl) {
try {
List<StreamEdge> chainedOutputs = InstantiationUtil.readObjectFromConfig(this.config, CHAINED_OUTPUTS, cl);
return chainedOutputs == null ? new ArrayList<StreamEdge>() : chainedOutputs;
} catch (Exception e) {
throw new StreamTaskException("Could not instantiate chained outputs.", e);
}
}
示例10: getOutEdges
import org.apache.flink.util.InstantiationUtil; //导入方法依赖的package包/类
public List<StreamEdge> getOutEdges(ClassLoader cl) {
try {
List<StreamEdge> outEdges = InstantiationUtil.readObjectFromConfig(this.config, OUT_STREAM_EDGES, cl);
return outEdges == null ? new ArrayList<StreamEdge>() : outEdges;
} catch (Exception e) {
throw new StreamTaskException("Could not instantiate outputs.", e);
}
}
示例11: getInPhysicalEdges
import org.apache.flink.util.InstantiationUtil; //导入方法依赖的package包/类
public List<StreamEdge> getInPhysicalEdges(ClassLoader cl) {
try {
List<StreamEdge> inEdges = InstantiationUtil.readObjectFromConfig(this.config, IN_STREAM_EDGES, cl);
return inEdges == null ? new ArrayList<StreamEdge>() : inEdges;
} catch (Exception e) {
throw new StreamTaskException("Could not instantiate inputs.", e);
}
}
示例12: getOutEdgesInOrder
import org.apache.flink.util.InstantiationUtil; //导入方法依赖的package包/类
public List<StreamEdge> getOutEdgesInOrder(ClassLoader cl) {
try {
List<StreamEdge> outEdgesInOrder = InstantiationUtil.readObjectFromConfig(this.config, EDGES_IN_ORDER, cl);
return outEdgesInOrder == null ? new ArrayList<StreamEdge>() : outEdgesInOrder;
} catch (Exception e) {
throw new StreamTaskException("Could not instantiate outputs in order.", e);
}
}
示例13: getTransitiveChainedTaskConfigs
import org.apache.flink.util.InstantiationUtil; //导入方法依赖的package包/类
public Map<Integer, StreamConfig> getTransitiveChainedTaskConfigs(ClassLoader cl) {
try {
Map<Integer, StreamConfig> confs = InstantiationUtil.readObjectFromConfig(this.config, CHAINED_TASK_CONFIG, cl);
return confs == null ? new HashMap<Integer, StreamConfig>() : confs;
} catch (Exception e) {
throw new StreamTaskException("Could not instantiate configuration.", e);
}
}
示例14: getStateBackend
import org.apache.flink.util.InstantiationUtil; //导入方法依赖的package包/类
public StateBackend getStateBackend(ClassLoader cl) {
try {
return InstantiationUtil.readObjectFromConfig(this.config, STATE_BACKEND, cl);
} catch (Exception e) {
throw new StreamTaskException("Could not instantiate statehandle provider.", e);
}
}
示例15: getStatePartitioner
import org.apache.flink.util.InstantiationUtil; //导入方法依赖的package包/类
public KeySelector<?, Serializable> getStatePartitioner(int input, ClassLoader cl) {
try {
return InstantiationUtil.readObjectFromConfig(this.config, STATE_PARTITIONER + input, cl);
} catch (Exception e) {
throw new StreamTaskException("Could not instantiate state partitioner.", e);
}
}