Search in sources :

Example 1 with BatchSize

use of org.apache.nifi.registry.flow.BatchSize in project nifi by apache.

the class StandardProcessGroup method createPortDescriptor.

private RemoteProcessGroupPortDescriptor createPortDescriptor(final VersionedRemoteGroupPort proposed, final String componentIdSeed, final String rpgId) {
    final StandardRemoteProcessGroupPortDescriptor descriptor = new StandardRemoteProcessGroupPortDescriptor();
    descriptor.setVersionedComponentId(proposed.getIdentifier());
    final BatchSize batchSize = proposed.getBatchSize();
    if (batchSize != null) {
        descriptor.setBatchCount(batchSize.getCount());
        descriptor.setBatchDuration(batchSize.getDuration());
        descriptor.setBatchSize(batchSize.getSize());
    }
    descriptor.setComments(proposed.getComments());
    descriptor.setConcurrentlySchedulableTaskCount(proposed.getConcurrentlySchedulableTaskCount());
    descriptor.setGroupId(proposed.getRemoteGroupId());
    descriptor.setTargetId(proposed.getTargetId());
    descriptor.setId(generateUuid(proposed.getIdentifier(), rpgId, componentIdSeed));
    descriptor.setName(proposed.getName());
    descriptor.setUseCompression(proposed.isUseCompression());
    return descriptor;
}
Also used : StandardRemoteProcessGroupPortDescriptor(org.apache.nifi.remote.StandardRemoteProcessGroupPortDescriptor) BatchSize(org.apache.nifi.registry.flow.BatchSize)

Example 2 with BatchSize

use of org.apache.nifi.registry.flow.BatchSize in project nifi by apache.

the class NiFiRegistryFlowMapper method mapBatchSettings.

private BatchSize mapBatchSettings(final RemoteGroupPort remotePort) {
    final BatchSize batchSize = new BatchSize();
    batchSize.setCount(remotePort.getBatchCount());
    batchSize.setDuration(remotePort.getBatchDuration());
    batchSize.setSize(remotePort.getBatchSize());
    return batchSize;
}
Also used : BatchSize(org.apache.nifi.registry.flow.BatchSize)

Aggregations

BatchSize (org.apache.nifi.registry.flow.BatchSize)2 StandardRemoteProcessGroupPortDescriptor (org.apache.nifi.remote.StandardRemoteProcessGroupPortDescriptor)1