HBASE-18679 Add a null check around the result of getCounters() in ITBLL
This commit is contained in:
parent
439191ece6
commit
2773510f12
|
@ -820,6 +820,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 ||
|
||||
|
@ -1315,7 +1320,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;
|
||||
}
|
||||
|
@ -1337,6 +1343,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);
|
||||
|
|
Loading…
Reference in New Issue