@Override public String getTargetIdentifier() { final String target = this.targetId; return target == null ? getIdentifier() : target; }
throw new IllegalStateException(this.getIdentifier() + " has running Port: " + port.getIdentifier()); throw new IllegalStateException(this.getIdentifier() + " has a Connection to Port " + port.getIdentifier() + ", but that Port no longer exists on the remote system"); throw new IllegalStateException(this.getIdentifier() + " has running Port: " + port.getIdentifier()); throw new IllegalStateException(this.getIdentifier() + " has a Connection to Port " + port.getIdentifier() + ", but that Port no longer exists on the remote system");
@Override public Resource getResource() { final ResourceType resourceType = ConnectableType.REMOTE_INPUT_PORT.equals(getConnectableType()) ? ResourceType.InputPort : ResourceType.OutputPort; return ResourceFactory.getComponentResource(resourceType, getIdentifier(), getName()); }
@Override public void onSchedulingStart() { super.onSchedulingStart(); final long penalizationMillis = FormatUtils.getTimeDuration(remoteGroup.getYieldDuration(), TimeUnit.MILLISECONDS); final SiteToSiteClient.Builder clientBuilder = new SiteToSiteClient.Builder() .urls(SiteToSiteRestApiClient.parseClusterUrls(remoteGroup.getTargetUris())) .portIdentifier(getTargetIdentifier()) .sslContext(sslContext) .useCompression(isUseCompression()) .eventReporter(remoteGroup.getEventReporter()) .peerPersistenceFile(getPeerPersistenceFile(getIdentifier(), nifiProperties, remoteGroup.getTransportProtocol())) .nodePenalizationPeriod(penalizationMillis, TimeUnit.MILLISECONDS) .timeout(remoteGroup.getCommunicationsTimeout(TimeUnit.MILLISECONDS), TimeUnit.MILLISECONDS) .transportProtocol(remoteGroup.getTransportProtocol()) .httpProxy(new HttpProxy(remoteGroup.getProxyHost(), remoteGroup.getProxyPort(), remoteGroup.getProxyUser(), remoteGroup.getProxyPassword())) .localAddress(remoteGroup.getLocalAddress()); final Integer batchCount = getBatchCount(); if (batchCount != null) { clientBuilder.requestBatchCount(batchCount); } final String batchSize = getBatchSize(); if (batchSize != null && batchSize.length() > 0) { clientBuilder.requestBatchSize(DataUnit.parseDataSize(batchSize.trim(), DataUnit.B).intValue()); } final String batchDuration = getBatchDuration(); if (batchDuration != null && batchDuration.length() > 0) { clientBuilder.requestBatchDuration(FormatUtils.getTimeDuration(batchDuration.trim(), TimeUnit.MILLISECONDS), TimeUnit.MILLISECONDS); } clientRef.set(clientBuilder.build()); }
@Override public String getTargetIdentifier() { final String target = this.targetId; return target == null ? getIdentifier() : target; }
@Override public Resource getResource() { final ResourceType resourceType = ConnectableType.REMOTE_INPUT_PORT.equals(getConnectableType()) ? ResourceType.InputPort : ResourceType.OutputPort; return ResourceFactory.getComponentResource(resourceType, getIdentifier(), getName()); }
@Override public void onSchedulingStart() { super.onSchedulingStart(); final long penalizationMillis = FormatUtils.getTimeDuration(remoteGroup.getYieldDuration(), TimeUnit.MILLISECONDS); final SiteToSiteClient.Builder clientBuilder = new SiteToSiteClient.Builder() .urls(SiteToSiteRestApiClient.parseClusterUrls(remoteGroup.getTargetUris())) .portIdentifier(getTargetIdentifier()) .sslContext(sslContext) .useCompression(isUseCompression()) .eventReporter(remoteGroup.getEventReporter()) .peerPersistenceFile(getPeerPersistenceFile(getIdentifier(), nifiProperties, remoteGroup.getTransportProtocol())) .nodePenalizationPeriod(penalizationMillis, TimeUnit.MILLISECONDS) .timeout(remoteGroup.getCommunicationsTimeout(TimeUnit.MILLISECONDS), TimeUnit.MILLISECONDS) .transportProtocol(remoteGroup.getTransportProtocol()) .httpProxy(new HttpProxy(remoteGroup.getProxyHost(), remoteGroup.getProxyPort(), remoteGroup.getProxyUser(), remoteGroup.getProxyPassword())) .localAddress(remoteGroup.getLocalAddress()); final Integer batchCount = getBatchCount(); if (batchCount != null) { clientBuilder.requestBatchCount(batchCount); } final String batchSize = getBatchSize(); if (batchSize != null && batchSize.length() > 0) { clientBuilder.requestBatchSize(DataUnit.parseDataSize(batchSize.trim(), DataUnit.B).intValue()); } final String batchDuration = getBatchDuration(); if (batchDuration != null && batchDuration.length() > 0) { clientBuilder.requestBatchDuration(FormatUtils.getTimeDuration(batchDuration.trim(), TimeUnit.MILLISECONDS), TimeUnit.MILLISECONDS); } clientRef.set(clientBuilder.build()); }