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

    https://github.com/apache/storm/pull/2026#discussion_r109074402
  
    --- Diff: 
external/storm-eventhubs/src/main/java/org/apache/storm/eventhubs/spout/StringEventDataScheme.java
 ---
    @@ -44,21 +38,32 @@
     public class StringEventDataScheme implements IEventDataScheme {
     
       private static final long serialVersionUID = 1L;
    +  private static final Logger logger = 
LoggerFactory.getLogger(StringEventDataScheme.class);
     
       @Override
    -  public List<Object> deserialize(Message message) {
    +  public List<Object> deserialize(EventData eventData) {
         final List<Object> fieldContents = new ArrayList<Object>();
    -
    -    for (Section section : message.getPayload()) {
    -      if (section instanceof Data) {
    -        Data data = (Data) section;
    -        fieldContents.add(new String(data.getValue().getArray()));
    -      } else if (section instanceof AmqpValue) {
    -        AmqpValue amqpValue = (AmqpValue) section;
    -        fieldContents.add(amqpValue.getValue().toString());
    +    String messageData = "";
    +    if (eventData.getBytes()!=null) {
    +      messageData = new String(eventData.getBytes());
    +    }
    +    /*Will only serialize AMQPValue type*/
    +    else if (eventData.getObject()!=null) {
    +      try {
    +        if (!(eventData.getObject() instanceof List)) {
    +          messageData = eventData.getObject().toString();
    +        } else {
    +          throw new RuntimeException("Cannot serialize the given AMQP 
type.");
    --- End diff --
    
    >serialize [](start = 45, length = 9)
    
    cannot deserialize...


---
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