线程内建立关闭druid连接
This commit is contained in:
3
src/META-INF/MANIFEST.MF
Normal file
3
src/META-INF/MANIFEST.MF
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
Manifest-Version: 1.0
|
||||||
|
Main-Class: cn.mesalab.main.BaselineApplication
|
||||||
|
|
||||||
@@ -39,6 +39,8 @@ public class ReadHistoricalDruidData implements Callable<ArrayList<Map<String, O
|
|||||||
resultData.addAll(DruidData.readFromDruid(sql, stat));
|
resultData.addAll(DruidData.readFromDruid(sql, stat));
|
||||||
long end = System.currentTimeMillis();
|
long end = System.currentTimeMillis();
|
||||||
LOG.info(sql + "\n读取" + resultData.size() + "条数据,运行时间:" + (end - start));
|
LOG.info(sql + "\n读取" + resultData.size() + "条数据,运行时间:" + (end - start));
|
||||||
|
connection.close();
|
||||||
|
statement.close();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ baseline.kalman.r=4
|
|||||||
# FOR TEST
|
# FOR TEST
|
||||||
baseline.generate.batch.size=1000
|
baseline.generate.batch.size=1000
|
||||||
druid.read.batch.time.grad.hour=4
|
druid.read.batch.time.grad.hour=4
|
||||||
thread.max.num=20
|
thread.max.num=10
|
||||||
|
|
||||||
|
|
||||||
# http client配置
|
# http client配置
|
||||||
|
|||||||
Reference in New Issue
Block a user