Package backtype.storm.generated

Examples of backtype.storm.generated.StreamInfo


    }

    @Override
    public void declareOutputFields(OutputFieldsDeclarer declarer) {
        for(String stream: _fields.keySet()) {
            StreamInfo info = _fields.get(stream);
            declarer.declareStream(stream, info.is_direct(), new Fields(info.get_output_fields()));
        }
    }
View Full Code Here


    }
   
    @Override
    public void declareOutputFields(OutputFieldsDeclarer declarer) {
        for(String stream: _outputs.keySet()) {
            StreamInfo def = _outputs.get(stream);
            if(def.is_direct()) {
                declarer.declareStream(stream, true, new Fields(def.get_output_fields()));
            } else {
                declarer.declareStream(stream, new Fields(def.get_output_fields()));               
            }
        }
    }
View Full Code Here

    }

    @Override
    public void declareOutputFields(OutputFieldsDeclarer declarer) {
        for(String stream: _outputs.keySet()) {
            StreamInfo def = _outputs.get(stream);
            if(def.is_direct()) {
                declarer.declareStream(stream, true, new Fields(def.get_output_fields()));
            } else {
                declarer.declareStream(stream, new Fields(def.get_output_fields()));
            }
        }
    }
View Full Code Here

    }

    @Override
    public void declareOutputFields(OutputFieldsDeclarer declarer) {
        for(String stream: _fields.keySet()) {
            StreamInfo info = _fields.get(stream);
            declarer.declareStream(stream, info.is_direct(), new Fields(info.get_output_fields()));
        }
    }
View Full Code Here

        component.declareOutputFields(getter);
        Map<String, StreamInfo> declaration = getter.getFieldsDeclaration();
        if(declaration.size()!=1) {
            throw new RuntimeException("Trident only supports components that emit a single stream");
        }
        StreamInfo si = declaration.values().iterator().next();
        if(si.is_direct()) {
            throw new RuntimeException("Trident does not support direct streams");
        }
        return new Fields(si.get_output_fields());       
    }
View Full Code Here

    public void declareStream(String streamId, boolean direct, Fields fields) {
        if(_fields.containsKey(streamId)) {
            throw new IllegalArgumentException("Fields for " + streamId + " already set");
        }
        _fields.put(streamId, new StreamInfo(fields.toList(), direct));
    }
View Full Code Here

    @Override
    public Fields getOutputFields() {
        OutputFieldsGetter fieldGetter = new OutputFieldsGetter();
        tupleProducer.declareOutputFields(fieldGetter);
        StreamInfo streamInfo = fieldGetter.getFieldsDeclaration().get(Utils.DEFAULT_STREAM_ID);
        if (streamInfo == null) {
            throw new IllegalArgumentException("Jms Tuple producer has not declared output fields for the default stream");
        }
       
        return new Fields(streamInfo.get_output_fields());
    }
View Full Code Here

    }
    return phint;
  }

  public static StreamInfo directOutputFields(List<String> fields) {
    return new StreamInfo(fields, true);
  }
View Full Code Here

  public static StreamInfo directOutputFields(List<String> fields) {
    return new StreamInfo(fields, true);
  }

  public static StreamInfo outputFields(List<String> fields) {
    return new StreamInfo(fields, false);
  }
View Full Code Here

      Map<String, StreamInfo> streamInfoMap = ThriftTopologyUtils
          .getComponentCommon(topology, component).get_streams();
      for (Entry<String, StreamInfo> entry : streamInfoMap.entrySet()) {
        String streamId = entry.getKey();
        StreamInfo streamInfo = entry.getValue();

        streamToFieldsMap.put(streamId,
            new Fields(streamInfo.get_output_fields()));
      }

      componentToStreamToFields.put(component, streamToFieldsMap);
    }
View Full Code Here

TOP

Related Classes of backtype.storm.generated.StreamInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.