Return-Path: X-Original-To: apmail-hbase-commits-archive@www.apache.org Delivered-To: apmail-hbase-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5754210817 for ; Thu, 3 Oct 2013 18:18:53 +0000 (UTC) Received: (qmail 71106 invoked by uid 500); 3 Oct 2013 18:18:52 -0000 Delivered-To: apmail-hbase-commits-archive@hbase.apache.org Received: (qmail 70316 invoked by uid 500); 3 Oct 2013 18:18:48 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 70303 invoked by uid 99); 3 Oct 2013 18:18:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Oct 2013 18:18:47 +0000 X-ASF-Spam-Status: No, hits=-1998.0 required=5.0 tests=ALL_TRUSTED,FB_GET_MEDS X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Oct 2013 18:18:44 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id C2669238883D; Thu, 3 Oct 2013 18:18:23 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1528956 - /hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java Date: Thu, 03 Oct 2013 18:18:23 -0000 To: commits@hbase.apache.org From: liyin@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20131003181823.C2669238883D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: liyin Date: Thu Oct 3 18:18:23 2013 New Revision: 1528956 URL: http://svn.apache.org/r1528956 Log: [HBASE-9703] Fix TestCompaction Author: manukranthk Summary: TestCompaction extends HBaseTestCase, but due to a change in HBaseTestCase TestCompaction was refereing to MiniDFSCluster variable which is no longer initialized. Reusing the MiniDFSCluster initialized by the HBaseTestCase fixes the test case. Test Plan: Run TestCompaction Reviewers: adela, aaiyer, rshroff Reviewed By: rshroff CC: hbase-eng@ Differential Revision: https://phabricator.fb.com/D993497 Task ID: 2966736 Modified: hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java Modified: hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java?rev=1528956&r1=1528955&r2=1528956&view=diff ============================================================================== --- hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java (original) +++ hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java Thu Oct 3 18:18:23 2013 @@ -101,8 +101,8 @@ public class TestCompaction extends HBas HLog hlog = r.getLog(); this.r.close(); hlog.closeAndDelete(); - if (this.cluster != null) { - shutdownDfs(cluster); + if (this.dfsCluster != null) { + shutdownDfs(dfsCluster); } super.tearDown(); } @@ -208,7 +208,7 @@ public class TestCompaction extends HBas for (String f : allStoreFiles) { Path filePath = new Path(f); - String checkSumAlgo = ((DistributedFileSystem)this.cluster.getFileSystem()). + String checkSumAlgo = ((DistributedFileSystem)this.dfsCluster.getFileSystem()). getFileChecksum(filePath).getAlgorithmName(); assertTrue(checkSumAlgo.contains("4096CRC32")); } @@ -541,7 +541,7 @@ public class TestCompaction extends HBas assertEquals(compactionThreshold, s.getStorefilesCount()); assertTrue(s.getStorefilesSize() > 15*1000); // and no new store files persisted past compactStores() - FileStatus[] ls = cluster.getFileSystem().listStatus(r.getTmpDir()); + FileStatus[] ls = dfsCluster.getFileSystem().listStatus(r.getTmpDir()); assertEquals(0, ls.length); } finally { @@ -612,7 +612,7 @@ public class TestCompaction extends HBas StoreFile.Writer compactedFile = store.compactStores(storeFiles, false, maxId); // Now lets corrupt the compacted file. - FileSystem fs = cluster.getFileSystem(); + FileSystem fs = dfsCluster.getFileSystem(); Path origPath = compactedFile.getPath(); Path homedir = store.getHomedir(); Path dstPath = new Path(homedir, origPath.getName());