如何通过 rest 在 apache nifi 中实例化模板 api
how to instantiate a template in apache nifi via rest api
我正在尝试自动部署 apache nifi 进程组。
我的工作步骤是:
- 创建片段
- 创建模板
- 下载模板
- 上传模板
然后我尝试使用 api 调用:
(https://nifi.apache.org/docs/nifi-docs/rest-api/)
POST /process-groups/{id}/template-instance 实例化一个模板
instantiate_data = {
"originX": 0.0,
"originY": 0.0,
"templateId": template_id,
"snippet": {
"processGroups": [
{
"id": group_id,
"parentGroupId": parentgroup_id,
"position": {
"x": 0.0,
"y": 0.0
},
"name": "value",
}
]
}
}
这是我从 Nifi 实例获得 500 的时候。
下面的堆栈跟踪...我缺少什么?
2017-05-23 14:28:49,180 INFO [NiFi Web Server-106] org.apache.nifi.web.filter.RequestLogger Attempting request for (anonymous) POST http://10.132.0.22:8080/nifi-api/process-groups/1664cd1a-015c-1000-4bbe-f63259900964/template-instance (source ip: 10.132.0.23)
2017-05-23 14:28:49,185 错误 [NiFi Web Server-106] o.a.nifi.web.api.config.ThrowableMapper 发生意外错误:java.lang.NullPointerException。返回内部服务器错误响应。
java.lang.NullPointerException: 空
在 org.apache.nifi.controller.FlowController.verifyProcessorsInSnippet(FlowController.java:2051)
在 org.apache.nifi.controller.FlowController.lambda$verifyProcessorsInSnippet$1(FlowController.java:2067)
在 java.lang.Iterable.forEach(Iterable.java:75)
在 org.apache.nifi.controller.FlowController.verifyProcessorsInSnippet(FlowController.java:2066)
在 org.apache.nifi.controller.FlowController.verifyComponentTypesInSnippet(FlowController.java:2100)
在 org.apache.nifi.web.dao.impl.StandardTemplateDAO.verifyComponentTypes(StandardTemplateDAO.java:74)
在 org.apache.nifi.web.dao.impl.StandardTemplateDAO$$FastClassBySpringCGLIB$$58f5765d.invoke()
在 org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
在 org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:720)
在 org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
在 org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
在 org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
在 org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:655)
在 org.apache.nifi.web.dao.impl.StandardTemplateDAO$$EnhancerBySpringCGLIB$$2cf2c182.verifyComponentTypes()
在 org.apache.nifi.web.StandardNiFiServiceFacade.verifyComponentTypes(StandardNiFiServiceFacade.java:1643)
在 org.apache.nifi.web.StandardNiFiServiceFacade$$FastClassBySpringCGLIB$$358780e0.invoke()
在 org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
在 org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:720)
在 org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
在 org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85)
在 org.apache.nifi.web.NiFiServiceFacadeLock.proceedWithReadLock(NiFiServiceFacadeLock.java:137)
在 org.apache.nifi.web.NiFiServiceFacadeLock.verifyLock(NiFiServiceFacadeLock.java:126)
在 sun.reflect.GeneratedMethodAccessor320.invoke(来源不明)
在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
在 java.lang.reflect.Method.invoke(Method.java:498)
在 org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
在 org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
在 org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:68)
在 org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
在 org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
在 org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
在 org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:655)
在 org.apache.nifi.web.StandardNiFiServiceFacade$$EnhancerBySpringCGLIB$$9a341d03.verifyComponentTypes()
在 org.apache.nifi.web.api.ProcessGroupResource.lambda$instantiateTemplate$41(ProcessGroupResource.java:1995)
在 org.apache.nifi.web.api.ApplicationResource.withWriteLock(ApplicationResource.java:667)
在 org.apache.nifi.web.api.ProcessGroupResource.instantiateTemplate(ProcessGroupResource.java:1967)
在 sun.reflect.GeneratedMethodAccessor327.invoke(来源不明)
在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
在 java.lang.reflect.Method.invoke(Method.java:498)
在 com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
在 com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
在 com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
在 com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
在 com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
在 com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
在 com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
在 com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
在 com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542)
在 com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473)
在 com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)
在 com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)
在 com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)
在 com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558)
在 com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733)
在 javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
在 org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841)
在 org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1634)
在 org.apache.nifi.web.filter.RequestLogger.doFilter(RequestLogger.java:66)
在 org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1621)
在 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:316)
在 org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126)
在 org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90)
在 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
在 org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:122)
在 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
在 org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
在 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
在 org.apache.nifi.web.security.NiFiAuthenticationFilter.authenticate(NiFiAuthenticationFilter.java:83)
在 org.apache.nifi.web.security.NiFiAuthenticationFilter.doFilter(NiFiAuthenticationFilter.java:57)
在 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
在 org.apache.nifi.web.security.NiFiAuthenticationFilter.authenticate(NiFiAuthenticationFilter.java:83)
在 org.apache.nifi.web.security.NiFiAuthenticationFilter.doFilter(NiFiAuthenticationFilter.java:57)
在 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
在 org.apache.nifi.web.security.NiFiAuthenticationFilter.authenticate(NiFiAuthenticationFilter.java:83)
在 org.apache.nifi.web.security.NiFiAuthenticationFilter.doFilter(NiFiAuthenticationFilter.java:57)
在 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
在 org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:213)
在 org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:176)
在 org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
在 org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
在 org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1621)
在 org.apache.nifi.web.filter.TimerFilter.doFilter(TimerFilter.java:51)
在 org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1613)
在 org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:541)
在 org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
在 org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
在 org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
在 org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
在 org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1593)
在 org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
在 org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1239)
在 org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
在 org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:481)
在 org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1562)
在 org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
在 org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1141)
在 org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
在 org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:118)
在 org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:561)
在 org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
在 org.eclipse.jetty.server.Server.handle(Server.java:564)
在 org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
在 org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
在 org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
在 org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
在 org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
在 org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:122)
在 org.eclipse.jetty.util.thread.strategy.ExecutingExecutionStrategy.invoke(ExecutingExecutionStrategy.java:58)
在 org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:201)
在 org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:133)
在 org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672)
在 org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)
在 java.lang.Thread.run(Thread.java:748)
@strzelecki.maciek,
您必须通过 instantiate_data 才能像下面那样正确。,
如果任何属于实例化数据的参数错误,您将收到 500 内部服务器错误。
休息APIURL:
http://localhost:8080/nifi-api/process-groups/015c100c-8968-18bb-9b56-bf5342d001fd/template-instance
正确实例化数据。
{
"originX": 2.0,
"originY": 3.0,
"templateId": "87fb53bb-a4bd-4051-a129-66b29dfce2b4"
}
如果您遇到任何问题,请告诉我。
我正在尝试自动部署 apache nifi 进程组。
我的工作步骤是:
- 创建片段
- 创建模板
- 下载模板
- 上传模板
然后我尝试使用 api 调用:
(https://nifi.apache.org/docs/nifi-docs/rest-api/)
POST /process-groups/{id}/template-instance 实例化一个模板
instantiate_data = {
"originX": 0.0,
"originY": 0.0,
"templateId": template_id,
"snippet": {
"processGroups": [
{
"id": group_id,
"parentGroupId": parentgroup_id,
"position": {
"x": 0.0,
"y": 0.0
},
"name": "value",
}
]
}
}
这是我从 Nifi 实例获得 500 的时候。
下面的堆栈跟踪...我缺少什么?
2017-05-23 14:28:49,180 INFO [NiFi Web Server-106] org.apache.nifi.web.filter.RequestLogger Attempting request for (anonymous) POST http://10.132.0.22:8080/nifi-api/process-groups/1664cd1a-015c-1000-4bbe-f63259900964/template-instance (source ip: 10.132.0.23)
2017-05-23 14:28:49,185 错误 [NiFi Web Server-106] o.a.nifi.web.api.config.ThrowableMapper 发生意外错误:java.lang.NullPointerException。返回内部服务器错误响应。 java.lang.NullPointerException: 空 在 org.apache.nifi.controller.FlowController.verifyProcessorsInSnippet(FlowController.java:2051) 在 org.apache.nifi.controller.FlowController.lambda$verifyProcessorsInSnippet$1(FlowController.java:2067) 在 java.lang.Iterable.forEach(Iterable.java:75) 在 org.apache.nifi.controller.FlowController.verifyProcessorsInSnippet(FlowController.java:2066) 在 org.apache.nifi.controller.FlowController.verifyComponentTypesInSnippet(FlowController.java:2100) 在 org.apache.nifi.web.dao.impl.StandardTemplateDAO.verifyComponentTypes(StandardTemplateDAO.java:74) 在 org.apache.nifi.web.dao.impl.StandardTemplateDAO$$FastClassBySpringCGLIB$$58f5765d.invoke() 在 org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) 在 org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:720) 在 org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) 在 org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) 在 org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) 在 org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:655) 在 org.apache.nifi.web.dao.impl.StandardTemplateDAO$$EnhancerBySpringCGLIB$$2cf2c182.verifyComponentTypes() 在 org.apache.nifi.web.StandardNiFiServiceFacade.verifyComponentTypes(StandardNiFiServiceFacade.java:1643) 在 org.apache.nifi.web.StandardNiFiServiceFacade$$FastClassBySpringCGLIB$$358780e0.invoke() 在 org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) 在 org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:720) 在 org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) 在 org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85) 在 org.apache.nifi.web.NiFiServiceFacadeLock.proceedWithReadLock(NiFiServiceFacadeLock.java:137) 在 org.apache.nifi.web.NiFiServiceFacadeLock.verifyLock(NiFiServiceFacadeLock.java:126) 在 sun.reflect.GeneratedMethodAccessor320.invoke(来源不明) 在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 在 java.lang.reflect.Method.invoke(Method.java:498) 在 org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621) 在 org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610) 在 org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:68) 在 org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) 在 org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) 在 org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) 在 org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:655) 在 org.apache.nifi.web.StandardNiFiServiceFacade$$EnhancerBySpringCGLIB$$9a341d03.verifyComponentTypes() 在 org.apache.nifi.web.api.ProcessGroupResource.lambda$instantiateTemplate$41(ProcessGroupResource.java:1995) 在 org.apache.nifi.web.api.ApplicationResource.withWriteLock(ApplicationResource.java:667) 在 org.apache.nifi.web.api.ProcessGroupResource.instantiateTemplate(ProcessGroupResource.java:1967) 在 sun.reflect.GeneratedMethodAccessor327.invoke(来源不明) 在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 在 java.lang.reflect.Method.invoke(Method.java:498) 在 com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) 在 com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) 在 com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) 在 com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) 在 com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) 在 com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) 在 com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) 在 com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) 在 com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542) 在 com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473) 在 com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419) 在 com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409) 在 com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409) 在 com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558) 在 com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733) 在 javax.servlet.http.HttpServlet.service(HttpServlet.java:790) 在 org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841) 在 org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1634) 在 org.apache.nifi.web.filter.RequestLogger.doFilter(RequestLogger.java:66) 在 org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1621) 在 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:316) 在 org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126) 在 org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90) 在 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) 在 org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:122) 在 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) 在 org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111) 在 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) 在 org.apache.nifi.web.security.NiFiAuthenticationFilter.authenticate(NiFiAuthenticationFilter.java:83) 在 org.apache.nifi.web.security.NiFiAuthenticationFilter.doFilter(NiFiAuthenticationFilter.java:57) 在 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) 在 org.apache.nifi.web.security.NiFiAuthenticationFilter.authenticate(NiFiAuthenticationFilter.java:83) 在 org.apache.nifi.web.security.NiFiAuthenticationFilter.doFilter(NiFiAuthenticationFilter.java:57) 在 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) 在 org.apache.nifi.web.security.NiFiAuthenticationFilter.authenticate(NiFiAuthenticationFilter.java:83) 在 org.apache.nifi.web.security.NiFiAuthenticationFilter.doFilter(NiFiAuthenticationFilter.java:57) 在 org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) 在 org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:213) 在 org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:176) 在 org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) 在 org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262) 在 org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1621) 在 org.apache.nifi.web.filter.TimerFilter.doFilter(TimerFilter.java:51) 在 org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1613) 在 org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:541) 在 org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) 在 org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) 在 org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) 在 org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) 在 org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1593) 在 org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) 在 org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1239) 在 org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) 在 org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:481) 在 org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1562) 在 org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) 在 org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1141) 在 org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) 在 org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:118) 在 org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:561) 在 org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) 在 org.eclipse.jetty.server.Server.handle(Server.java:564) 在 org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320) 在 org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) 在 org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) 在 org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110) 在 org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) 在 org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:122) 在 org.eclipse.jetty.util.thread.strategy.ExecutingExecutionStrategy.invoke(ExecutingExecutionStrategy.java:58) 在 org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:201) 在 org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:133) 在 org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672) 在 org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590) 在 java.lang.Thread.run(Thread.java:748)
@strzelecki.maciek,
您必须通过 instantiate_data 才能像下面那样正确。,
如果任何属于实例化数据的参数错误,您将收到 500 内部服务器错误。
休息APIURL:
http://localhost:8080/nifi-api/process-groups/015c100c-8968-18bb-9b56-bf5342d001fd/template-instance
正确实例化数据。
{
"originX": 2.0,
"originY": 3.0,
"templateId": "87fb53bb-a4bd-4051-a129-66b29dfce2b4"
}
如果您遇到任何问题,请告诉我。