Package backtype.storm.coordination.CoordinatedBolt

Examples of backtype.storm.coordination.CoordinatedBolt.IdStreamSpec


            Map<String, SourceArgs> coordinatedArgs = new HashMap<String, SourceArgs>();
            for(String c: componentBoltSubscriptions(component)) {
                coordinatedArgs.put(c, SourceArgs.all());
            }
           
            IdStreamSpec idSpec = null;
            if(component.committer) {
                idSpec = IdStreamSpec.makeDetectSpec(coordinator, TransactionalSpoutCoordinator.TRANSACTION_COMMIT_STREAM_ID);         
            }
            BoltDeclarer input = builder.setBolt(id,
                                                  new CoordinatedBolt(component.bolt,
View Full Code Here


            if (i==1) {
                source.put(boltId(i-1), SourceArgs.single());
            } else if (i>=2) {
                source.put(boltId(i-1), SourceArgs.all());
            }
            IdStreamSpec idSpec = null;
            if(i==_components.size()-1 && component.bolt instanceof FinishedCallback) {
                idSpec = IdStreamSpec.makeDetectSpec(PREPARE_ID, PrepareRequest.ID_STREAM);
            }
            BoltDeclarer declarer = builder.setBolt(
                    boltId(i),
                    new CoordinatedBolt(component.bolt, source, idSpec),
                    component.parallelism);
           
            for(Map conf: component.componentConfs) {
                declarer.addConfigurations(conf);
            }
           
            if(idSpec!=null) {
                declarer.fieldsGrouping(idSpec.getGlobalStreamId().get_componentId(), PrepareRequest.ID_STREAM, new Fields("request"));
            }
            if(i==0 && component.declarations.isEmpty()) {
                declarer.noneGrouping(PREPARE_ID, PrepareRequest.ARGS_STREAM);
            } else {
                String prevId;
View Full Code Here

            if (i==1) {
                source.put(boltId(i-1), SourceArgs.single());
            } else if (i>=2) {
                source.put(boltId(i-1), SourceArgs.all());
            }
            IdStreamSpec idSpec = null;
            if(i==_components.size()-1 && component.bolt instanceof FinishedCallback) {
                idSpec = IdStreamSpec.makeDetectSpec(PREPARE_ID, PrepareRequest.ID_STREAM);
            }
            BoltDeclarer declarer = builder.setBolt(
                    boltId(i),
                    new CoordinatedBolt(component.bolt, source, idSpec),
                    component.parallelism);
           
            for(Map conf: component.componentConfs) {
                declarer.addConfigurations(conf);
            }
           
            if(idSpec!=null) {
                declarer.fieldsGrouping(idSpec.getGlobalStreamId().get_componentId(), PrepareRequest.ID_STREAM, new Fields("request"));
            }
            if(i==0 && component.declarations.isEmpty()) {
                declarer.noneGrouping(PREPARE_ID, PrepareRequest.ARGS_STREAM);
            } else {
                String prevId;
View Full Code Here

            Map<String, SourceArgs> coordinatedArgs = new HashMap<String, SourceArgs>();
            for(String c: componentBoltSubscriptions(component)) {
                coordinatedArgs.put(c, SourceArgs.all());
            }
           
            IdStreamSpec idSpec = null;
            if(component.committer) {
                idSpec = IdStreamSpec.makeDetectSpec(coordinator, TransactionalSpoutCoordinator.TRANSACTION_COMMIT_STREAM_ID);         
            }
            BoltDeclarer input = builder.setBolt(id,
                                                  new CoordinatedBolt(component.bolt,
View Full Code Here

      // get all source component
      for (String c : componentBoltSubscriptions(component)) {
        coordinatedArgs.put(c, SourceArgs.all());
      }

      IdStreamSpec idSpec = null;
      if (component.committer) {
        idSpec = IdStreamSpec
            .makeDetectSpec(
                coordinator,
                TransactionalSpoutCoordinator.TRANSACTION_COMMIT_STREAM_ID);
View Full Code Here

      if (i == 1) {
        source.put(boltId(i - 1), SourceArgs.single());
      } else if (i >= 2) {
        source.put(boltId(i - 1), SourceArgs.all());
      }
      IdStreamSpec idSpec = null;
      if (i == _components.size() - 1
          && component.bolt instanceof FinishedCallback) {
        idSpec = IdStreamSpec.makeDetectSpec(PREPARE_ID,
            PrepareRequest.ID_STREAM);
      }
      BoltDeclarer declarer = builder.setBolt(boltId(i),
          new CoordinatedBolt(component.bolt, source, idSpec),
          component.parallelism);

      for (Map conf : component.componentConfs) {
        declarer.addConfigurations(conf);
      }

      if (idSpec != null) {
        declarer.fieldsGrouping(idSpec.getGlobalStreamId()
            .get_componentId(), PrepareRequest.ID_STREAM,
            new Fields("request"));
      }
      if (i == 0 && component.declarations.isEmpty()) {
        declarer.noneGrouping(PREPARE_ID, PrepareRequest.ARGS_STREAM);
View Full Code Here

TOP

Related Classes of backtype.storm.coordination.CoordinatedBolt.IdStreamSpec

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.