From bf17f55f4187baabcc7c91cb245428fcbb0d8eb9 Mon Sep 17 00:00:00 2001 From: hhb Date: Mon, 12 Aug 2024 15:57:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=A1=A8=E6=97=B6=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E6=8A=9B=E5=87=BA=E7=9A=84=E5=BC=82=E5=B8=B8=EF=BC=8C?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E6=98=AF=E6=95=B0=E6=8D=AE=E8=A1=A8=E4=B8=8D?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=EF=BC=8C=E5=88=99=E4=B8=8D=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Hadoop/ZKLT.Hadoop.API/docker-build.bat | 2 +- Hadoop/ZKLT.Hadoop/HadoopService.cs | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Hadoop/ZKLT.Hadoop.API/docker-build.bat b/Hadoop/ZKLT.Hadoop.API/docker-build.bat index c4a6f06..38627c6 100644 --- a/Hadoop/ZKLT.Hadoop.API/docker-build.bat +++ b/Hadoop/ZKLT.Hadoop.API/docker-build.bat @@ -1 +1 @@ -docker build -f ./Dockerfile -t hadoop:1.0.3 ../../. \ No newline at end of file +docker build -f ./Dockerfile -t hadoop:1.0.5 ../../. \ No newline at end of file diff --git a/Hadoop/ZKLT.Hadoop/HadoopService.cs b/Hadoop/ZKLT.Hadoop/HadoopService.cs index 3cde3c4..64152ea 100644 --- a/Hadoop/ZKLT.Hadoop/HadoopService.cs +++ b/Hadoop/ZKLT.Hadoop/HadoopService.cs @@ -166,10 +166,21 @@ namespace ZKLT.Hadoop /// 是否成功 public bool InsertTable(HDP_Table table) { - if (_TableService.GetTable(table.Id) != null) + try { - throw new ArgumentNullException("表编号已存在"); + if (_TableService.GetTable(table.Id) != null) + { + throw new ArgumentNullException("表编号已存在"); + } + } + catch (ArgumentNullException e) + { + if (!e.Message.Contains("数据表不存在")) + { + throw; + } } + if (_TableService.InitStruct("", table)) { using (TransactionScope _scope = new TransactionScope())