[NAS-2488] Wrong warning in HeritrixController.requestCrawlstart Created: 21/Jan/16 Updated: 02/Feb/16 Resolved: 27/Jan/16 |
|
Status: | Resolved |
Project: | NetarchiveSuite |
Component/s: | Heritrix 3 |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | Søren Vejrup Carlsen (Inactive) | Assignee: | Søren Vejrup Carlsen (Inactive) |
Resolution: | Fixed | ||
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Description |
The code if (jobResult.job.crawlControllerState.equals(CrawlControllerState.NASCENT)) { log.info("The H3 job {} in now in state CrawlControllerState.NASCENT", jobName); } else { log.warn("The job state is now {}. Should have been CrawlControllerState.NASCENT", jobResult.job.crawlControllerState); } results in spurious logentries like The job state is now NASCENT. Should have been CrawlControllerState.NASCENT The CrawlControllerState enum is defined https://github.com/netarchivesuite/heritrix3-wrapper/blob/master/src/main/java/org/netarchivesuite/heritrix3wrapper/Heritrix3Wrapper.java |
Comments |
Comment by Søren Vejrup Carlsen (Inactive) [ 02/Feb/16 ] |
After fix we now see this: 2016-02-02 15:32:13.510 INFO d.n.h.h.c.HeritrixController.requestCrawlStart - Job 7_1454423524341 built successfully 2016-02-02 15:32:13.598 INFO d.n.h.h.c.HeritrixController.requestCrawlStart - The H3 job 7_1454423524341 in now in state CrawlControllerState.NASCENT |
Comment by Søren Vejrup Carlsen (Inactive) [ 22/Jan/16 ] |
It seems that the jobResult.job.crawlControllerState. does not represent a CrawlControllerState enum, but rather a String representation So the change needed is this:
if (jobResult.job.crawlControllerState.equals(CrawlControllerState.NASCENT)
to jobResult.job.crawlControllerState.equalsIgnoreCase(CrawlControllerState.NASCENT.toString()) |