Package backtype.storm.generated

Examples of backtype.storm.generated.StreamInfo


    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


    /**
     * Gets the declared output fields for the specified component/stream.
     */
    public Fields getComponentOutputFields(String componentId, String streamId) {
        StreamInfo streamInfo = getComponentCommon(componentId).get_streams().get(streamId);
        if(streamInfo==null) {
            throw new IllegalArgumentException("No output fields defined for component:stream " + componentId + ":" + streamId);
        }
        return new Fields(streamInfo.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

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

    }
    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

          common=spec.get_common();
      }
     
      if(common!=null)
      {
          StreamInfo sinfo=Thrift.outputFields(sysEventFields);
          common.put_to_streams(SYSTEM_STREAM_ID,sinfo);
      }
  }
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

        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

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.