Skip to content
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

Merged
merged 1 commit into from May 9, 2018

Conversation

n3nash
Copy link
Contributor

@n3nash n3nash commented May 2, 2018

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

@@ -69,6 +69,18 @@
try {
this.output = fs.append(path, bufferSize);
} catch (RemoteException e) {
if (e.getMessage().contains("not sufficiently replicated yet")) {
Copy link
Contributor

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 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you take a look at the error-codes, they are generic. To give you an example I ran the case to show the error code generated :

screen shot 2018-05-02 at 2 59 59 pm

It's best to not rely on the generic error code.

Copy link
Contributor

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.

Copy link
Member

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..

Copy link
Contributor

@bvaradar bvaradar left a 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")) {
Copy link
Contributor

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")) {
Copy link
Member

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..

@n3nash
Copy link
Contributor Author

n3nash commented May 8, 2018

@vinothchandar addressed your comment.

@vinothchandar vinothchandar merged commit 75df72f into apache:master May 9, 2018
vinishjail97 pushed a commit to vinishjail97/hudi that referenced this pull request Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants