You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by jm...@apache.org on 2013/02/13 19:40:48 UTC
svn commit: r1445821 -
/hbase/branches/hbase-7290/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java
Author: jmhsieh
Date: Wed Feb 13 18:40:47 2013
New Revision: 1445821
URL: http://svn.apache.org/r1445821
Log:
HBASE-7400 ExportSnapshot mapper closes the FileSystem (Matteo Bertozzi)
Modified:
hbase/branches/hbase-7290/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java
Modified: hbase/branches/hbase-7290/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java
URL: http://svn.apache.org/viewvc/hbase/branches/hbase-7290/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java?rev=1445821&r1=1445820&r2=1445821&view=diff
==============================================================================
--- hbase/branches/hbase-7290/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java (original)
+++ hbase/branches/hbase-7290/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java Wed Feb 13 18:40:47 2013
@@ -128,25 +128,6 @@ public final class ExportSnapshot extend
}
@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 {
Path inputPath = new Path(key.toString());
@@ -607,7 +588,7 @@ public final class ExportSnapshot extend
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);