From 5fc6414658e0cabfd99b82e83da412979e7a3bb9 Mon Sep 17 00:00:00 2001 From: sjgllgh Date: Wed, 10 Jan 2024 17:22:43 +0800 Subject: [PATCH 1/3] Remove the EC lifespan restriction parameter. --- .../hbase-core/src/main/resources/linkis-engineconn.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linkis-engineconn-plugins/hbase/hbase-core/src/main/resources/linkis-engineconn.properties b/linkis-engineconn-plugins/hbase/hbase-core/src/main/resources/linkis-engineconn.properties index a3f4a74de3..674d7be02e 100644 --- a/linkis-engineconn-plugins/hbase/hbase-core/src/main/resources/linkis-engineconn.properties +++ b/linkis-engineconn-plugins/hbase/hbase-core/src/main/resources/linkis-engineconn.properties @@ -21,4 +21,4 @@ wds.linkis.engineconn.plugin.default.class=org.apache.linkis.manager.engineplugi #wds.linkis.engine.io.opts=" -Dfile.encoding=UTF-8 -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=49100 " wds.linkis.engineconn.support.parallelism=true wds.linkis.rpc.cache.expire.time=0 -wds.linkis.engineconn.max.free.time=0 \ No newline at end of file +#wds.linkis.engineconn.max.free.time=0 \ No newline at end of file From 242e151f9daf9a03ffbeeb113d1e27d3f0752997 Mon Sep 17 00:00:00 2001 From: sjgllgh Date: Wed, 10 Jan 2024 17:24:14 +0800 Subject: [PATCH 2/3] If the command result contains "ERROR," the execution outcome is considered a failure. --- .../manager/engineplugin/hbase/shell/HBaseShellSession.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linkis-engineconn-plugins/hbase/hbase-core/src/main/java/org/apache/linkis/manager/engineplugin/hbase/shell/HBaseShellSession.java b/linkis-engineconn-plugins/hbase/hbase-core/src/main/java/org/apache/linkis/manager/engineplugin/hbase/shell/HBaseShellSession.java index a0aef55797..7e45d9ee49 100644 --- a/linkis-engineconn-plugins/hbase/hbase-core/src/main/java/org/apache/linkis/manager/engineplugin/hbase/shell/HBaseShellSession.java +++ b/linkis-engineconn-plugins/hbase/hbase-core/src/main/java/org/apache/linkis/manager/engineplugin/hbase/shell/HBaseShellSession.java @@ -271,6 +271,9 @@ private Result executeCmd(String cmd) { if (StringUtils.isBlank(res) && o != null) { res = o.toString(); } + if (res.contains("ERROR: ")) { + return Result.failed(getStackTrace(new Throwable(new Exception(res))), new Exception(res)); + } return Result.ok(res); } catch (Exception e) { return Result.failed(getStackTrace(e), e); From 295f07e5a57f9525ab286abc7f0b74b1f4f144df Mon Sep 17 00:00:00 2001 From: sjgllgh Date: Wed, 10 Jan 2024 18:11:33 +0800 Subject: [PATCH 3/3] To prevent the inclusion of the "ERROR" field in the query results, add an additional filtering condition --- .../manager/engineplugin/hbase/shell/HBaseShellSession.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linkis-engineconn-plugins/hbase/hbase-core/src/main/java/org/apache/linkis/manager/engineplugin/hbase/shell/HBaseShellSession.java b/linkis-engineconn-plugins/hbase/hbase-core/src/main/java/org/apache/linkis/manager/engineplugin/hbase/shell/HBaseShellSession.java index 7e45d9ee49..af61eab186 100644 --- a/linkis-engineconn-plugins/hbase/hbase-core/src/main/java/org/apache/linkis/manager/engineplugin/hbase/shell/HBaseShellSession.java +++ b/linkis-engineconn-plugins/hbase/hbase-core/src/main/java/org/apache/linkis/manager/engineplugin/hbase/shell/HBaseShellSession.java @@ -271,7 +271,7 @@ private Result executeCmd(String cmd) { if (StringUtils.isBlank(res) && o != null) { res = o.toString(); } - if (res.contains("ERROR: ")) { + if (res.contains("ERROR: ") && res.contains("For usage try 'help")) { return Result.failed(getStackTrace(new Throwable(new Exception(res))), new Exception(res)); } return Result.ok(res);