diff --git a/pom.xml b/pom.xml index 74e2bb25f..b5fb6d359 100644 --- a/pom.xml +++ b/pom.xml @@ -53,7 +53,7 @@ 32.0.1-jre 2.0.9 2.2 - 0.6.1-SNAPSHOT + 0.6.2-SNAPSHOT 23.5.26 diff --git a/s3stream/pom.xml b/s3stream/pom.xml index 273055c87..90fcb2aec 100644 --- a/s3stream/pom.xml +++ b/s3stream/pom.xml @@ -22,7 +22,7 @@ 4.0.0 com.automq.elasticstream s3stream - 0.6.1-SNAPSHOT + 0.6.2-SNAPSHOT 5.5.0 5.10.0 diff --git a/s3stream/src/main/java/com/automq/stream/s3/failover/DefaultServerless.java b/s3stream/src/main/java/com/automq/stream/s3/failover/DefaultServerless.java index 1f1b595ad..86205a33e 100644 --- a/s3stream/src/main/java/com/automq/stream/s3/failover/DefaultServerless.java +++ b/s3stream/src/main/java/com/automq/stream/s3/failover/DefaultServerless.java @@ -67,7 +67,9 @@ public List scan() throws ExecutionException { } private static void check(String[] cmd, CommandResult rst) throws ExecutionException { - throw new ExecutionException("Run " + Arrays.toString(cmd) + ", code:" + rst.code() + " failed: " + rst.stderr(), null); + if (rst.code() != 0) { + throw new ExecutionException("Run " + Arrays.toString(cmd) + ", code:" + rst.code() + " failed: " + rst.stderr(), null); + } } private static T jsonParse(String raw, Class clazz) throws ExecutionException { @@ -75,7 +77,7 @@ private static T jsonParse(String raw, Class clazz) throws ExecutionExcep try { return mapper.readValue(raw, clazz); } catch (JsonProcessingException e) { - throw new ExecutionException(e); + throw new ExecutionException("json parse (" + raw + ") fail", e); } }