Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 532DE200B8F for ; Thu, 15 Sep 2016 21:33:12 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 51FF2160AC6; Thu, 15 Sep 2016 19:33:12 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 411A9160ADE for ; Thu, 15 Sep 2016 21:33:11 +0200 (CEST) Received: (qmail 93872 invoked by uid 500); 15 Sep 2016 19:33:10 -0000 Mailing-List: contact commits-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list commits@accumulo.apache.org Received: (qmail 93625 invoked by uid 99); 15 Sep 2016 19:33:10 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Sep 2016 19:33:10 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id EFD5FE053F; Thu, 15 Sep 2016 19:33:09 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ctubbsii@apache.org To: commits@accumulo.apache.org Date: Thu, 15 Sep 2016 19:33:12 -0000 Message-Id: <5619e190efe44ff2b0b6b2aff16a47c4@git.apache.org> In-Reply-To: <0918cbebcd2a4d4883da848c9ab98170@git.apache.org> References: <0918cbebcd2a4d4883da848c9ab98170@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [04/13] accumulo git commit: ACCUMULO-4459 Fix compile with hadoop 1 profile archived-at: Thu, 15 Sep 2016 19:33:12 -0000 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.8 Commit: 108f4f399e02638552cd8d655561abeed1765a0a Parents: 4c04079 Author: Christopher Tubbs Authored: Thu Sep 15 15:05:14 2016 -0400 Committer: Christopher Tubbs 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());