You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@streampipes.apache.org by GitBox <gi...@apache.org> on 2022/11/26 17:57:12 UTC

[GitHub] [streampipes] dominikriemer opened a new issue, #800: unclear missleading example code writing own processor on website

dominikriemer opened a new issue, #800:
URL: https://github.com/apache/streampipes/issues/800

   I just wondering on the example with the 1 class processor here [1] [2].
   
   In the description is mentioned that
   
   Next, we are interested in the fields of the input event stream that contains the latitude and longitude value we would like to compute against the geofence center location as follows:
   
   ```
   
   String latitudeFieldName = extractor.mappingPropertyValue("latitude-field");
   String longitudeFieldName
   = extractor.mappingPropertyValue("longitude-field");
   
   ```
   
   
   
   1) Shouldn't it be:
   ```
   
   String latitudeFieldName = parameters.extractor().mappingPropertyValue("latitude-field");
   String longitudeFieldName
   = parameters.extractor().mappingPropertyValue("longitude-field");
   
   ```
   
   
   
   2) But this code snippet is  is missing in "Your controller class should look as follows" example.
   
   3) The latitudeFieldName is used in the onEvent Method as
   ```
   
   float latitude = event.getFieldBySelector(latitudeFieldName).getAsPrimitive().getAsFloat();
   float
   longitude = event.getFieldBySelector(longitudeFieldName).getAsPrimitive().getAsFloat();
   
   ```
   
   But the variables can not be resolved. 
   
   I but the example code into a file but better overview
    [^GeofencingProcessor.java] 
   
   
   [1] https://streampipes.apache.org/docs/docs/extend-tutorial-data-processors.html
   [2] https://github.com/apache/streampipes-website/blob/dev/documentation/docs/06_extend-tutorial-data-processors.md
   
   
   Imported from Jira [STREAMPIPES-643](https://issues.apache.org/jira/browse/STREAMPIPES-643). Original Jira may contain additional context.
   Reported by: micklich.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@streampipes.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [streampipes] dominikriemer closed issue #800: unclear missleading example code writing own processor on website

Posted by GitBox <gi...@apache.org>.
dominikriemer closed issue #800: unclear missleading  example code writing own processor on website
URL: https://github.com/apache/streampipes/issues/800


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@streampipes.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org