Skip to content

Commit

Permalink
fix(s3stream): update to 0.5.6 and fix serveless cmd (#730)
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Han <[email protected]>
  • Loading branch information
superhx authored Nov 25, 2023
1 parent fba58e9 commit f9bc266
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<guava.version>32.0.1-jre</guava.version>
<slf4j.version>2.0.9</slf4j.version>
<snakeyaml.version>2.2</snakeyaml.version>
<s3stream.version>0.5.5-SNAPSHOT</s3stream.version>
<s3stream.version>0.5.6-SNAPSHOT</s3stream.version>

<!-- Flat buffers related -->
<flatbuffers.version>23.5.26</flatbuffers.version>
Expand Down
2 changes: 1 addition & 1 deletion s3stream/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.automq.elasticstream</groupId>
<artifactId>s3stream</artifactId>
<version>0.5.5-SNAPSHOT</version>
<version>0.5.6-SNAPSHOT</version>
<properties>
<mockito-core.version>5.5.0</mockito-core.version>
<junit-jupiter.version>5.10.0</junit-jupiter.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,29 +33,29 @@ public class DefaultServerless implements Serverless {
@Override
public String attach(String volumeId, int nodeId) throws ExecutionException {
String[] cmd = new String[]{SERVERLESS_CMD, "volume", "attach", "-v", volumeId, "-n", Integer.toString(nodeId)};
CommandResult result = CommandUtils.run();
CommandResult result = CommandUtils.run(cmd);
check(cmd, result);
return jsonParse(result.stdout(), AttachResult.class).getDeviceName();
}

@Override
public void delete(String volumeId) throws ExecutionException {
String[] cmd = new String[]{SERVERLESS_CMD, "volume", "delete", "-v", volumeId};
CommandResult result = CommandUtils.run();
CommandResult result = CommandUtils.run(cmd);
check(cmd, result);
}

@Override
public void fence(String volumeId) throws ExecutionException {
String[] cmd = new String[]{SERVERLESS_CMD, "volume", "fence", "-v", volumeId};
CommandResult result = CommandUtils.run();
CommandResult result = CommandUtils.run(cmd);
check(cmd, result);
}

@Override
public List<FailedNode> scan() throws ExecutionException {
String[] cmd = new String[]{SERVERLESS_CMD, "volume", "query"};
CommandResult result = CommandUtils.run();
CommandResult result = CommandUtils.run(cmd);
check(cmd, result);
QueryFailedNode[] nodes = jsonParse(result.stdout(), QueryFailedNode[].class);
return Arrays.stream(nodes).map(n -> {
Expand Down

0 comments on commit f9bc266

Please sign in to comment.