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

    https://github.com/apache/storm/pull/2026#discussion_r107485639
  
    --- Diff: 
external/storm-eventhubs/src/main/java/org/apache/storm/eventhubs/spout/BinaryEventDataScheme.java
 ---
    @@ -37,23 +37,21 @@
      */
     public class BinaryEventDataScheme implements IEventDataScheme {
     
    +   private static final Logger logger = 
LoggerFactory.getLogger(BinaryEventDataScheme.class);
        @Override
    -   public List<Object> deserialize(Message message) {
    +   public List<Object> deserialize(EventData eventData){
                final List<Object> fieldContents = new ArrayList<Object>();
    -
    -           Map metaDataMap = new HashMap();
    -           byte[] messageData = new byte[0];
    -
    -           for (Section section : message.getPayload()) {
    -                   if (section instanceof Data) {
    -                           Data data = (Data) section;
    -                           messageData = data.getValue().getArray();
    -                   } else if (section instanceof ApplicationProperties) {
    -                           final ApplicationProperties 
applicationProperties = (ApplicationProperties) section;
    -                           metaDataMap = applicationProperties.getValue();
    +           byte [] messageData = null;
    +           if(eventData.getBytes() != null)
    +                   messageData =  eventData.getBytes();
    +           else if(eventData.getObject()!=null) {
    +                   try {
    +                           messageData = 
Serializedeserializeutil.serialize(eventData.getObject());
    +                   }catch (IOException e){
    +                           logger.error("Failed to serialize 
object"+e.toString());
    --- End diff --
    
    >logger.error("Failed to serialize object"+e.toString()); [](start = 4, 
length = 56)
    
    Will this not result into message loss..? if so don't Swallow the 
exception...


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