【发布时间】:2016-01-11 13:54:25
【问题描述】:
[![在此处输入图像描述][1]][1]我想使用 springXD 创建流。根据流的基本定义,我有:
Source : http
Transform script : I written one groovy script which I stored at
/xd/modules/processor/script/transform.groovy
Sink : cassandra
我想存储我从 http 发布到 cassandra 表的非结构化 json 数据。 我在单节点模式下运行 springXD,然后运行 xd-shell。 对于流创建,我使用:
stream create --name test2 --definition "http --port=9000 | transform --
script=insert_transform.groovy |cassandra --contactPoints=127.0.0.1 --
keyspace=db1 --ingestQuery='insert into table1 (emp_id,emp_name,amount,time)
values (?,?,?,?)'" –deploy
我收到消息: 创建并部署了新流“test2”
之后,当我通过 http 发布数据时,会出现以下错误:
500 INTERNAL_SERVER_ERROR
在xd-singlenode,出现如下错误日志:
Caused by: java.io.FileNotFoundException: class path resource [insert_transform.groovy] cannot be opened because it does not exist.
【问题讨论】:
-
我认为
/xd/modules/processor/script应该是/xd/modules/processor/scripts(复数scripts) -
仍然遇到同样的错误。使用 springXD 1.3.0
标签: groovy cassandra spring-xd