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

    https://github.com/apache/flink/pull/1591#discussion_r52102118
  
    --- Diff: 
flink-contrib/flink-storm-examples/src/test/java/org/apache/flink/storm/tests/operators/VerifyMetaDataBolt.java
 ---
    @@ -0,0 +1,65 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.flink.storm.tests.operators;
    +
    +import java.util.Map;
    +
    +import backtype.storm.task.OutputCollector;
    +import backtype.storm.task.TopologyContext;
    +import backtype.storm.topology.OutputFieldsDeclarer;
    +import backtype.storm.topology.base.BaseRichBolt;
    +import backtype.storm.tuple.Fields;
    +import backtype.storm.tuple.Tuple;
    +import backtype.storm.tuple.Values;
    +
    +public class VerifyMetaDataBolt extends BaseRichBolt {
    +   private static final long serialVersionUID = 1353222852073800478L;
    +
    +   public static final String STREAM_ID = "boltMeta";
    +
    +   private OutputCollector collector;
    +   private TopologyContext context;
    +
    +   public static boolean errorOccured = false;
    +
    +   @SuppressWarnings("rawtypes")
    +   @Override
    +   public void prepare(Map stormConf, TopologyContext context, 
OutputCollector collector) {
    +           this.collector = collector;
    +           this.context = context;
    +   }
    +
    +   @Override
    +   public void execute(Tuple input) {
    +           if (!input.getSourceComponent().equals(input.getString(0))
    +                           || 
!input.getSourceStreamId().equals(input.getString(1))
    +                           || 
!input.getSourceGlobalStreamid().get_componentId().equals(input.getString(0))
    +                           || 
!input.getSourceGlobalStreamid().get_streamId().equals(input.getString(1))
    +                           || input.getSourceTask() != 
input.getInteger(2).intValue()) {
    +                   errorOccured = true;
    --- End diff --
    
    Should the message id also be verified here sine it belongs to the meta 
data?


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