[
https://issues.apache.org/jira/browse/OOZIE-2525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15415117#comment-15415117
]
abhishek bafna commented on OOZIE-2525:
---------------------------------------
As [~puru] mentioned above, SchemaCheckerService worker thread starts
immediately and before SchemaCheckerService instance is stored (put) into the
Services Map. Because of this race condition, NPE is happening.
We can add an initial delay of 5 second or something. We need to use the SEC
unit instead of HOUR. HOUR to SEC conversion needs to be done manually.
[~puru], [~rkanter] let me know what you guys think. Thanks.
> SchemaChecker fails with NPE
> ----------------------------
>
> Key: OOZIE-2525
> URL: https://issues.apache.org/jira/browse/OOZIE-2525
> Project: Oozie
> Issue Type: Bug
> Reporter: Purshotam Shah
>
> {code}
> 2016-05-03 14:38:03,851 WARN SchedulerService:523 [pool-1-thread-2] -
> SERVER[-] Error executing runnable [SchemaCheckerRunnable], null
> java.lang.NullPointerException
> at
> org.apache.oozie.service.SchemaCheckerService.access$002(SchemaCheckerService.java:29)
> at
> org.apache.oozie.service.SchemaCheckerService$SchemaCheckerRunnable.run(SchemaCheckerService.java:120)
> at
> org.apache.oozie.service.SchedulerService$2.run(SchedulerService.java:175)
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> {code}
> It;s trying to use SchemaCheckerService before it is initialized.
> {code:title=SchemaCheckerService.java}
> Services.get().get(SchemaCheckerService.class).status = "DISABLED (not leader
> in HA)";
> Services.get().get(SchemaCheckerService.class).lastCheck =
> "N/A";
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)