accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [06/13] accumulo git commit: ACCUMULO-4459 Fix compile with hadoop 1 profile
Date Thu, 15 Sep 2016 19:33:14 GMT
ACCUMULO-4459 Fix compile with hadoop 1 profile

* Avoid Hadoop 2-only FileSystem method
* Affects 1.6 versions only (1.7+ require Hadoop 2)


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/108f4f39
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/108f4f39
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/108f4f39

Branch: refs/heads/1.6
Commit: 108f4f399e02638552cd8d655561abeed1765a0a
Parents: 4c04079
Author: Christopher Tubbs <ctubbsii@apache.org>
Authored: Thu Sep 15 15:05:14 2016 -0400
Committer: Christopher Tubbs <ctubbsii@apache.org>
Committed: Thu Sep 15 15:05:14 2016 -0400

----------------------------------------------------------------------
 .../accumulo/core/file/rfile/MultiThreadedRFileTest.java      | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/108f4f39/core/src/test/java/org/apache/accumulo/core/file/rfile/MultiThreadedRFileTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/file/rfile/MultiThreadedRFileTest.java
b/core/src/test/java/org/apache/accumulo/core/file/rfile/MultiThreadedRFileTest.java
index a0efeed..d861d2a 100644
--- a/core/src/test/java/org/apache/accumulo/core/file/rfile/MultiThreadedRFileTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/file/rfile/MultiThreadedRFileTest.java
@@ -110,9 +110,8 @@ public class MultiThreadedRFileTest {
 
     public void close() throws IOException {
       if (rfile != null) {
-        FileSystem fs = FileSystem.newInstance(conf);
         Path path = new Path("file://" + rfile.toString());
-        fs.delete(path, false);
+        FileSystem.get(path.toUri(), conf).delete(path, false);
       }
     }
 
@@ -135,8 +134,8 @@ public class MultiThreadedRFileTest {
       if (rfile == null) {
         rfile = File.createTempFile("TestRFile", ".rf");
       }
-      FileSystem fs = FileSystem.newInstance(conf);
       Path path = new Path("file://" + rfile.toString());
+      FileSystem fs = FileSystem.get(path.toUri(), conf);
       dos = fs.create(path, true);
       CachableBlockFile.Writer _cbw = new CachableBlockFile.Writer(dos, "gz", conf, accumuloConfiguration);
       writer = new RFile.Writer(_cbw, 1000, 1000);
@@ -160,8 +159,8 @@ public class MultiThreadedRFileTest {
     }
 
     public void openReader() throws IOException {
-      FileSystem fs = FileSystem.newInstance(conf);
       Path path = new Path("file://" + rfile.toString());
+      FileSystem fs = FileSystem.get(path.toUri(), conf);
 
       // the caches used to obfuscate the multithreaded issues
       CachableBlockFile.Reader _cbr = new CachableBlockFile.Reader(fs, path, conf, null,
null, AccumuloConfiguration.getDefaultConfiguration());


Mime
View raw message