|
@@ -24,10 +24,9 @@ import java.util.Arrays;
|
|
|
import org.apache.hadoop.hdfs.HdfsConfiguration;
|
|
|
import org.apache.hadoop.hdfs.protocolPB.JournalProtocolTranslatorPB;
|
|
|
import org.apache.hadoop.hdfs.server.common.Storage;
|
|
|
-import org.apache.hadoop.hdfs.server.protocol.JournalProtocol;
|
|
|
import org.apache.hadoop.hdfs.server.protocol.NamenodeRegistration;
|
|
|
import org.apache.hadoop.io.DataOutputBuffer;
|
|
|
-import org.apache.hadoop.ipc.RPC;
|
|
|
+import org.apache.hadoop.io.IOUtils;
|
|
|
import org.apache.hadoop.net.NetUtils;
|
|
|
|
|
|
/**
|
|
@@ -41,7 +40,7 @@ import org.apache.hadoop.net.NetUtils;
|
|
|
class EditLogBackupOutputStream extends EditLogOutputStream {
|
|
|
static int DEFAULT_BUFFER_SIZE = 256;
|
|
|
|
|
|
- private JournalProtocol backupNode; // RPC proxy to backup node
|
|
|
+ private JournalProtocolTranslatorPB backupNode; // RPC proxy to backup node
|
|
|
private NamenodeRegistration bnRegistration; // backup node registration
|
|
|
private NamenodeRegistration nnRegistration; // active node registration
|
|
|
private EditsDoubleBuffer doubleBuf;
|
|
@@ -105,14 +104,14 @@ class EditLogBackupOutputStream extends EditLogOutputStream {
|
|
|
throw new IOException("BackupEditStream has " + size +
|
|
|
" records still to be flushed and cannot be closed.");
|
|
|
}
|
|
|
- RPC.stopProxy(backupNode); // stop the RPC threads
|
|
|
+ IOUtils.cleanup(Storage.LOG, backupNode); // stop the RPC threads
|
|
|
doubleBuf.close();
|
|
|
doubleBuf = null;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void abort() throws IOException {
|
|
|
- RPC.stopProxy(backupNode);
|
|
|
+ IOUtils.cleanup(Storage.LOG, backupNode);
|
|
|
doubleBuf = null;
|
|
|
}
|
|
|
|