[
https://issues.apache.org/jira/browse/HDDS-1370?focusedWorklogId=225710&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-225710
]
ASF GitHub Bot logged work on HDDS-1370:
----------------------------------------
Author: ASF GitHub Bot
Created on: 10/Apr/19 17:04
Start Date: 10/Apr/19 17:04
Worklog Time Spent: 10m
Work Description: arp7 commented on pull request #715: HDDS-1370. Command
Execution in Datanode fails becaue of NPE
URL: https://github.com/apache/hadoop/pull/715#discussion_r274065343
##########
File path:
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/states/datanode/RunningDatanodeState.java
##########
@@ -86,7 +86,16 @@ public void execute(ExecutorService executor) {
for (EndpointStateMachine endpoint : connectionManager.getValues()) {
Callable<EndpointStateMachine.EndPointStates> endpointTask
= getEndPointTask(endpoint);
- ecs.submit(endpointTask);
+ if (endpointTask != null) {
+ ecs.submit(endpointTask);
+ } else {
+ // This can happen if a task is taking more time than the timeOut
+ // specified for the task in await, and when it is completed the task
+ // has set the state to Shutdown, we may see the state as shutdown
+ // here. So, we need to Shutdown DatanodeStateMachine.
+ LOG.error("State is Shutdown in RunningDatanodeState");
+ context.setState(DatanodeStateMachine.DatanodeStates.SHUTDOWN);
Review comment:
I don't fully understand... unfortunately this existing stateContext logic
is 10x more complex than it needs to be.
However I think setting the state to SHUTDOWN should be safe so I will +1
the change.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 225710)
Time Spent: 1h (was: 50m)
> Command Execution in Datanode fails becaue of NPE
> -------------------------------------------------
>
> Key: HDDS-1370
> URL: https://issues.apache.org/jira/browse/HDDS-1370
> Project: Hadoop Distributed Data Store
> Issue Type: Bug
> Components: Ozone Datanode
> Affects Versions: 0.5.0
> Reporter: Mukul Kumar Singh
> Assignee: Bharat Viswanadham
> Priority: Major
> Labels: MiniOzoneChaosCluster, pull-request-available
> Time Spent: 1h
> Remaining Estimate: 0h
>
> The command execution on the datanode is failing with the following exception.
> {code}
> 2019-04-02 23:56:30,434 ERROR statemachine.DatanodeStateMachine
> (DatanodeStateMachine.java:start(196)) - Unable to finish the execution.
> java.lang.NullPointerException
> at
> java.util.concurrent.ExecutorCompletionService.submit(ExecutorCompletionService.java:179)
> at
> org.apache.hadoop.ozone.container.common.states.datanode.RunningDatanodeState.execute(RunningDatanodeState.java:89)
> at
> org.apache.hadoop.ozone.container.common.statemachine.StateContext.execute(StateContext.java:354)
> at
> org.apache.hadoop.ozone.container.common.statemachine.DatanodeStateMachine.start(DatanodeStateMachine.java:183)
> at
> org.apache.hadoop.ozone.container.common.statemachine.DatanodeStateMachine.lambda$startDaemon$0(DatanodeStateMachine.java:338)
> at java.lang.Thread.run(Thread.java:748)
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]