diff --git a/Hadoop/ZKLT.Hadoop.API/Program.cs b/Hadoop/ZKLT.Hadoop.API/Program.cs index 3d373ef..98637bc 100644 --- a/Hadoop/ZKLT.Hadoop.API/Program.cs +++ b/Hadoop/ZKLT.Hadoop.API/Program.cs @@ -40,34 +40,34 @@ namespace ZKLT.Hadoop.API app.UseCors("all"); #endregion - app.UseHadoop((c) => - { - c.Host = "127.0.0.1"; - c.Account = "root"; - c.PassWord = "root"; - c.Key = "devdb"; - c.Port = 3306; - }); - - //app.UseHadoop((c) => //{ - // c.Host = "172.17.0.1"; + // c.Host = "127.0.0.1"; // c.Account = "root"; // c.PassWord = "root"; - // c.Key = "testdb"; - // c.Port = 4000; + // c.Key = "devdb"; + // c.Port = 3306; //}); + //app.UseHadoop((c) => //{ - // c.Host = "118.195.165.218"; + // c.Host = "172.17.0.1"; // c.Account = "root"; // c.PassWord = "root"; // c.Key = "testdb"; // c.Port = 4000; //}); + app.UseHadoop((c) => + { + c.Host = "118.195.165.218"; + c.Account = "root"; + c.PassWord = "root"; + c.Key = "testdb"; + c.Port = 4000; + }); + // Configure the HTTP request pipeline. if (app.Environment.IsDevelopment()) { diff --git a/Hadoop/ZKLT.Hadoop/TableService.cs b/Hadoop/ZKLT.Hadoop/TableService.cs index 9c28e6f..0d3658a 100644 --- a/Hadoop/ZKLT.Hadoop/TableService.cs +++ b/Hadoop/ZKLT.Hadoop/TableService.cs @@ -319,7 +319,7 @@ namespace ZKLT.Hadoop for (var i = 0; i < table.Columns.Length; i++) { var _column = table.Columns[i]; - if (row.ContainsKey(_column.Key!)) + if (row.ContainsKey(_column.Key!) && row[_column.Key!] != null) { _colstr.Append($@"`{_column.Key!}`,"); _parmstr.Append($@"@{_column.Key},"); @@ -405,7 +405,7 @@ namespace ZKLT.Hadoop for (var i = 0; i < table.Columns.Length; i++) { var _column = table.Columns[i]; - if (row.ContainsKey(_column.Key!) && !where.ContainsKey(_column.Key!)) + if (row.ContainsKey(_column.Key!) && !where.ContainsKey(_column.Key!) && row[_column.Key!] != null) { _colstr.Append($@"`{_column.Key!}`=@{_column.Key!},"); _params.Add(_column.Key!, row[_column.Key!]);