Github user SreeramGarlapati commented on a diff in the pull request:

    https://github.com/apache/storm/pull/1985#discussion_r104280323
  
    --- Diff: 
external/storm-eventhubs/src/main/java/org/apache/storm/eventhubs/spout/EventDataScheme.java
 ---
    @@ -46,25 +42,11 @@
        private static final long serialVersionUID = 1L;
     
        @Override
    -   public List<Object> deserialize(Message message) {
    +   public List<Object> deserialize(EventData eventData) {
                final List<Object> fieldContents = new ArrayList<Object>();
    -
    -           Map metaDataMap = new HashMap();
                String messageData = "";
    -
    -           for (Section section : message.getPayload()) {
    -                   if (section instanceof Data) {
    -                           Data data = (Data) section;
    -                           messageData = new 
String(data.getValue().getArray());
    -                   } else if (section instanceof AmqpValue) {
    -                           AmqpValue amqpValue = (AmqpValue) section;
    -                           messageData = amqpValue.getValue().toString();
    -                   } else if (section instanceof ApplicationProperties) {
    -                           final ApplicationProperties 
applicationProperties = (ApplicationProperties) section;
    -                           metaDataMap = applicationProperties.getValue();
    -                   }
    -           }
    -
    +           messageData = new String 
(eventData.getBody(),eventData.getBodyOffset(),eventData.getBodyLength(),Charset.defaultCharset());
    --- End diff --
    
    Null check getBody


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to