Storm入门例子




import java.util.Map;
import java.util.Random;

import org.apache.storm.spout.SpoutOutputCollector;
import org.apache.storm.task.TopologyContext;
import org.apache.storm.topology.OutputFieldsDeclarer;
import org.apache.storm.topology.base.BaseRichSpout;
import org.apache.storm.tuple.Fields;
import org.apache.storm.tuple.Values;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


public class NumSpout extends BaseRichSpout{
	private static final long serialVersionUID = 1L;
	private static final Logger LOG = LoggerFactory.getLogger(NumSpout.class) ;
	
	private SpoutOutputCollector collector ;
	private static long seq ; 
	private static Random rand ; 

	public void nextTuple() {
		long numA = rand.nextLong()%1000 ;
		long numB = rand.nextLong()%1000 ;
		LOG.info("seq=" + seq + ":\t numA=" +numA + "\t" + "numB="+numB) ;
		seq++ ;
		this.collector.emit(new Values(seq , numA , numB)) ;
		try {
			Thread.sleep(2000) ;
		} catch (InterruptedException e) {
		}
	}

	public void open(Map config, TopologyContext context, SpoutOutputCollector collector) {
		this.collector = collector ;
		seq = 0 ; 
		rand = new Random() ;
	}

	public void declareOutputFields(OutputFieldsDeclarer declarer) {
		declarer.declare(new Fields("seq" , "numA" , "numB")) ;
	}
	

}

import java.util.Map;

import org.apache.storm.task.OutputCollector;
import org.apache.storm.task.TopologyContext;
import org.apache.storm.topology.OutputFieldsDeclarer;
import org.apache.storm.topology.base.BaseRichBolt;
import org.apache.storm.tuple.Fields;
import org.apache.storm.tuple.Tuple;
import org.apache.storm.tuple.Values;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


public class AddBolt extends BaseRichBolt{ 
	private static final long serialVersionUID = 1L;
	private static final Logger LOG = LoggerFactory.getLogger(AddBolt.class) ;
	
	private OutputCollector collector ;

	public void execute(Tuple paramTuple) {
		 long seq = paramTuple.getLongByField("seq"); 
		 long numA = paramTuple.getLongByField("numA"); 
		 long numB = paramTuple.getLongByField("numB");  
		 long sum = numA + numB ; 
		 LOG.info("seq=" + seq + "\t" + numA + " + " + numB + " = " + sum) ;
		 this.collector.emit(new Values(seq , "add" , sum)) ;
	}

	public void prepare(Map paramMap, TopologyContext paramTopologyContext,
			OutputCollector collector) {
		this.collector = collector ;
	}

	public void declareOutputFields(OutputFieldsDeclarer declarer) {
		declarer.declare(new Fields("seq" , "desc" , "sum")) ;
	}

}

import java.util.Map;

import org.apache.storm.task.OutputCollector;
import org.apache.storm.task.TopologyContext;
import org.apache.storm.topology.OutputFieldsDeclarer;
import org.apache.storm.topology.base.BaseRichBolt;
import org.apache.storm.tuple.Fields;
import org.apache.storm.tuple.Tuple;
import org.apache.storm.tuple.Values;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


public class SubBolt extends BaseRichBolt{ 
	private static final long serialVersionUID = 1L;
	private static final Logger LOG = LoggerFactory.getLogger(SubBolt.class) ;
	
	private OutputCollector collector ;

	public void execute(Tuple paramTuple) {
		 long seq = paramTuple.getLongByField("seq"); 
		 long numA = paramTuple.getLongByField("numA"); 
		 long numB = paramTuple.getLongByField("numB");  
		 long sum = numA - numB ; 
		 LOG.info("seq=" + seq + "\t" + numA + " - "  + numB + " = " + sum) ;
		 this.collector.emit(new Values(seq , "sub" , sum)) ;
	}

	public void prepare(Map paramMap, TopologyContext paramTopologyContext,
			OutputCollector collector) {
		this.collector = collector ;
	}

	public void declareOutputFields(OutputFieldsDeclarer declarer) {
		declarer.declare(new Fields("seq" , "desc" , "sum")) ;
	}

}

public class NumBean {
	private Long numA ;
	private Long numB ;
	private Long addSum ;
	private Long subSum ;
	public NumBean() {
		super(); 
		this.numA = null ;
		this.numB = null ;
		this.addSum = null ;
		this.subSum = null ;
	}
	public Long getNumA() {
		return numA;
	}
	public void setNumA(Long numA) {
		this.numA = numA;
	}
	public Long getNumB() {
		return numB;
	}
	public void setNumB(Long numB) {
		this.numB = numB;
	}
	public Long getAddSum() {
		return addSum;
	}
	public void setAddSum(Long addSum) {
		this.addSum = addSum;
	}
	public Long getSubSum() {
		return subSum;
	}
	public void setSubSum(Long subSum) {
		this.subSum = subSum;
	} 
	
	@Override
	public String toString() {
		return "NumBean [numA=" + numA + ", numB=" + numB + "]";
	}
    
}

import java.util.Map;

import org.apache.storm.shade.org.apache.curator.shaded.com.google.common.collect.Maps;
import org.apache.storm.task.OutputCollector;
import org.apache.storm.task.TopologyContext;
import org.apache.storm.topology.OutputFieldsDeclarer;
import org.apache.storm.topology.base.BaseRichBolt;
import org.apache.storm.tuple.Tuple;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


public class CalcBolt extends BaseRichBolt{ 
	private static final long serialVersionUID = 1L;
	private static final Logger LOG = LoggerFactory.getLogger(CalcBolt.class) ;
	
	private OutputCollector collector ;
	private Map<Long , NumBean> numBeanMap ; 
	
	private void calc(NumBean numBean){
		numBean.setNumA((numBean.getAddSum() + numBean.getSubSum()) / 2) ;
		numBean.setNumB((numBean.getAddSum() - numBean.getSubSum()) / 2) ;
	}

	public void execute(Tuple paramTuple) {
		 long seq = paramTuple.getLongByField("seq"); 
		 String desc = paramTuple.getStringByField("desc"); 
		 long sum = paramTuple.getLongByField("sum") ;
		 if(! numBeanMap.containsKey(seq)){
			 numBeanMap.put(seq, new NumBean()) ;
		 } 
		 NumBean numBean = numBeanMap.get(seq) ;
		 if("add".equals(desc)){
			 numBean.setAddSum(sum) ; 
		 }
		 else{
			 numBean.setSubSum(sum) ;  
		 }
		 if(numBean.getAddSum() != null && numBean.getSubSum() != null){
			 calc(numBean) ;
			 numBeanMap.remove(seq) ;
			 LOG.info("seq=" + seq + "\t" + numBean.toString()) ;
		 }  
	}

	public void prepare(Map paramMap, TopologyContext paramTopologyContext,
			OutputCollector collector) {
		this.collector = collector ;
		this.numBeanMap = Maps.newHashMap() ;
	}

	public void declareOutputFields(OutputFieldsDeclarer declarer) {
	}

}

import org.apache.storm.Config;
import org.apache.storm.LocalCluster;
import org.apache.storm.topology.TopologyBuilder;


public class Main {
	
	public static void main(String[] args) {
		 NumSpout numSpout = new NumSpout() ;
		 AddBolt addBolt = new AddBolt() ;
		 SubBolt subBolt = new SubBolt() ;
		 CalcBolt calcBolt = new CalcBolt() ;
		 
		 TopologyBuilder topologyBuilder = new TopologyBuilder() ;
		 topologyBuilder.setSpout("numSpout", numSpout) ;
		 topologyBuilder.setBolt("addBolt", addBolt)
		                .shuffleGrouping("numSpout") ;
		 topologyBuilder.setBolt("subBolt", subBolt)
         				.shuffleGrouping("numSpout") ;
		 topologyBuilder.setBolt("calcBolt", calcBolt)
		                .shuffleGrouping("addBolt").shuffleGrouping("subBolt") ;
		 
		 Config config = new Config() ;
		 LocalCluster localCluster = new LocalCluster() ;
		 localCluster.submitTopology("num-add", config, topologyBuilder.createTopology());
	}

}


  <dependency>
        <groupId>org.apache.storm</groupId>
	    <artifactId>storm-core</artifactId>
	    <version>1.1.1</version>
	    <scope>provided</scope>
    </dependency>


17001 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=0:	 numA=425	numB=551
17008 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=1	425 - 551 = -126
17054 [Thread-18-addBolt-executor[2 2]] INFO  o.a.s.d.executor - Preparing bolt addBolt:(2)
17054 [Thread-18-addBolt-executor[2 2]] INFO  o.a.s.d.executor - Prepared bolt addBolt:(2)
17054 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=1	425 + 551 = 976
17063 [Thread-20-calcBolt-executor[3 3]] INFO  o.a.s.d.executor - Preparing bolt calcBolt:(3)
17064 [Thread-20-calcBolt-executor[3 3]] INFO  o.a.s.d.executor - Prepared bolt calcBolt:(3)
17065 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=1	NumBean [numA=425, numB=551]
17071 [Thread-22-__acker-executor[1 1]] INFO  o.a.s.d.executor - Preparing bolt __acker:(1)
17075 [Thread-22-__acker-executor[1 1]] INFO  o.a.s.d.executor - Prepared bolt __acker:(1)
19005 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=1:	 numA=533	numB=121
19007 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=2	533 + 121 = 654
19007 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=2	533 - 121 = 412
19009 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=2	NumBean [numA=533, numB=121]
21006 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=2:	 numA=-225	numB=-244
21008 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=3	-225 + -244 = -469
21008 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=3	-225 - -244 = 19
21011 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=3	NumBean [numA=-225, numB=-244]
23007 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=3:	 numA=562	numB=-724
23011 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=4	562 - -724 = 1286
23011 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=4	562 + -724 = -162
23013 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=4	NumBean [numA=562, numB=-724]
25007 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=4:	 numA=-629	numB=-908
25009 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=5	-629 + -908 = -1537
25009 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=5	-629 - -908 = 279
25011 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=5	NumBean [numA=-629, numB=-908]
27008 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=5:	 numA=120	numB=-964
27010 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=6	120 + -964 = -844
27010 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=6	120 - -964 = 1084
27013 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=6	NumBean [numA=120, numB=-964]
29009 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=6:	 numA=-14	numB=355
29013 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=7	-14 + 355 = 341
29013 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=7	-14 - 355 = -369
29015 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=7	NumBean [numA=-14, numB=355]
31010 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=7:	 numA=-171	numB=-732
31014 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=8	-171 - -732 = 561
31014 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=8	-171 + -732 = -903
31017 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=8	NumBean [numA=-171, numB=-732]
33012 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=8:	 numA=-802	numB=279
33015 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=9	-802 + 279 = -523
33015 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=9	-802 - 279 = -1081
33019 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=9	NumBean [numA=-802, numB=279]
35013 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=9:	 numA=-347	numB=949
35015 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=10	-347 - 949 = -1296
35015 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=10	-347 + 949 = 602
35017 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=10	NumBean [numA=-347, numB=949]
37013 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=10:	 numA=-253	numB=73
37016 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=11	-253 - 73 = -326
37016 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=11	-253 + 73 = -180
37018 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=11	NumBean [numA=-253, numB=73]
39013 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=11:	 numA=-610	numB=91
39015 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=12	-610 + 91 = -519
39015 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=12	-610 - 91 = -701
39019 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=12	NumBean [numA=-610, numB=91]
41013 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=12:	 numA=291	numB=359
41015 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=13	291 + 359 = 650
41015 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=13	291 - 359 = -68
41018 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=13	NumBean [numA=291, numB=359]
43014 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=13:	 numA=100	numB=-649
43016 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=14	100 + -649 = -549
43016 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=14	100 - -649 = 749
43020 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=14	NumBean [numA=100, numB=-649]
45015 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=14:	 numA=379	numB=412
45018 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=15	379 + 412 = 791
45018 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=15	379 - 412 = -33
45021 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=15	NumBean [numA=379, numB=412]
47016 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=15:	 numA=798	numB=-605
47018 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=16	798 + -605 = 193
47018 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=16	798 - -605 = 1403
47022 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=16	NumBean [numA=798, numB=-605]
49016 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=16:	 numA=-245	numB=431
49018 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=17	-245 + 431 = 186
49018 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=17	-245 - 431 = -676
49020 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=17	NumBean [numA=-245, numB=431]
51017 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=17:	 numA=599	numB=-647
51019 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=18	599 - -647 = 1246
51019 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=18	599 + -647 = -48
51022 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=18	NumBean [numA=599, numB=-647]
53017 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=18:	 numA=178	numB=-480
53019 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=19	178 + -480 = -302
53019 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=19	178 - -480 = 658
53021 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=19	NumBean [numA=178, numB=-480]
55018 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=19:	 numA=958	numB=973
55020 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=20	958 + 973 = 1931
55020 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=20	958 - 973 = -15
55023 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=20	NumBean [numA=958, numB=973]
57018 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=20:	 numA=-944	numB=502
57021 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=21	-944 + 502 = -442
57021 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=21	-944 - 502 = -1446
57024 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=21	NumBean [numA=-944, numB=502]
59018 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=21:	 numA=-722	numB=-50
59020 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=22	-722 + -50 = -772
59020 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=22	-722 - -50 = -672
59022 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=22	NumBean [numA=-722, numB=-50]
61018 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=22:	 numA=203	numB=603
61021 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=23	203 + 603 = 806
61021 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=23	203 - 603 = -400
61023 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=23	NumBean [numA=203, numB=603]
63019 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=23:	 numA=-353	numB=-775
63021 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=24	-353 - -775 = 422
63021 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=24	-353 + -775 = -1128
63024 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=24	NumBean [numA=-353, numB=-775]
65019 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=24:	 numA=-526	numB=-330
65021 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=25	-526 + -330 = -856
65021 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=25	-526 - -330 = -196
65025 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=25	NumBean [numA=-526, numB=-330]
67020 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=25:	 numA=507	numB=454
67024 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=26	507 - 454 = 53
67024 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=26	507 + 454 = 961
67027 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=26	NumBean [numA=507, numB=454]
69021 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=26:	 numA=877	numB=144
69024 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=27	877 + 144 = 1021
69024 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=27	877 - 144 = 733
69027 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=27	NumBean [numA=877, numB=144]
71021 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=27:	 numA=833	numB=-55
71024 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=28	833 - -55 = 888
71024 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=28	833 + -55 = 778
71027 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=28	NumBean [numA=833, numB=-55]
73022 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=28:	 numA=531	numB=200
73025 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=29	531 - 200 = 331
73025 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=29	531 + 200 = 731
73028 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=29	NumBean [numA=531, numB=200]
75023 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=29:	 numA=-818	numB=466
75026 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=30	-818 + 466 = -352
75026 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=30	-818 - 466 = -1284
75029 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=30	NumBean [numA=-818, numB=466]
77024 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=30:	 numA=-831	numB=-689
77027 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=31	-831 + -689 = -1520
77027 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=31	-831 - -689 = -142
77029 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=31	NumBean [numA=-831, numB=-689]
79025 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=31:	 numA=-937	numB=461
79027 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=32	-937 + 461 = -476
79027 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=32	-937 - 461 = -1398
79030 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=32	NumBean [numA=-937, numB=461]
81025 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=32:	 numA=-846	numB=901
81027 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=33	-846 + 901 = 55
81027 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=33	-846 - 901 = -1747
81030 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=33	NumBean [numA=-846, numB=901]
83025 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=33:	 numA=537	numB=-389
83028 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=34	537 + -389 = 148
83028 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=34	537 - -389 = 926
83030 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=34	NumBean [numA=537, numB=-389]
85026 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=34:	 numA=362	numB=58
85028 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=35	362 + 58 = 420
85028 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=35	362 - 58 = 304
85030 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=35	NumBean [numA=362, numB=58]
87027 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=35:	 numA=721	numB=-880
87030 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=36	721 + -880 = -159
87030 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=36	721 - -880 = 1601
87033 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=36	NumBean [numA=721, numB=-880]
89027 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=36:	 numA=370	numB=-963
89029 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=37	370 + -963 = -593
89029 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=37	370 - -963 = 1333
89031 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=37	NumBean [numA=370, numB=-963]
91028 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=37:	 numA=-756	numB=51
91031 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=38	-756 + 51 = -705
91031 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=38	-756 - 51 = -807
91033 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=38	NumBean [numA=-756, numB=51]
93028 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=38:	 numA=-369	numB=601
93030 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=39	-369 - 601 = -970
93030 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=39	-369 + 601 = 232
93033 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=39	NumBean [numA=-369, numB=601]
95029 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=39:	 numA=16	numB=-632
95031 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=40	16 + -632 = -616
95031 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=40	16 - -632 = 648
95034 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=40	NumBean [numA=16, numB=-632]
97030 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=40:	 numA=267	numB=707
97033 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=41	267 - 707 = -440
97033 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=41	267 + 707 = 974
97036 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=41	NumBean [numA=267, numB=707]
99031 [Thread-28-numSpout-executor[4 4]] INFO  NumSpout - seq=41:	 numA=-799	numB=-687
99033 [Thread-18-addBolt-executor[2 2]] INFO  AddBolt - seq=42	-799 + -687 = -1486
99033 [Thread-26-subBolt-executor[5 5]] INFO  SubBolt - seq=42	-799 - -687 = -112
99035 [Thread-20-calcBolt-executor[3 3]] INFO  CalcBolt - seq=42	NumBean [numA=-799, numB=-687]
相关文章
相关标签/搜索