Skip to content

Commit a0e2cac

Browse files
author
Steve Vaughan Jr
committed
Restore shutdown IOException
The signature for close() can't throw an exception for AutoCloseable, but the definition of shutdown() didn't have to change. Move the try-catch into close().
1 parent 3fee706 commit a0e2cac

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/MiniQJMHACluster.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,18 +185,19 @@ public MiniJournalCluster getJournalCluster() {
185185
return journalCluster;
186186
}
187187

188-
public void shutdown() {
188+
public void shutdown() throws IOException {
189189
cluster.shutdown();
190+
journalCluster.shutdown();
191+
}
192+
193+
@Override
194+
public void close() {
190195
try {
191-
journalCluster.shutdown();
196+
shutdown();
192197
} catch (IOException shutdownFailure) {
193198
LOG.warn("Exception while closing journal cluster", shutdownFailure);
194199
}
195-
}
196200

197-
@Override
198-
public void close() {
199-
shutdown();
200201
}
201202

202203
}

0 commit comments

Comments
 (0)