public VersionedConnection mapConnection(final Connection connection) { final FlowFileQueue queue = connection.getFlowFileQueue(); final VersionedConnection versionedConnection = new InstantiatedVersionedConnection(connection.getIdentifier(), connection.getProcessGroup().getIdentifier()); versionedConnection.setIdentifier(getId(connection.getVersionedComponentId(), connection.getIdentifier())); versionedConnection.setGroupIdentifier(getGroupId(connection.getProcessGroup().getIdentifier())); versionedConnection.setName(connection.getName()); versionedConnection.setBackPressureDataSizeThreshold(queue.getBackPressureDataSizeThreshold()); versionedConnection.setBackPressureObjectThreshold(queue.getBackPressureObjectThreshold()); versionedConnection.setFlowFileExpiration(queue.getFlowFileExpiration()); versionedConnection.setLabelIndex(connection.getLabelIndex()); versionedConnection.setPrioritizers(queue.getPriorities().stream().map(p -> p.getClass().getName()).collect(Collectors.toList())); versionedConnection.setSelectedRelationships(connection.getRelationships().stream().map(Relationship::getName).collect(Collectors.toSet())); versionedConnection.setzIndex(connection.getZIndex()); final FlowFileQueue flowFileQueue = connection.getFlowFileQueue(); versionedConnection.setLoadBalanceStrategy(flowFileQueue.getLoadBalanceStrategy().name()); versionedConnection.setPartitioningAttribute(flowFileQueue.getPartitioningAttribute()); versionedConnection.setLoadBalanceCompression(flowFileQueue.getLoadBalanceCompression().name()); versionedConnection.setBends(connection.getBendPoints().stream() .map(this::mapPosition) .collect(Collectors.toList())); versionedConnection.setSource(mapConnectable(connection.getSource())); versionedConnection.setDestination(mapConnectable(connection.getDestination())); return versionedConnection; }
dto.setLoadBalancePartitionAttribute(flowFileQueue.getPartitioningAttribute()); dto.setLoadBalanceStrategy(loadBalanceStrategy.name()); dto.setLoadBalanceCompression(flowFileQueue.getLoadBalanceCompression().name());
addTextElement(element, "loadBalanceCompression", connection.getFlowFileQueue().getLoadBalanceCompression().name());