问题标签 [spring-xd]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
89 浏览

spring-batch - SpringXD Job拆分流程步骤以分布式模式在单独的容器中运行

我知道嵌套作业支持 (XD-1972) 工作并期待着它。关于分流支持的问题。是否有计划支持在单独的容器中运行拆分流中定义的并行步骤?

它会像提供适当的 taskExecutor 的自定义实现一样简单,还是涉及更多的事情?

0 投票
1 回答
1709 浏览

spring-xd - Running xd-shell and admin-ui against a HTTPS xd-admin in springxd 1.0.1 release

I installed springxd 1.0.1 release. I configured spring-xd to run in HTTPS mode by enabling the SSL properties as specified in https://github.com/spring-projects/spring-xd/wiki/Application-Configuration#enabling-https. I am able to start the xd admin and containers successfully after that. I set the httpSSL.properties as well. However, I am not able to get the xd shell properly. or admin UI to run. I know I have to specify these new ssl properties for them to use, but I am not sure where. The output when I run xd shell is:

When I try the admin-ui, I just get a 'Connection Interrupted' error.

EDIT: I tried basic authentication by enabling the properties in servers.yml. With this I am able to get the admin-ui to work, but shell still does not work. I am trying to find which configurations I need to set to make this work unsuccessfully. Any help is greatly appreciated.

Any pointers are greatly appreciated.

thanks much,

AG

0 投票
2 回答
630 浏览

spring-xd - 设置 http 标头处理器:http-client

我想在使用处理器时设置 User-Agent 标头:http-client

我看到有 mappedRequestHeaders 选项,但是如何使用来设置用户代理:例如 Mozilla

要么我缺少某些东西,要么 spring-xd 缺少处理器:header-enricher。这将做我在常规 Spring Integration 上下文中寻找的东西:

0 投票
2 回答
153 浏览

spring-xd - Spring XD - 测试失败

我从 github 获取了 XD 源的最新副本并尝试在本地构建。当我运行构建任务时,出现以下错误。我在端口 6379 上运行 Redis。不确定是否缺少其他任何内容。

我的 /etc/hosts 在 Mac 上看起来不错。我必须做一个 -x 测试来跳过测试。任何可能的解决方案?我应该运行 gemfire 吗?

127.0.0.1 本地主机 255.255.255.255 广播主机 ::1 本地主机 fe80::1%lo0 本地主机 127.0.0.1 imac

0 投票
1 回答
262 浏览

json - SpringXD JSON 解析器到 Oracle DB

我正在尝试使用 SpringXD 将一些 JSON 指标数据流式传输到 Oracle 数据库。

我从这里使用这个例子:SpringXD Example

正在进行 Http 调用:EarthquakeJsonExample

我的外壳命令。

我只想将此 JSON 响应的属性部分捕获到给定的表列中。我得到了它不会给我散列错误而是只是将一堆空值存入列的地步。

我认为我的问题是解析 JSON 本身。因为属性确实在 Features 数组中。SpringXD 可以开箱即用地为我区分这一点,还是我需要编写一个自定义处理器?

下面看一下cmd成功后数据库的样子。

我的数据库中放入了什么

有什么建议吗?我不熟悉以这种方式解析 JSON,我不确定如何使用 SpringXD 本身找到更多文档或示例。

这是对文档的参考:SpringXD Doc

0 投票
2 回答
765 浏览

logging - 将 ${xd.job.name} 和 ${xd.stream.name} 添加到 Spring XD 日志

我们正在 Spring XD v1.0.0.RELEASE 上运行多个流和作业。
相应的流和作业模块将消息记录到 Spring XD 的全局日志文件中,在$XD_HOME/logs
下 我们需要区分每个作业和流创建的日志消息。用${xd.job.name}${xd.stream.name}的值标记每个日志行应该对我们有用。例如,

1) 在一个配置文件(Spring XD 配置、XML 上下文文件、Java 类...随便)中,设置一个 Java 上下文(?)变量:

2) 相应地配置$XD_HOME/config下的 log4j 属性文件:

3) Spring XD 运行作业 (xd.job.name = " fooJob ") 和流 (xd.stream.name = " barStream ") 的日志输出:

4) 由其他库(例如 Spring Data、Apache Commons 等)记录的任何消息都应具有 [ fooJob ]、[ barStream ] 或 [ XD ] 之一,与调用该库的作业或流具有相同的值。

到目前为止,我们提出的唯一半生不熟的解决方案是在 log4j 的MDC 或 NDC中设置$name,但我们不知道如何在每个流或每个作业的基础上设置它(MDC 和 NDC 在每个-线程基础)。

有没有办法将作业或流名称添加到相应的日志行?

0 投票
2 回答
1516 浏览

jdbc - Spring XD jdbc(源)-> jdbc(接收器)

我正在尝试配置如下流(直接从 jdbc 源管道到 jdbc 接收器)

xd> 流创建 test2 --definition "输出:jdbc --split=true --username=test --password=test --driverClassName=com.mysql.jdbc.Driver --url=jdbc:mysql://dbhost: 3306/test --query='select id,name from test' | 输入:jdbc --username=test --password=test --driverClassName=com.mysql.jdbc.Driver --tableName=test2 --columns=id ,name --url=jdbc:mysql://dbhost:3306/test" --deploy

但发生ClassCastException。

引起:java.lang.ClassCastException:org.springframework.util.LinkedCaseInsensitiveMap 不能在 org.springframework.xd.jdbc.JdbcMessagePayloadTransformer.transformPayload(JdbcMessagePayloadTransformer.java:39) 的 org.springframework.integration 中转换为 java.lang.String .transformer.AbstractPayloadTransformer.doTransform(AbstractPayloadTransformer.java:33) 在 org.springframework.integration.transformer.AbstractTransformer.transform(AbstractTransformer.java:33) ... 147 更多

MySQL 连接和表模式似乎配置正确。连通性已经确认。

CREATE TABLE 测试 (id int, name varchar(20)); CREATE TABLE test2 (id int, name varchar(20))

Spring XD 版本是 1.1.0.BUILD-20141103.163150-1-dist 来自下面的 zip。

http://repo.spring.io/libs-snapshot/org/springframework/xd/spring-xd/1.1.0.BUILD-SNAPSHOT/spring-xd-1.1.0.BUILD-20141103.163150-1-dist.zip

我想将有效负载数据存储到目标接收器表,但该功能仍处于试验阶段吗?
或者,是流问题吗,例如只是进行某种转换?

0 投票
1 回答
47 浏览

spring-xd - 在本地构建 Spring XD

我正在本地测试 XD。我正在使用日食。对于每个代码更改,我都使用 gradlew copyInstall 任务来构建 XD 并对其进行测试。构建最多需要 15 分钟。随着我不断进行更改,无论如何我可以反映 XD 分发中的最新代码更改(例如复制 JAR 或让 eclipse 复制类文件)。任何不那么费力的测试增量更改的方法都将非常有帮助。

0 投票
1 回答
407 浏览

xml - 如何在 Spring XD 中实现 RSS-feed 作为源

我想使用 Spring XD 加载 RSS 提要以存储在 Hadoop 中。我使用以下示例:https://github.com/spring-projects/spring-xd/wiki/Creating-a-Source-Module 因此我在目录 [/usr/local/Cellar/ 中创建了一个 feed.xml 文件springxd/1.0.0.M7/libexec/xd/modules/source] 和后来也在 [/usr/local/Cellar/springxd/1.0.0.M7/libexec/xd/modules/source/feed/config/feed. xml] 通过复制 github 示例的示例 feed.xml 文件。

github 示例声明“本节介绍了本地项目的设置,其中包含一些用于在 XD 容器之外进行测试的代码。如果您更喜欢通过部署到 Spring XD 来测试模块,则可以跳过此步骤。”

我想使用 xd-singlenode 和 xd-shell 在 Spring XD 中部署模块。因此,在 xd-shell 中,我尝试使用 DSL 脚本创建流,例如

结果,我收到以下错误消息:“命令失败 org.springframework.xd.rest.client.impl.SpringXDException:配置问题:无法找到 XML 模式命名空间的 Spring NamespaceHandler [ http://www.springframework.org/ schema/integration/feed]违规资源:URL [file:/usr/local/Cellar/springxd/1.0.0.M7/libexec/xd/modules/source/feed/config/feed.xml]"

我检查了 springdramework.org 模式的存在。它们确实存在。

我究竟做错了什么?

0 投票
1 回答
238 浏览

spring-xd - 在 Spring XD 中使用 mappedRequestHeaders

我正在尝试模拟以下 curl 语句

curl -k -H "用户名:您的 API 用户名" -H "密码:您的 API 密码" https://infoconnect1.highwayinfo.govt.nz/ic/jbi/TrafficCameras/REST/FeedService/

如何使用 mappedRequestHeaders 将用户名和密码注入 http-client 流?