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
Adding a fix/workaround when fs.append() unable to return a valid outputstream #388
Conversation
@@ -69,6 +69,18 @@ | |||
try { | |||
this.output = fs.append(path, bufferSize); | |||
} catch (RemoteException e) { | |||
if (e.getMessage().contains("not sufficiently replicated yet")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question : I see that RemoteException supports optional error-codes. Not sure if you see an error-code for this case. If you do see an error-code, can we use that to match instead of string matching ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. Thanks for the snapshot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we pull the err msg string into a final variable..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
@@ -69,6 +69,18 @@ | |||
try { | |||
this.output = fs.append(path, bufferSize); | |||
} catch (RemoteException e) { | |||
if (e.getMessage().contains("not sufficiently replicated yet")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. Thanks for the snapshot.
@@ -69,6 +69,18 @@ | |||
try { | |||
this.output = fs.append(path, bufferSize); | |||
} catch (RemoteException e) { | |||
if (e.getMessage().contains("not sufficiently replicated yet")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we pull the err msg string into a final variable..
b7c1822
to
219ed0f
Compare
@vinothchandar addressed your comment. |
219ed0f
to
88e3718
Compare
Depends on #387 to be merged first.
Added a fix to handle unable to append due to under-replicated issue. If such an issue is encountered, a new log file is created (rolled over)
@vinothchandar @bvaradar