Package backtype.storm.tuple

Examples of backtype.storm.tuple.Fields


      }
    }

    @Override
    public void declareOutputFields(OutputFieldsDeclarer declarer) {
      declarer.declare(new Fields("id", "tweeter"));
    }
View Full Code Here


      }
    }

    @Override
    public void declareOutputFields(OutputFieldsDeclarer declarer) {
      declarer.declare(new Fields("id", "follower"));
    }
View Full Code Here

        assertEquals(Arrays.asList("test"), scheme.deserialize("test".getBytes()));
    }

    @Test
    public void testGetOutputFields() throws Exception {
        Fields outputFields = scheme.getOutputFields();
        assertTrue(outputFields.contains(StringScheme.STRING_SCHEME_KEY));
        assertEquals(1, outputFields.size());
    }
View Full Code Here

      _collector.emit(new Values(_id, _followers.size()));
    }

    @Override
    public void declareOutputFields(OutputFieldsDeclarer declarer) {
      declarer.declare(new Fields("id", "partial-count"));
    }
View Full Code Here

      _collector.emit(new Values(_id, _count));
    }

    @Override
    public void declareOutputFields(OutputFieldsDeclarer declarer) {
      declarer.declare(new Fields("id", "reach"));
    }
View Full Code Here

   
    @Override
    public void declareOutputFields(OutputFieldsDeclarer declarer) {
        // in partitioned example, in case an emitter task receives a later transaction than it's emitted so far,
        // when it sees the earlier txid it should know to emit nothing
        declarer.declareStream(TRANSACTION_BATCH_STREAM_ID, new Fields("tx", "tx-meta", "committed-txid"));
        declarer.declareStream(TRANSACTION_COMMIT_STREAM_ID, new Fields("tx"));
    }
View Full Code Here

      // ȫ��group ������taskid=0��task�﷢��tuple
      if (Thrift.isGlobalGrouping(thrift_grouping)) {
        grouperType = GrouperType.global;
      } else {
        List<String> fields_group = Thrift.fieldGrouping(thrift_grouping);
        Fields fields = new Fields(fields_group);
        fields_grouper = new MkFieldsGrouper(out_fields, fields,num_tasks);
        // ����fields��ֵ��hashcode����
        grouperType = GrouperType.fields;
      }
    } else if (GroupingConstants.all.equals(fields)) {
View Full Code Here

    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

    for (Entry<String, Map<String, Grouping>> entry : output_groupings
        .entrySet()) {

      Map<String, Grouping> component_grouping = entry.getValue();
      String stream_id = entry.getKey();
      Fields out_fields = topology_context.getThisOutputFields(stream_id);

      Map<String, MkGrouper> componentGrouper = new HashMap<String, MkGrouper>();
      for (Entry<String, Grouping> cg : component_grouping.entrySet()) {
        String component = cg.getKey();
        Grouping tgrouping = cg.getValue();
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

TOP

Related Classes of backtype.storm.tuple.Fields

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.