Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hadoop-ozone/integration-test/src/test/bin/start-chaos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

date=`date +"%m-%d-%y-%T"`
date=`date +"%Y-%m-%d--%H-%M-%S-%Z"`
fileformat=".MiniOzoneChaosCluster.log"
heapformat=".dump"
current="/tmp/"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,15 @@ private int getNodeToFail() {
}

private void failNodes() {
for (int i = 0; i < getNumberOfNodesToFail(); i++) {
final int numNodesToFail = getNumberOfNodesToFail();
LOG.info("Will restart {} nodes to simulate failure", numNodesToFail);
for (int i = 0; i < numNodesToFail; i++) {
boolean failureMode = isFastRestart();
int failedNodeIndex = getNodeToFail();
try {
LOG.info("Restarting DataNodeIndex {}", failedNodeIndex);
restartHddsDatanode(failedNodeIndex, failureMode);
LOG.info("Completed restarting DataNodeIndex {}", failedNodeIndex);
} catch (Exception e) {

}
Expand All @@ -118,7 +122,8 @@ private void fail() {
}

void startChaos(long initialDelay, long period, TimeUnit timeUnit) {
LOG.info("Starting Chaos with failure period:{} unit:{}", period, timeUnit);
LOG.info("Starting Chaos with failure period:{} unit:{} numDataNodes:{}",
period, timeUnit, numDatanodes);
scheduledFuture = executorService.scheduleAtFixedRate(this::fail,
initialDelay, period, timeUnit);
}
Expand Down