java - 如何将自定义处理器添加到StreamSet

标签 java docker streamsets

我在docker compose和jar文件中有一个StreamSets容器,它们是根据教程创建的-https://github.com/streamsets/tutorials/blob/master/tutorial-processor/readme.md

https://github.com/streamsets/tutorials/tree/master/tutorial-processor/sampleprocessor

源已正确添加。

enter image description here

Extract the tarball to the SDC user-libs directory, restart SDC, and you should see the sample stages in the stage library:



要将自定义处理器添加到管道中,我将jar文件复制到了用户实验室,然后重新启动docker
docker exec -it docker-hadoop_streamsets_1 bash
sudo cp -a /data/lib/. /opt/streamsets-datacollector-3.9.0/user-libs
docker restart docker-hadoop_streamsets_1

但是重新启动后,我看不到新目的地。我也尝试添加Web界面并阅读本文-https://streamsets.com/documentation/datacollector/latest/help/datacollector/UserGuide/Installation/AddtionalStageLibs.html#concept_evs_xkm_s5

enter image description here
bash-4.4$ ls -R /opt/streamsets-datacollector-3.9.0/user-libs/
/opt/streamsets-datacollector-3.9.0/user-libs/:
com.example-1.0-SNAPSHOT          com.example-1.0-SNAPSHOT.jar      com.example-1.0-SNAPSHOT~         sampleprocessor                   sampleprocessor-1.0-SNAPSHOT      sampleprocessor-1.0-SNAPSHOT.jar
/opt/streamsets-datacollector-3.9.0/user-libs/com.example-1.0-SNAPSHOT~:
CredentialStores.json                     Interceptors.json                         PipelineStages.json                       com                                       default.png
Delegates.json                            LineagePublishers.json                    Services.json                             data-collector-library-bundle.properties
ElDefinitions.json                        META-INF                                  StageDefList.json                         datacollector-resource-bundles.json
/opt/streamsets-datacollector-3.9.0/user-libs/com.example-1.0-SNAPSHOT~/META-INF:
MANIFEST.MF  maven
/opt/streamsets-datacollector-3.9.0/user-libs/com.example-1.0-SNAPSHOT~/META-INF/maven:
com.example
/opt/streamsets-datacollector-3.9.0/user-libs/com.example-1.0-SNAPSHOT~/META-INF/maven/com.example:
com.example
/opt/streamsets-datacollector-3.9.0/user-libs/com.example-1.0-SNAPSHOT~/META-INF/maven/com.example/com.example:
pom.properties  pom.xml
/opt/streamsets-datacollector-3.9.0/user-libs/com.example-1.0-SNAPSHOT~/com:
example
/opt/streamsets-datacollector-3.9.0/user-libs/com.example-1.0-SNAPSHOT~/com/example:
stage
/opt/streamsets-datacollector-3.9.0/user-libs/com.example-1.0-SNAPSHOT~/com/example/stage:
destination  lib          origin       processor
/opt/streamsets-datacollector-3.9.0/user-libs/com.example-1.0-SNAPSHOT~/com/example/stage/destination:
sample
/opt/streamsets-datacollector-3.9.0/user-libs/com.example-1.0-SNAPSHOT~/com/example/stage/destination/sample:
Groups.class          SampleDTarget.class   SampleTarget$1.class  SampleTarget.class
/opt/streamsets-datacollector-3.9.0/user-libs/com.example-1.0-SNAPSHOT~/com/example/stage/lib:
sample
/opt/streamsets-datacollector-3.9.0/user-libs/com.example-1.0-SNAPSHOT~/com/example/stage/lib/sample:
Errors.class
/opt/streamsets-datacollector-3.9.0/user-libs/com.example-1.0-SNAPSHOT~/com/example/stage/origin:
sample
/opt/streamsets-datacollector-3.9.0/user-libs/com.example-1.0-SNAPSHOT~/com/example/stage/origin/sample:
Groups.class         SampleDSource.class  SampleSource.class
/opt/streamsets-datacollector-3.9.0/user-libs/com.example-1.0-SNAPSHOT~/com/example/stage/processor:
sample
/opt/streamsets-datacollector-3.9.0/user-libs/com.example-1.0-SNAPSHOT~/com/example/stage/processor/sample:
Groups.class            SampleDProcessor.class  SampleProcessor.class
/opt/streamsets-datacollector-3.9.0/user-libs/sampleprocessor:
ElDefinitions.json                        PipelineStages.json                       data-collector-library-bundle.properties  default.png
META-INF                                  com                                       datacollector-resource-bundles.json
/opt/streamsets-datacollector-3.9.0/user-libs/sampleprocessor/META-INF:
MANIFEST.MF  maven
/opt/streamsets-datacollector-3.9.0/user-libs/sampleprocessor/META-INF/maven:
com.example
/opt/streamsets-datacollector-3.9.0/user-libs/sampleprocessor/META-INF/maven/com.example:
sampleprocessor

最佳答案

您需要的只是com.example-1.0-SNAPSHOT.jar文件,它应该位于/opt/streamsets-datacollector-3.9.0/user-libs/sampleprocessor/lib中。

关于java - 如何将自定义处理器添加到StreamSet,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60654670/

相关文章:

docker - Bluemix中缺少定制的docker镜像

elasticsearch - 如何在2.5中为Elasticsearch目标添加路由

authentication - 如何使用 LDAP 身份验证启用 Streamset Mutitenancy

java - Android Studio 中的 Admob 插页式广告不起作用

go - 为什么 CreateContainerOptions 的 Volumes 采用 map[string]struct{}?

java - 使用递归将数组转换为自定义 LinkedList 类

docker - 在Jupyter docker中,无法连接到内核

oracle - 如何从 oracle origin 与 Streamsets 连接

javascript - 如何显示多个用户输入的答案以及如何将其全部写入文本文件

java - Android 中的整数分割