From 242e151f9daf9a03ffbeeb113d1e27d3f0752997 Mon Sep 17 00:00:00 2001 From: sjgllgh Date: Wed, 10 Jan 2024 17:24:14 +0800 Subject: [PATCH] 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);