HBASE-10968 Null check in TableSnapshotInputFormat#TableSnapshotRegionRecordReader#initialize() is redundant

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1586806 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Zhihong Yu 2014-04-12 01:54:47 +00:00
parent 51c7b82c74
commit 89b60b0374
1 changed files with 2 additions and 5 deletions

View File

@ -235,11 +235,9 @@ public class TableSnapshotInputFormat extends InputFormat<ImmutableBytesWritable
scan.setCacheBlocks(false); scan.setCacheBlocks(false);
scanner = new ClientSideRegionScanner(conf, fs, tmpRootDir, htd, hri, scan, null); scanner = new ClientSideRegionScanner(conf, fs, tmpRootDir, htd, hri, scan, null);
if (context != null) {
this.context = context; this.context = context;
getCounter = TableRecordReaderImpl.retrieveGetCounterWithStringsParams(context); getCounter = TableRecordReaderImpl.retrieveGetCounterWithStringsParams(context);
} }
}
@Override @Override
public boolean nextKeyValue() throws IOException, InterruptedException { public boolean nextKeyValue() throws IOException, InterruptedException {
@ -300,7 +298,6 @@ public class TableSnapshotInputFormat extends InputFormat<ImmutableBytesWritable
FileSystem fs = rootDir.getFileSystem(conf); FileSystem fs = rootDir.getFileSystem(conf);
Path snapshotDir = SnapshotDescriptionUtils.getCompletedSnapshotDir(snapshotName, rootDir); Path snapshotDir = SnapshotDescriptionUtils.getCompletedSnapshotDir(snapshotName, rootDir);
SnapshotDescription snapshotDesc = SnapshotDescriptionUtils.readSnapshotInfo(fs, snapshotDir);
Set<String> snapshotRegionNames Set<String> snapshotRegionNames
= SnapshotReferenceUtil.getSnapshotRegionNames(fs, snapshotDir); = SnapshotReferenceUtil.getSnapshotRegionNames(fs, snapshotDir);