falcon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FALCON-1750) Null Pointer Exception while listening to Workflow Notifications
Date Fri, 29 Jan 2016 08:38:40 GMT

    [ https://issues.apache.org/jira/browse/FALCON-1750?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15123191#comment-15123191
] 

ASF GitHub Bot commented on FALCON-1750:
----------------------------------------

Github user sandeepSamudrala commented on a diff in the pull request:

    https://github.com/apache/falcon/pull/17#discussion_r51236461
  
    --- Diff: common/src/main/java/org/apache/falcon/workflow/WorkflowJobEndNotificationService.java
---
    @@ -152,48 +157,48 @@ public void notifyWait(WorkflowExecutionContext context) {
     
         // The method retrieves the conf from the cache if it is in cache.
         // Else, queries WF Engine to retrieve the conf of the workflow
    -    private void updateContextFromWFConf(WorkflowExecutionContext context) {
    -        try {
    -            Properties wfProps = contextMap.get(context.getWorkflowId());
    -            if (wfProps == null) {
    -                Entity entity = CONFIG_STORE.get(EntityType.valueOf(context.getEntityType()),
context.getEntityName());
    -                // Entity can be null in case of delete. Engine will generate notifications
for instance kills.
    -                // But, the entity would no longer be in the config store.
    -                if (entity == null) {
    -                    return;
    -                }
    -                for (String cluster : EntityUtil.getClustersDefinedInColos(entity)) {
    -                    try {
    -                        InstancesResult.Instance[] instances = WorkflowEngineFactory.getWorkflowEngine(entity)
    -                                .getJobDetails(cluster, context.getWorkflowId()).getInstances();
    -                        if (instances != null && instances.length > 0) {
    -                            wfProps = getWFProps(instances[0].getWfParams());
    -                            // Required by RetryService. But, is not part of conf.
    -                            wfProps.setProperty(WorkflowExecutionArgs.RUN_ID.getName(),
    -                                    Integer.toString(instances[0].getRunId()));
    -                        }
    -                    } catch (FalconException e) {
    -                        // Do Nothing. The workflow may not have been deployed on this
cluster.
    -                        continue;
    +    private boolean updateContextFromWFConf(WorkflowExecutionContext context) throws
FalconException {
    +        Properties wfProps = contextMap.get(context.getWorkflowId());
    +        if (wfProps == null) {
    +            Entity entity = null;
    +            try {
    +                entity = EntityUtil.getEntity(context.getEntityType(), context.getEntityName());
    +            } catch (EntityNotRegisteredException e) {
    +                // Entity no longer exists. No need to notify.
    +                LOG.debug("Entity {} of type {} doesn't exist in config store. Notification
Ignored.",
    +                        context.getEntityName(), context.getEntityType());
    +                contextMap.remove(context.getWorkflowId());
    +                return false;
    +            }
    +            for (String cluster : EntityUtil.getClustersDefinedInColos(entity)) {
    +                try {
    +                    InstancesResult.Instance[] instances = WorkflowEngineFactory.getWorkflowEngine(entity)
    +                            .getJobDetails(cluster, context.getWorkflowId()).getInstances();
    +                    if (instances != null && instances.length > 0) {
    +                        wfProps = getWFProps(instances[0].getWfParams());
    +                        // Required by RetryService. But, is not part of conf.
    +                        wfProps.setProperty(WorkflowExecutionArgs.RUN_ID.getName(),
    +                                Integer.toString(instances[0].getRunId()));
                         }
    -                    contextMap.put(context.getWorkflowId(), wfProps);
    +                } catch (FalconException e) {
    +                    // Do Nothing. The workflow may not have been deployed on this cluster.
    --- End diff --
    
    can this state not be caught?for if it was scheduled on this cluster easily? rather than
catching it as an exception?.



> Null Pointer Exception while listening to Workflow Notifications 
> -----------------------------------------------------------------
>
>                 Key: FALCON-1750
>                 URL: https://issues.apache.org/jira/browse/FALCON-1750
>             Project: Falcon
>          Issue Type: Bug
>          Components: general
>    Affects Versions: 0.8, 0.9
>            Reporter: Pragya Mittal
>            Assignee: Pallavi Rao
>             Fix For: 0.9
>
>
> The following stacktrace is there in server logs when falcon post-processing is enabled
:
> {noformat}
> 2016-01-14 15:20:31,728 INFO  - [ActiveMQ Session Task-82:] ~ Created context from Oozie
JMS message WorkflowExecutionContext{{workflowUser=pragya, entityType=PROCESS, entityName=processMerlinOozie,
workflowEndTime=1452764965085, contextType=WORKFLOW_JOB, operation=GENERATE, workflowId=0000816-160113111840703-oozie-oozi-W,
status=KILLED, workflowStartTime=1452764938610}} (JMSMessageConsumer:120)
> 2016-01-14 15:20:31,728 INFO  - [ActiveMQ Session Task-82:] ~ Logging in pragya (CurrentUser:65)
> 2016-01-14 15:20:31,728 DEBUG - [ActiveMQ Session Task-82:] ~ Sending workflow end notification
to listeners with context : WorkflowExecutionContext{{workflowUser=pragya, entityType=PROCESS,
entityName=processMerlinOozie, workflowEndTime=1452764965085, contextType=WORKFLOW_JOB, operation=GENERATE,
workflowId=0000816-160113111840703-oozie-oozi-W, status=KILLED, workflowStartTime=1452764938610}}
 (WorkflowJobEndNotificationService:230)
> 2016-01-14 15:20:31,728 ERROR - [ActiveMQ Session Task-82:] ~ Error in listener org.apache.falcon.handler.SLAMonitoringHandler
(WorkflowJobEndNotificationService:245)
> java.lang.NullPointerException
>         at org.apache.falcon.entity.v0.SchemaHelper.formatDateUTCToISO8601(SchemaHelper.java:64)
>         at org.apache.falcon.workflow.WorkflowExecutionContext.getNominalTimeAsISO8601(WorkflowExecutionContext.java:182)
>         at org.apache.falcon.workflow.WorkflowJobEndNotificationService.instrumentAlert(WorkflowJobEndNotificationService.java:281)
>         at org.apache.falcon.workflow.WorkflowJobEndNotificationService.notifyWorkflowEnd(WorkflowJobEndNotificationService.java:240)
>         at org.apache.falcon.workflow.WorkflowJobEndNotificationService.notifyFailure(WorkflowJobEndNotificationService.java:101)
>         at org.apache.falcon.messaging.JMSMessageConsumer.invokeListener(JMSMessageConsumer.java:215)
>         at org.apache.falcon.messaging.JMSMessageConsumer.onMessage(JMSMessageConsumer.java:121)
>         at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1393)
>         at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:131)
>         at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:202)
>         at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:133)
>         at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:48)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:745)
> 2016-01-14 15:20:31,729 ERROR - [ActiveMQ Session Task-82:] ~ Got Error in getting error
codes from actions: org.apache.falcon.FalconException: java.lang.NullPointerException (WorkflowExecutionContext:144)
> 2016-01-14 15:20:31,729 ERROR - [ActiveMQ Session Task-82:] ~ Error in listener org.apache.falcon.rerun.handler.RetryHandler
(WorkflowJobEndNotificationService:245)
> java.lang.NullPointerException
>         at org.apache.falcon.entity.v0.SchemaHelper.formatDateUTCToISO8601(SchemaHelper.java:64)
>         at org.apache.falcon.workflow.WorkflowExecutionContext.getNominalTimeAsISO8601(WorkflowExecutionContext.java:182)
>         at org.apache.falcon.rerun.handler.RetryHandler.onFailure(RetryHandler.java:113)
>         at org.apache.falcon.workflow.WorkflowJobEndNotificationService.notifyWorkflowEnd(WorkflowJobEndNotificationService.java:238)
>         at org.apache.falcon.workflow.WorkflowJobEndNotificationService.notifyFailure(WorkflowJobEndNotificationService.java:101)
>         at org.apache.falcon.messaging.JMSMessageConsumer.invokeListener(JMSMessageConsumer.java:215)
>         at org.apache.falcon.messaging.JMSMessageConsumer.onMessage(JMSMessageConsumer.java:121)
>         at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1393)
>         at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:131)
>         at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:202)
>         at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:133)
>         at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:48)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:745)
> 2016-01-14 15:20:31,729 ERROR - [ActiveMQ Session Task-82:] ~ Error in listener org.apache.falcon.rerun.handler.LateRerunHandler
(WorkflowJobEndNotificationService:245)
> java.lang.NullPointerException
>         at org.apache.falcon.entity.v0.SchemaHelper.formatDateUTCToISO8601(SchemaHelper.java:64)
>         at org.apache.falcon.workflow.WorkflowExecutionContext.getNominalTimeAsISO8601(WorkflowExecutionContext.java:182)
>         at org.apache.falcon.workflow.WorkflowJobEndNotificationService.instrumentAlert(WorkflowJobEndNotificationService.java:281)
>         at org.apache.falcon.workflow.WorkflowJobEndNotificationService.notifyWorkflowEnd(WorkflowJobEndNotificationService.java:240)
>         at org.apache.falcon.workflow.WorkflowJobEndNotificationService.notifyFailure(WorkflowJobEndNotificationService.java:101)
>         at org.apache.falcon.messaging.JMSMessageConsumer.invokeListener(JMSMessageConsumer.java:215)
>         at org.apache.falcon.messaging.JMSMessageConsumer.onMessage(JMSMessageConsumer.java:121)
>         at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1393)
>         at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:131)
>         at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:202)
>         at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:133)
>         at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:48)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:745)
> 2016-01-14 15:20:31,729 ERROR - [ActiveMQ Session Task-82:] ~ Error in listener org.apache.falcon.metadata.MetadataMappingService
(WorkflowJobEndNotificationService:245)
> java.lang.NullPointerException
>         at org.apache.falcon.entity.v0.SchemaHelper.formatDateUTCToISO8601(SchemaHelper.java:64)
>         at org.apache.falcon.workflow.WorkflowExecutionContext.getNominalTimeAsISO8601(WorkflowExecutionContext.java:182)
>         at org.apache.falcon.workflow.WorkflowJobEndNotificationService.instrumentAlert(WorkflowJobEndNotificationService.java:281)
>         at org.apache.falcon.workflow.WorkflowJobEndNotificationService.notifyWorkflowEnd(WorkflowJobEndNotificationService.java:240)
>         at org.apache.falcon.workflow.WorkflowJobEndNotificationService.notifyFailure(WorkflowJobEndNotificationService.java:101)
>         at org.apache.falcon.messaging.JMSMessageConsumer.invokeListener(JMSMessageConsumer.java:215)
>         at org.apache.falcon.messaging.JMSMessageConsumer.onMessage(JMSMessageConsumer.java:121)
>         at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1393)
>         at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:131)
>         at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:202)
>         at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:133)
>         at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:48)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:745)
> 2016-01-14 15:20:31,730 ERROR - [ActiveMQ Session Task-82:] ~ Error in listener org.apache.falcon.notification.service.impl.JobCompletionService
(WorkflowJobEndNotificationService:245)
> java.lang.NullPointerException
>         at org.apache.falcon.entity.v0.SchemaHelper.formatDateUTCToISO8601(SchemaHelper.java:64)
>         at org.apache.falcon.workflow.WorkflowExecutionContext.getNominalTimeAsISO8601(WorkflowExecutionContext.java:182)
>         at org.apache.falcon.notification.service.impl.JobCompletionService.constructCallbackID(JobCompletionService.java:171)
>         at org.apache.falcon.notification.service.impl.JobCompletionService.onEnd(JobCompletionService.java:150)
>         at org.apache.falcon.notification.service.impl.JobCompletionService.onFailure(JobCompletionService.java:131)
>         at org.apache.falcon.workflow.WorkflowJobEndNotificationService.notifyWorkflowEnd(WorkflowJobEndNotificationService.java:238)
>         at org.apache.falcon.workflow.WorkflowJobEndNotificationService.notifyFailure(WorkflowJobEndNotificationService.java:101)
>         at org.apache.falcon.messaging.JMSMessageConsumer.invokeListener(JMSMessageConsumer.java:215)
>         at org.apache.falcon.messaging.JMSMessageConsumer.onMessage(JMSMessageConsumer.java:121)
>         at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1393)
>         at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:131)
>         at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:202)
>         at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:133)
>         at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:48)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:745)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message