1. Storm是什么?

http://storm.apache.org/

Apache Storm is a free and open source distributed realtime computation system. Apache Storm makes it easy to reliably process unbounded streams of data, doing for realtime processing what Hadoop did for batch processing. Apache Storm is simple, can be used with any programming language, and is a lot of fun to use!
Apache Storm has many use cases: realtime analytics, online machine learning, continuous computation, distributed RPC, ETL, and more. Apache Storm is fast: a benchmark clocked it at over a million tuples processed per second per node. It is scalable, fault-tolerant, guarantees your data will be processed, and is easy to set up and operate.
Apache Storm integrates with the queueing and database technologies you already use. An Apache Storm topology consumes streams of data and processes those streams in arbitrarily complex ways, repartitioning the streams between each stage of the computation however needed. Read more in the tutorial.

Apache Storm是一个免费的开源分布式实时计算系统,使得处理无限数据流变得容易,实时处理就像Hadoop批处理一样。

- 阅读剩余部分 -

问题原因:

业务中有个批量操作出现了BUG,昨天搞了一个下午,代码本地没有问题。测试环境就是报错,SQL不正确。把测试环境的代码拉下来跑,还是没有问题。
今天突然想到了个数据库连接的问题,因为线上的配置文件会会覆盖掉本地的配置文件,本地文件中是开启了批量操作的。

解决方式

在数据库连接中后加入:

allowMultiQueries=true

例如:

jdbc:mysql://XXXX/project?serverTimezone=UTC&useUnicode=true&characterEncoding=utf8&allowMultiQueries=true

分析

有时间分析一下。

之前用springboot的时候,只知道捕获异常使用try{}catch,一个接口一个try{}catch,这也是大多数开发人员异常处理的常用方式,虽然屡试不爽,但会造成一个问题,就是一个Controller下面,满屏幕的try{}catch,看着一点都不优雅,憋了这么久,今天终于决定对所有异常实施统一处理的方案。

- 阅读剩余部分 -