Open skyegecko opened 5 years ago
Hi @dutchgecko, apologies for the slow reply. https://github.com/mtth/hdfs/pull/80 introduced HA support, I'd like to understand why it doesn't work here. Are you emitting a single large request that spans both restarts?
If that's the case, it makes sense that the overall request fails when the second server restarts since the first server had already been tried for the same request. Supporting such long requests will require care, to avoid infinite loops. I'm inclined to think that such sequences of events are rare enough that retrying them transparently is not worth the added complexity.
Yes, in this case the request spanned both restarts (or almost: the request started while NN01 was down, NN02 went down during the request).
In this case the request is quite long because it is a streaming operation: files are streamed from HDFS, operations carried out on the stream, and the result streamed to a new file on HDFS.
I respect your decision if you regard this as WONTFIX due to complexity, however in my opinion the current behaviour is not as robust as the HA mechanisms used in other Hadoop tools (a Spark job running at the same time for example handled the double failover gracefully). I agree that rebooting both namenodes is a rare occurrence, however part of the appeal of a system like Hadoop is that it should always be "safe" to do so (or said another way, I had to deal with a grumpy sysadmin who wondered why he had to manually restart tasks that shouldn't have failed during the reboot he initiated 😉).
Hi,
It seems that HdfsCli doesn't cope well when a WebHDFS namenode that it is connected to shuts down even though an alternative node is available.
I don't have a minimal producer and my logging isn't 100% clear, but if I'm not mistaken the following happened during a run of an application I'm testing:
001
is in the process of restarting and unavailable. It successfully connects to the alternative node002
.001
has finished restarting. Node002
goes offline to restart.002
. It retries its connection to node002
. It does not attempt a new connection to node001
.Stacktrace from Python (names changed to protect the innocent):
Looking at issue #18 you rightly state that handling failovers is difficult. Is this something you're willing to look into? I can attempt to create a minimal producer or test case, but I'd rather not if you regard this issue as out of scope.
Many thanks!