HBASE-7944 Replication leaks file reader resource & not reset currentNbOperations (Jeffrey Zhong)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1450901 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2e2d95af14
commit
76314737e3
|
@ -123,15 +123,20 @@ public class ReplicationHLogReaderManager {
|
|||
public void closeReader() throws IOException {
|
||||
if (this.reader != null) {
|
||||
this.reader.close();
|
||||
this.reader = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Tell the helper to reset internal state
|
||||
*/
|
||||
public void finishCurrentFile() {
|
||||
void finishCurrentFile() {
|
||||
this.position = 0;
|
||||
this.reader = null;
|
||||
try {
|
||||
this.closeReader();
|
||||
} catch (IOException e) {
|
||||
LOG.warn("Unable to close reader", e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -327,6 +327,7 @@ public class ReplicationSource extends Thread
|
|||
}
|
||||
|
||||
boolean gotIOE = false;
|
||||
currentNbOperations = 0;
|
||||
currentNbEntries = 0;
|
||||
currentSize = 0;
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue