gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-02 18:26:45 43 4
gpt4 key购买 nike

我在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/

43 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com