hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [5/7] hbase git commit: HBASE-18679 Add a null check around the result of getCounters() in ITBLL
Date Fri, 25 Aug 2017 23:14:52 GMT
HBASE-18679 Add a null check around the result of getCounters() in ITBLL


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/4ce79774
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/4ce79774
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/4ce79774

Branch: refs/heads/branch-1.3
Commit: 4ce79774a13450f8a2f44cc3c4e437371d80f0fb
Parents: 22e8f87
Author: Josh Elser <elserj@apache.org>
Authored: Thu Aug 24 17:52:13 2017 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Fri Aug 25 19:05:46 2017 -0400

----------------------------------------------------------------------
 .../hbase/test/IntegrationTestBigLinkedList.java       | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/4ce79774/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java
----------------------------------------------------------------------
diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java
b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java
index 4ab0a58..0e3b198 100644
--- a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java
+++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java
@@ -815,6 +815,11 @@ public class IntegrationTestBigLinkedList extends IntegrationTestBase
{
     public boolean verify() {
       try {
         Counters counters = job.getCounters();
+        if (counters == null) {
+          LOG.info("Counters object was null, Generator verification cannot be performed."
+              + " This is commonly a result of insufficient YARN configuration.");
+          return false;
+        }
 
         if (counters.findCounter(Counts.TERMINATING).getValue() > 0 ||
             counters.findCounter(Counts.UNDEFINED).getValue() > 0 ||
@@ -1306,7 +1311,8 @@ public class IntegrationTestBigLinkedList extends IntegrationTestBase
{
       if (success) {
         Counters counters = job.getCounters();
         if (null == counters) {
-          LOG.warn("Counters were null, cannot verify Job completion");
+          LOG.warn("Counters were null, cannot verify Job completion."
+              + " This is commonly a result of insufficient YARN configuration.");
           // We don't have access to the counters to know if we have "bad" counts
           return 0;
         }
@@ -1328,6 +1334,11 @@ public class IntegrationTestBigLinkedList extends IntegrationTestBase
{
       }
 
       Counters counters = job.getCounters();
+      if (counters == null) {
+        LOG.info("Counters object was null, write verification cannot be performed."
+              + " This is commonly a result of insufficient YARN configuration.");
+        return false;
+      }
 
       // Run through each check, even if we fail one early
       boolean success = verifyExpectedValues(expectedReferenced, counters);


Mime
View raw message