This is an automated email from the ASF dual-hosted git repository.

peacewong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/linkis.git


The following commit(s) were added to refs/heads/master by this push:
     new e79b59d9d fix the HBase command reports an error, but the client 
returns success (#5065)
e79b59d9d is described below

commit e79b59d9d1c967a5c80a4eb9fe0e44584a4dadac
Author: LiuGuoHua <[email protected]>
AuthorDate: Tue Jan 16 21:50:17 2024 +0800

    fix the HBase command reports an error, but the client returns success 
(#5065)
    
    * Remove the EC lifespan restriction parameter.
    
    * If the command result contains "ERROR," the execution outcome is 
considered a failure.
    
    * To prevent the inclusion of the "ERROR" field in the query results, add 
an additional filtering condition
---
 .../linkis/manager/engineplugin/hbase/shell/HBaseShellSession.java     | 3 +++
 .../hbase/hbase-core/src/main/resources/linkis-engineconn.properties   | 2 +-
 2 files changed, 4 insertions(+), 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 a0aef5579..af61eab18 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 @@ public class HBaseShellSession implements ShellSession {
       if (StringUtils.isBlank(res) && o != null) {
         res = o.toString();
       }
+      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);
     } catch (Exception e) {
       return Result.failed(getStackTrace(e), e);
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 a3f4a74de..674d7be02 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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to