Commit eb10d165 authored by Daniel Seybold's avatar Daniel Seybold

added retry command

parent f76cdb15
Pipeline #54769 passed with stage
in 10 minutes and 4 seconds
......@@ -169,9 +169,16 @@ public class RemoteCommand extends EvaluationTask {
LOGGER.debug(recordCountCommand);
channel2.setCommand(recordCountCommand);
channel2.connect();
String recordCountResult = CharStreams.toString(new InputStreamReader(output2));
channel2.disconnect();
int retryCounter = 3;
String recordCountResult = null;
while ( recordCountCommand == null || recordCountCommand.isEmpty() || retryCounter > 0){
channel2.connect();
recordCountResult = CharStreams.toString(new InputStreamReader(output2));
channel2.disconnect();
retryCounter--;
LOGGER.debug("Record count command returned empty result, retrying! Retry Counter is: " + retryCounter);
}
LOGGER.debug(this.loggerPrefix + "The remote recordCount command result is: " + recordCountResult);
......@@ -237,9 +244,8 @@ public class RemoteCommand extends EvaluationTask {
/**
* limited memory usage
*/
//String command = "sudo timeout 180 java -Xmx512m -jar cassandra-count -host " + host + " -keyspace ycsb -table usertable -splitSize " + splitSize + " -numSplits " + numOfSplits;
String command = "sudo timeout 180 java -Xmx512m -jar cassandra-count -host " + host + " -keyspace ycsb -table usertable -splitSize " + splitSize + " -numSplits " + numOfSplits;
String command = "echo 'test";
return command;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment