From 1b1af3034f47cd00bfa53b1726c4a910dff55a9c Mon Sep 17 00:00:00 2001 From: hylee Date: Tue, 30 Jul 2024 11:02:45 +0900 Subject: [PATCH] =?UTF-8?q?10=EB=A7=8C=EA=B1=B4=20=ED=95=9C=EB=B2=88?= =?UTF-8?q?=EC=97=90=20insert=20-=20=EA=B0=9C=EB=B0=9C=EC=84=9C=EB=B2=84?= =?UTF-8?q?=EC=97=90=EC=84=9C=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../let/mjo/addr/service/impl/AddrServiceImpl.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/itn/let/mjo/addr/service/impl/AddrServiceImpl.java b/src/main/java/itn/let/mjo/addr/service/impl/AddrServiceImpl.java index a100b8e3..597f7d14 100644 --- a/src/main/java/itn/let/mjo/addr/service/impl/AddrServiceImpl.java +++ b/src/main/java/itn/let/mjo/addr/service/impl/AddrServiceImpl.java @@ -65,8 +65,8 @@ public class AddrServiceImpl extends EgovAbstractServiceImpl implements AddrSer // private static final int MAX_ADDR_CNT = 500000; //임시 500만개 private static final int MAX_ADDR_CNT = 5000000; - private static final int BATCH_SIZE = 10000; - private static final int THREAD_COUNT = 3; +// private static final int BATCH_SIZE = 10000; +// private static final int THREAD_COUNT = 3; public List selectAddrList(AddrVO addrVO) throws Exception { @@ -479,7 +479,9 @@ public class AddrServiceImpl extends EgovAbstractServiceImpl implements AddrSer // 등록 // Batch insert // batchInsertAddrList(addrListVO); - batchInsertAddrListAsync(addrListVO); +// batchInsertAddrListAsync(addrListVO); + + addrDAO.insertAddrList(addrListVO); // addrDAO.insertAddrList(addrListVO); @@ -517,7 +519,7 @@ public class AddrServiceImpl extends EgovAbstractServiceImpl implements AddrSer } - private void batchInsertAddrListAsync(List addrListVO) throws InterruptedException { + /*private void batchInsertAddrListAsync(List addrListVO) throws InterruptedException { int totalSize = addrListVO.size(); int batchCount = (totalSize + BATCH_SIZE - 1) / BATCH_SIZE; ExecutorService executor = Executors.newFixedThreadPool(THREAD_COUNT); @@ -542,7 +544,7 @@ public class AddrServiceImpl extends EgovAbstractServiceImpl implements AddrSer executor.shutdown(); executor.awaitTermination(1, TimeUnit.HOURS); - } + }*/ public static boolean isValidPhoneNumber(String phoneNo) { if (phoneNo == null || phoneNo.isEmpty()) {