hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From li...@apache.org
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 GMT
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());



Mime
View raw message