You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@streampipes.apache.org by Daniel Ebi <Eb...@fzi.de> on 2021/11/10 17:59:42 UTC
Streampipes Processor PE - Container Provided Options
Hi all.
For a project, I am currently reworking an existing processor with previously separate controller and parameter class using StreamPipesDataProcessor [1] to match the current structure of processor PEs.
However, since my declareModel method includes a value selection from the container [3] (vs. other existing processors extending the StreamPipesDataProcessor class), I am encountering the following error in the backend (I am using <elementID> as a placeholder for the id of my processor):
org.apache.http.client.ClientProtocolException: URI does not specify a valid hostname: urn:streampipes.apache.org:spi:<elementID>/configurations [...]
It seems that the urn could not be resolved. The error occurs in the ContainerProvidedOptionsHandler class [3] at line 44, after the corresponding endpoint was triggered via a REST call from the user interface [4]. As I found out while debugging, the previous resolveOptions() method of the processor is ignored.
Have you encountered this problem before or maybe have an idea how I can fix it? (With the new SpServiceDiscovery, I was able to access the corresponding configuration of Consul while troubleshooting, but I still could not fully map the previous functionality of the processor configuration). I may have also overlooked an existing solution in the project?!
I would be grateful for any hint. Many thanks in advance.
Best regards,
Daniel
[1] https://github.com/apache/incubator-streampipes/blob/dev/streampipes-wrapper-standalone/src/main/java/org/apache/streampipes/wrapper/standalone/StreamPipesDataProcessor.java
[2] https://github.com/apache/incubator-streampipes/blob/dev/streampipes-sdk/src/main/java/org/apache/streampipes/sdk/builder/AbstractConfigurablePipelineElementBuilder.java (line 824)
[3] https://github.com/apache/incubator-streampipes/blob/dev/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/remote/ContainerProvidedOptionsHandler.java
[4] https://github.com/apache/incubator-streampipes/blob/dev/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/ContainerProvidedOptions.java
Re: Streampipes Processor PE - Container Provided Options
Posted by Dominik Riemer <ri...@apache.org>.
Hi Daniel,
thanks - this was indeed caused by a bug where we didn't yet use the service discovery mechanism for sending the options request. I've updated the code and added an example [1] - please verify if it works now!
Dominik
[1] https://github.com/apache/incubator-streampipes-examples/blob/dev/streampipes-pipeline-elements-examples-processors-jvm/src/main/java/org/apache/streampipes/pe/examples/jvm/staticproperty/CompactRuntimeResolvableSingleValueProcessor.java
On 2021/11/10 17:59:42 Daniel Ebi wrote:
> Hi all.
>
> For a project, I am currently reworking an existing processor with previously separate controller and parameter class using StreamPipesDataProcessor [1] to match the current structure of processor PEs.
> However, since my declareModel method includes a value selection from the container [3] (vs. other existing processors extending the StreamPipesDataProcessor class), I am encountering the following error in the backend (I am using <elementID> as a placeholder for the id of my processor):
>
> org.apache.http.client.ClientProtocolException: URI does not specify a valid hostname: urn:streampipes.apache.org:spi:<elementID>/configurations [...]
>
> It seems that the urn could not be resolved. The error occurs in the ContainerProvidedOptionsHandler class [3] at line 44, after the corresponding endpoint was triggered via a REST call from the user interface [4]. As I found out while debugging, the previous resolveOptions() method of the processor is ignored.
> Have you encountered this problem before or maybe have an idea how I can fix it? (With the new SpServiceDiscovery, I was able to access the corresponding configuration of Consul while troubleshooting, but I still could not fully map the previous functionality of the processor configuration). I may have also overlooked an existing solution in the project?!
>
> I would be grateful for any hint. Many thanks in advance.
>
> Best regards,
> Daniel
>
>
>
> [1] https://github.com/apache/incubator-streampipes/blob/dev/streampipes-wrapper-standalone/src/main/java/org/apache/streampipes/wrapper/standalone/StreamPipesDataProcessor.java
> [2] https://github.com/apache/incubator-streampipes/blob/dev/streampipes-sdk/src/main/java/org/apache/streampipes/sdk/builder/AbstractConfigurablePipelineElementBuilder.java (line 824)
> [3] https://github.com/apache/incubator-streampipes/blob/dev/streampipes-pipeline-management/src/main/java/org/apache/streampipes/manager/remote/ContainerProvidedOptionsHandler.java
> [4] https://github.com/apache/incubator-streampipes/blob/dev/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/ContainerProvidedOptions.java
>
AW: Streampipes Processor PE - Container Provided Options
Posted by Daniel Ebi <Eb...@fzi.de>.
Hi Dominik,
thanks for your quick fix. It works perfectly fine now!
Daniel
-----Ursprüngliche Nachricht-----
Von: Dominik Riemer <ri...@apache.org>
Gesendet: Donnerstag, 11. November 2021 17:04
An: dev@streampipes.apache.org
Betreff: Re: Streampipes Processor PE - Container Provided Options
Hi Daniel,
thanks - this was indeed caused by a bug where we didn't yet use the service discovery mechanism for sending the options request. I've updated the code and added an example [1] - please verify if it works now!
Dominik
[1] https://github.com/apache/incubator-streampipes-examples/blob/dev/streampipes-pipeline-elements-examples-processors-jvm/src/main/java/org/apache/streampipes/pe/examples/jvm/staticproperty/CompactRuntimeResolvableSingleValueProcessor.java
On 2021/11/10 17:59:42 Daniel Ebi wrote:
> Hi all.
>
> For a project, I am currently reworking an existing processor with previously separate controller and parameter class using StreamPipesDataProcessor [1] to match the current structure of processor PEs.
> However, since my declareModel method includes a value selection from the container [3] (vs. other existing processors extending the StreamPipesDataProcessor class), I am encountering the following error in the backend (I am using <elementID> as a placeholder for the id of my processor):
>
> org.apache.http.client.ClientProtocolException: URI does not specify a
> valid hostname:
> urn:streampipes.apache.org:spi:<elementID>/configurations [...]
>
> It seems that the urn could not be resolved. The error occurs in the ContainerProvidedOptionsHandler class [3] at line 44, after the corresponding endpoint was triggered via a REST call from the user interface [4]. As I found out while debugging, the previous resolveOptions() method of the processor is ignored.
> Have you encountered this problem before or maybe have an idea how I can fix it? (With the new SpServiceDiscovery, I was able to access the corresponding configuration of Consul while troubleshooting, but I still could not fully map the previous functionality of the processor configuration). I may have also overlooked an existing solution in the project?!
>
> I would be grateful for any hint. Many thanks in advance.
>
> Best regards,
> Daniel
>
>
>
> [1]
> https://github.com/apache/incubator-streampipes/blob/dev/streampipes-w
> rapper-standalone/src/main/java/org/apache/streampipes/wrapper/standal
> one/StreamPipesDataProcessor.java [2]
> https://github.com/apache/incubator-streampipes/blob/dev/streampipes-s
> dk/src/main/java/org/apache/streampipes/sdk/builder/AbstractConfigurab
> lePipelineElementBuilder.java (line 824) [3]
> https://github.com/apache/incubator-streampipes/blob/dev/streampipes-p
> ipeline-management/src/main/java/org/apache/streampipes/manager/remote
> /ContainerProvidedOptionsHandler.java
> [4]
> https://github.com/apache/incubator-streampipes/blob/dev/streampipes-r
> est/src/main/java/org/apache/streampipes/rest/impl/ContainerProvidedOp
> tions.java
>