-
Notifications
You must be signed in to change notification settings - Fork 340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Datanode failover is not supported for writes #86
Comments
I saw many comments saying that the file write stream is not recoverable automatically. Will the fixing be scheduled in the near future? |
Currently, failover during writes is sketched out, but not implemented. See this comment: Lines 53 to 58 in cdda132
There's even a (skipped) test for it, here: Lines 78 to 101 in cdda132
Unfortunately, the process is extremely client-heavy, so it's very complex to implement. I'll leave this issue open to track it. To answer your question, you should indeed close the stream and start a new write. |
I think this package is the 'native' hdfs client package for golang and it will be very nice if you can add the failover recovery part. |
Hi, @colinmarc . I took your advice and use reopening to retry, but got the following error constantly:
the retry logic:
the GetHdfsClient() will get hdfs.Client and w.hdfsWriter is hdfs.FileWriter Can you help me on this? Thans a lot |
@colinmarc : is this issue fixed and still kept open or its yet to be fixed ? Still getting this error though. |
@colinmarc since this feature is not currently implemented, and seems relatively easy to implement the basic logic in my own application, I was hoping you could expand a little more on @kof02guy's question regarding closing the open file to retry.
Based on the BlockWriter comment, how would one "close the stream" in the most correct way? I would imagine calling Close on that current FileWriter would fail due to the same error that caused Write to fail. |
What is the correct way to retry when errors such as EOF or broken pipe is encountered when writing?
I saw the comment in the code that when a failure is encountered, the stream is not currently recoverable by itself? So should I Close this stream and invoke client.Append() to get a new one?
The text was updated successfully, but these errors were encountered: