배치사이즈 조정 BATCH_SIZE = 60000;
This commit is contained in:
parent
a776b1fff2
commit
a806de33b9
@ -59,7 +59,7 @@ public class AddrServiceImpl extends EgovAbstractServiceImpl implements AddrSer
|
|||||||
private static final String PHONE_REGEX = "^(01[016789]-?\\d{3,4}-?\\d{4})$";
|
private static final String PHONE_REGEX = "^(01[016789]-?\\d{3,4}-?\\d{4})$";
|
||||||
private static final Pattern PHONE_PATTERN = Pattern.compile(PHONE_REGEX);
|
private static final Pattern PHONE_PATTERN = Pattern.compile(PHONE_REGEX);
|
||||||
private static final Charset EUC_KR = Charset.forName("EUC-KR");
|
private static final Charset EUC_KR = Charset.forName("EUC-KR");
|
||||||
private static final int BATCH_SIZE = 100000;
|
private static final int BATCH_SIZE = 60000;
|
||||||
// private static final int MAX_ADDR_CNT = 500000;
|
// private static final int MAX_ADDR_CNT = 500000;
|
||||||
//임시 500만개
|
//임시 500만개
|
||||||
private static final int MAX_ADDR_CNT = 5000000;
|
private static final int MAX_ADDR_CNT = 5000000;
|
||||||
@ -469,26 +469,26 @@ public class AddrServiceImpl extends EgovAbstractServiceImpl implements AddrSer
|
|||||||
|
|
||||||
startTime = System.currentTimeMillis();
|
startTime = System.currentTimeMillis();
|
||||||
System.out.println("addrListVO.size() : "+ addrListVO.size());
|
System.out.println("addrListVO.size() : "+ addrListVO.size());
|
||||||
|
|
||||||
if(addrListVO.size() > 0) {
|
|
||||||
// 등록
|
|
||||||
// Batch insert
|
|
||||||
try {
|
|
||||||
batchInsertAddrList(addrListVO);
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
|
||||||
// TODO: handle exception
|
|
||||||
e.printStackTrace();
|
|
||||||
return new StatusResponse(
|
|
||||||
HttpStatus.BAD_REQUEST
|
|
||||||
, "배치오류"
|
|
||||||
, LocalDateTime.now()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
// addrDAO.insertAddrList(addrListVO);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
if(addrListVO.size() > 0) {
|
||||||
|
// 등록
|
||||||
|
// Batch insert
|
||||||
|
batchInsertAddrList(addrListVO);
|
||||||
|
|
||||||
|
// addrDAO.insertAddrList(addrListVO);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
// TODO: handle exception
|
||||||
|
e.printStackTrace();
|
||||||
|
return new StatusResponse(
|
||||||
|
HttpStatus.BAD_REQUEST
|
||||||
|
, "배치오류"
|
||||||
|
, LocalDateTime.now()
|
||||||
|
);
|
||||||
|
}
|
||||||
endTime = System.currentTimeMillis();
|
endTime = System.currentTimeMillis();
|
||||||
executionTime = (endTime - startTime) / 1000.0;
|
executionTime = (endTime - startTime) / 1000.0;
|
||||||
System.out.println("INSERT Execution time: " + executionTime + " seconds");
|
System.out.println("INSERT Execution time: " + executionTime + " seconds");
|
||||||
|
|||||||
@ -478,9 +478,6 @@ function setSenderList_advc(){
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function (e) {
|
error: function (e) {
|
||||||
//로딩창 hide
|
|
||||||
$('.loading_layer').removeClass('active');
|
|
||||||
|
|
||||||
alert("저장에 실패하였습니다.");
|
alert("저장에 실패하였습니다.");
|
||||||
alert("ERROR : " + JSON.stringify(e));
|
alert("ERROR : " + JSON.stringify(e));
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user