本文整理了Java中org.apache.nifi.processor.Relationship.getDescription
方法的一些代码示例,展示了Relationship.getDescription
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Relationship.getDescription
方法的具体详情如下:
包路径:org.apache.nifi.processor.Relationship
类名称:Relationship
方法名:getDescription
暂无
代码示例来源:origin: apache/nifi
@Override
public void update(Map<String, Integer> loadInfo) {
for (Relationship rel : relationshipsRef.get()) {
String hostname = rel.getDescription();
Integer weight = 1;
if (loadInfo.containsKey(hostname)) {
weight = loadInfo.get(hostname);
}
weightings.put(Integer.decode(rel.getName()), weight);
}
updateWeightedRelationships(weightings);
}
};
代码示例来源:origin: apache/nifi
/**
* Writes a table describing the relations a processor has.
*
* @param processor the processor to describe
* @param xmlStreamWriter the stream writer to use
* @throws XMLStreamException thrown if there was a problem writing the xml
*/
private void writeRelationships(final Processor processor, final XMLStreamWriter xmlStreamWriter)
throws XMLStreamException {
writeSimpleElement(xmlStreamWriter, "h3", "Relationships: ");
if (processor.getRelationships().size() > 0) {
xmlStreamWriter.writeStartElement("table");
xmlStreamWriter.writeAttribute("id", "relationships");
xmlStreamWriter.writeStartElement("tr");
writeSimpleElement(xmlStreamWriter, "th", "Name");
writeSimpleElement(xmlStreamWriter, "th", "Description");
xmlStreamWriter.writeEndElement();
for (Relationship relationship : processor.getRelationships()) {
xmlStreamWriter.writeStartElement("tr");
writeSimpleElement(xmlStreamWriter, "td", relationship.getName());
writeSimpleElement(xmlStreamWriter, "td", relationship.getDescription());
xmlStreamWriter.writeEndElement();
}
xmlStreamWriter.writeEndElement();
} else {
xmlStreamWriter.writeCharacters("This processor has no relationships.");
}
}
代码示例来源:origin: apache/nifi
String hostname = rel.getDescription();
Integer weight = 1;
if (loadInfo.containsKey(hostname)) {
代码示例来源:origin: apache/nifi
@Override
protected void writeRelationships(final Set<Relationship> relationships) throws IOException {
writeArray("relationships", relationships,rel -> {
writeStartElement("relationship");
writeTextElement("name", rel.getName());
writeTextElement("description", rel.getDescription());
writeBooleanElement("autoTerminated", rel.isAutoTerminated());
writeEndElement();
} );
}
代码示例来源:origin: apache/nifi
for (final Relationship rel : node.getRelationships()) {
final RelationshipDTO relationshipDTO = new RelationshipDTO();
relationshipDTO.setDescription(rel.getDescription());
relationshipDTO.setName(rel.getName());
relationshipDTO.setAutoTerminate(node.isAutoTerminated(rel));
代码示例来源:origin: org.apache.nifi/nifi-standard-processors
@Override
public void update(Map<String, Integer> loadInfo) {
for (Relationship rel : relationshipsRef.get()) {
String hostname = rel.getDescription();
Integer weight = 1;
if (loadInfo.containsKey(hostname)) {
weight = loadInfo.get(hostname);
}
weightings.put(Integer.decode(rel.getName()), weight);
}
updateWeightedRelationships(weightings);
}
};
代码示例来源:origin: org.apache.nifi/nifi-standard-processors
String hostname = rel.getDescription();
Integer weight = 1;
if (loadInfo.containsKey(hostname)) {
内容来源于网络,如有侵权,请联系作者删除!