HBASE-11794 StripeStoreFlusher causes NullPointerException (jeongmin kim)
This commit is contained in:
parent
f69a1945c6
commit
368aee62af
|
@ -21,6 +21,7 @@ package org.apache.hadoop.hbase.regionserver;
|
||||||
import static org.apache.hadoop.hbase.regionserver.StripeStoreFileManager.OPEN_KEY;
|
import static org.apache.hadoop.hbase.regionserver.StripeStoreFileManager.OPEN_KEY;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
|
@ -54,7 +55,7 @@ public class StripeStoreFlusher extends StoreFlusher {
|
||||||
@Override
|
@Override
|
||||||
public List<Path> flushSnapshot(MemStoreSnapshot snapshot, long cacheFlushSeqNum,
|
public List<Path> flushSnapshot(MemStoreSnapshot snapshot, long cacheFlushSeqNum,
|
||||||
MonitoredTask status) throws IOException {
|
MonitoredTask status) throws IOException {
|
||||||
List<Path> result = null;
|
List<Path> result = new ArrayList<Path>();
|
||||||
int cellsCount = snapshot.getCellsCount();
|
int cellsCount = snapshot.getCellsCount();
|
||||||
if (cellsCount == 0) return result; // don't flush if there are no entries
|
if (cellsCount == 0) return result; // don't flush if there are no entries
|
||||||
|
|
||||||
|
@ -83,9 +84,6 @@ public class StripeStoreFlusher extends StoreFlusher {
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
if (!success && (mw != null)) {
|
if (!success && (mw != null)) {
|
||||||
if (result != null) {
|
|
||||||
result.clear();
|
|
||||||
}
|
|
||||||
for (Path leftoverFile : mw.abortWriters()) {
|
for (Path leftoverFile : mw.abortWriters()) {
|
||||||
try {
|
try {
|
||||||
store.getFileSystem().delete(leftoverFile, false);
|
store.getFileSystem().delete(leftoverFile, false);
|
||||||
|
|
Loading…
Reference in New Issue