HBASE-7400 ExportSnapshot mapper closes the FileSystem (Matteo Bertozzi)
git-svn-id: https://svn.apache.org/repos/asf/hbase/branches/hbase-7290@1445821 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
65d9c0d6d2
commit
1727ddc6c3
@ -127,25 +127,6 @@ public final class ExportSnapshot extends Configured implements Tool {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cleanup(Context context) {
|
||||
if (outputFs != null) {
|
||||
try {
|
||||
outputFs.close();
|
||||
} catch (IOException e) {
|
||||
LOG.error("Error closing output FileSystem", e);
|
||||
}
|
||||
}
|
||||
|
||||
if (inputFs != null) {
|
||||
try {
|
||||
inputFs.close();
|
||||
} catch (IOException e) {
|
||||
LOG.error("Error closing input FileSystem", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void map(Text key, NullWritable value, Context context)
|
||||
throws InterruptedException, IOException {
|
||||
@ -607,7 +588,7 @@ public final class ExportSnapshot extends Configured implements Tool {
|
||||
Configuration conf = getConf();
|
||||
Path inputRoot = FSUtils.getRootDir(conf);
|
||||
FileSystem inputFs = FileSystem.get(conf);
|
||||
FileSystem outputFs = FileSystem.get(outputRoot.toUri(), new Configuration());
|
||||
FileSystem outputFs = FileSystem.get(outputRoot.toUri(), conf);
|
||||
|
||||
Path snapshotDir = SnapshotDescriptionUtils.getCompletedSnapshotDir(snapshotName, inputRoot);
|
||||
Path snapshotTmpDir = SnapshotDescriptionUtils.getWorkingSnapshotDir(snapshotName, outputRoot);
|
||||
|
Loading…
x
Reference in New Issue
Block a user