Explorar o código

HADOOP-2558 fixes for build up on hudson
Part 5. Fix NPE in make multiregion.


git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@611005 13f79535-47bb-0310-9956-ffa450edef68

Michael Stack %!s(int64=17) %!d(string=hai) anos
pai
achega
35f71e313f

+ 1 - 1
src/contrib/hbase/CHANGES.txt

@@ -109,7 +109,7 @@ Trunk (unreleased changes)
                (Bryan Duxbury via Stack)
                (Bryan Duxbury via Stack)
    HADOOP-2530 Missing type in new hbase custom RPC serializer
    HADOOP-2530 Missing type in new hbase custom RPC serializer
    HADOOP-2490 Failure in nightly #346 (Added debugging of hudson failures).
    HADOOP-2490 Failure in nightly #346 (Added debugging of hudson failures).
-   HADOOP-2558 fixes for build up on hudson (part 1, part 2, part 3)
+   HADOOP-2558 fixes for build up on hudson (part 1, part 2, part 3, part 4)
    
    
   IMPROVEMENTS
   IMPROVEMENTS
    HADOOP-2401 Add convenience put method that takes writable
    HADOOP-2401 Add convenience put method that takes writable

+ 6 - 2
src/contrib/hbase/src/test/org/apache/hadoop/hbase/MultiRegionTable.java

@@ -306,8 +306,12 @@ public class MultiRegionTable extends HBaseTestCase {
    * @throws IOException
    * @throws IOException
    */
    */
   private static void compact(final MiniHBaseCluster cluster,
   private static void compact(final MiniHBaseCluster cluster,
-      final HRegionInfo r) throws IOException {
-    
+      final HRegionInfo r)
+  throws IOException {
+    if (r == null) {
+      LOG.debug("Passed region is null");
+      return;
+    }
     LOG.info("Starting compaction");
     LOG.info("Starting compaction");
     for (LocalHBaseCluster.RegionServerThread thread:
     for (LocalHBaseCluster.RegionServerThread thread:
         cluster.getRegionThreads()) {
         cluster.getRegionThreads()) {