update
This commit is contained in:
+2
-2
@@ -31,7 +31,7 @@ class BigdataCommunityBatch extends BaseBatch{
|
|||||||
|
|
||||||
public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(10)
|
public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(10)
|
||||||
|
|
||||||
def sqlInstance = Sql.newInstance("jdbc:postgresql://192.168.0.236:5432/postgres?stringtype=unspecified",
|
def sqlInstance = Sql.newInstance("jdbc:postgresql://192.168.0.236:5432/warehouse?stringtype=unspecified",
|
||||||
"postgres", "postgres", "org.postgresql.Driver")
|
"postgres", "postgres", "org.postgresql.Driver")
|
||||||
|
|
||||||
static main(args) {
|
static main(args) {
|
||||||
@@ -246,7 +246,7 @@ class BigdataCommunityBatch extends BaseBatch{
|
|||||||
}
|
}
|
||||||
|
|
||||||
println "start: "+new Date()
|
println "start: "+new Date()
|
||||||
def sql = "insert into warehouse.t0831_bigdata_community_gj_h values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"
|
def sql = "insert into base.t0831_bigdata_community_gj_h values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"
|
||||||
// def sql = "insert into base.t0831_bigdata_community_gj_h values "
|
// def sql = "insert into base.t0831_bigdata_community_gj_h values "
|
||||||
def index = 0
|
def index = 0
|
||||||
sqlInstance.withBatch(20000, sql){ ps->
|
sqlInstance.withBatch(20000, sql){ ps->
|
||||||
|
|||||||
Reference in New Issue
Block a user