mirror of https://github.com/apache/nifi.git
NIFI-2574 fix spring context definitions
This commit is contained in:
parent
6bf7e7f325
commit
d9633757a6
|
@ -42,6 +42,9 @@
|
|||
<bean id="clusterCoordinationProtocolSender" class="org.apache.nifi.cluster.protocol.impl.StandardClusterCoordinationProtocolSender">
|
||||
<constructor-arg ref="protocolSocketConfiguration"/>
|
||||
<constructor-arg ref="protocolContext"/>
|
||||
<constructor-arg>
|
||||
<bean factory-bean="nifiProperties" factory-method="getClusterNodeProtocolThreads"/>
|
||||
</constructor-arg>
|
||||
<property name="handshakeTimeout">
|
||||
<bean factory-bean="nifiProperties" factory-method="getClusterNodeConnectionTimeout"/>
|
||||
</property>
|
||||
|
|
|
@ -25,7 +25,10 @@
|
|||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd">
|
||||
|
||||
<!-- nifi properties created via getInstance using a file path specified as a system property -->
|
||||
<bean id="nifiProperties" class="org.apache.nifi.util.NiFiProperties" factory-method="getInstance"/>
|
||||
<bean id="nifiProperties" class="org.apache.nifi.util.NiFiProperties" factory-method="createBasicNiFiProperties">
|
||||
<constructor-arg index="0"><null /></constructor-arg>
|
||||
<constructor-arg index="1"><null /></constructor-arg>
|
||||
</bean>
|
||||
|
||||
<!-- variable registry -->
|
||||
<bean id="variableRegistry" class="org.apache.nifi.util.FileBasedVariableRegistry">
|
||||
|
@ -36,7 +39,9 @@
|
|||
<bean id="flowFileEventRepository" class="org.apache.nifi.spring.RingBufferEventRepositoryBean">
|
||||
</bean>
|
||||
|
||||
<bean id="stringEncryptor" class="org.apache.nifi.encrypt.StringEncryptor" factory-method="createEncryptor"/>
|
||||
<bean id="stringEncryptor" class="org.apache.nifi.encrypt.StringEncryptor" factory-method="createEncryptor">
|
||||
<constructor-arg ref="nifiProperties" />
|
||||
</bean>
|
||||
|
||||
<!-- flow controller -->
|
||||
<bean id="flowController" class="org.apache.nifi.spring.FlowControllerFactoryBean">
|
||||
|
|
|
@ -116,10 +116,8 @@ public class DataTransferResource extends ApplicationResource {
|
|||
private final ResponseCreator responseCreator = new ResponseCreator();
|
||||
private final VersionNegotiator transportProtocolVersionNegotiator = new TransportProtocolVersionNegotiator(1);
|
||||
private final HttpRemoteSiteListener transactionManager;
|
||||
private final NiFiProperties nifiProperties;
|
||||
|
||||
public DataTransferResource(final NiFiProperties nifiProperties) {
|
||||
this.nifiProperties = nifiProperties;
|
||||
transactionManager = HttpRemoteSiteListener.getInstance(nifiProperties);
|
||||
}
|
||||
|
||||
|
@ -311,13 +309,13 @@ public class DataTransferResource extends ApplicationResource {
|
|||
((HttpCommunicationsSession) peer.getCommunicationsSession()).setDataTransferUrl(dataTransferUrl);
|
||||
|
||||
HttpFlowFileServerProtocol serverProtocol = getHttpFlowFileServerProtocol(versionNegotiator);
|
||||
HttpRemoteSiteListener.getInstance(nifiProperties).setupServerProtocol(serverProtocol);
|
||||
HttpRemoteSiteListener.getInstance(getProperties()).setupServerProtocol(serverProtocol);
|
||||
serverProtocol.handshake(peer);
|
||||
return serverProtocol;
|
||||
}
|
||||
|
||||
HttpFlowFileServerProtocol getHttpFlowFileServerProtocol(final VersionNegotiator versionNegotiator) {
|
||||
return new StandardHttpFlowFileServerProtocol(versionNegotiator, nifiProperties);
|
||||
return new StandardHttpFlowFileServerProtocol(versionNegotiator, getProperties());
|
||||
}
|
||||
|
||||
private Peer constructPeer(final HttpServletRequest req, final InputStream inputStream,
|
||||
|
|
|
@ -215,6 +215,7 @@
|
|||
<property name="authorizer" ref="authorizer"/>
|
||||
</bean>
|
||||
<bean id="siteToSiteResource" class="org.apache.nifi.web.api.SiteToSiteResource" scope="singleton">
|
||||
<constructor-arg ref="nifiProperties"/>
|
||||
<property name="serviceFacade" ref="serviceFacade"/>
|
||||
<property name="properties" ref="nifiProperties"/>
|
||||
<property name="clusterCoordinator" ref="clusterCoordinator"/>
|
||||
|
@ -222,6 +223,7 @@
|
|||
<property name="authorizer" ref="authorizer"/>
|
||||
</bean>
|
||||
<bean id="dataTransferResource" class="org.apache.nifi.web.api.DataTransferResource" scope="singleton">
|
||||
<constructor-arg ref="nifiProperties"/>
|
||||
<property name="properties" ref="nifiProperties"/>
|
||||
<property name="clusterCoordinator" ref="clusterCoordinator"/>
|
||||
<property name="requestReplicator" ref="requestReplicator" />
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
package org.apache.nifi.processors.hive;
|
||||
|
||||
import com.google.common.util.concurrent.ThreadFactoryBuilder;
|
||||
import java.io.File;
|
||||
import org.apache.avro.Schema;
|
||||
import org.apache.avro.file.CodecFactory;
|
||||
import org.apache.avro.file.DataFileConstants;
|
||||
|
@ -243,6 +244,9 @@ public class PutHiveStreaming extends AbstractProcessor {
|
|||
private static final long TICKET_RENEWAL_PERIOD = 60000;
|
||||
|
||||
protected KerberosProperties kerberosProperties;
|
||||
private volatile String kerberosServicePrincipal = null;
|
||||
private volatile File kerberosConfigFile = null;
|
||||
private volatile File kerberosServiceKeytab = null;
|
||||
|
||||
protected volatile HiveConfigurator hiveConfigurator = new HiveConfigurator();
|
||||
protected volatile UserGroupInformation ugi;
|
||||
|
@ -281,7 +285,10 @@ public class PutHiveStreaming extends AbstractProcessor {
|
|||
|
||||
@Override
|
||||
protected void init(ProcessorInitializationContext context) {
|
||||
kerberosProperties = getKerberosProperties();
|
||||
kerberosServicePrincipal = context.getKerberosServicePrincipal();
|
||||
kerberosConfigFile = context.getKerberosConfigurationFile();
|
||||
kerberosServiceKeytab = context.getKerberosServiceKeytab();
|
||||
kerberosProperties = new KerberosProperties(kerberosConfigFile);
|
||||
propertyDescriptors.add(kerberosProperties.getKerberosPrincipal());
|
||||
propertyDescriptors.add(kerberosProperties.getKerberosKeytab());
|
||||
}
|
||||
|
|
|
@ -73,6 +73,7 @@ public class MonitorDiskUsage extends AbstractReportingTask {
|
|||
final List<PropertyDescriptor> descriptors = new ArrayList<>(2);
|
||||
descriptors.add(DIR_THRESHOLD);
|
||||
descriptors.add(DIR_LOCATION);
|
||||
descriptors.add(DIR_DISPLAY_NAME);
|
||||
return descriptors;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue