Fixing Null pointer exception in finally block
This commit is contained in:
committed by
vinoth chandar
parent
88274b8261
commit
3746ace76a
@@ -296,7 +296,9 @@ public class HoodieMergeOnReadTable<T extends HoodieRecordPayload> extends
|
|||||||
"Failed to rollback for commit " + commit, io);
|
"Failed to rollback for commit " + commit, io);
|
||||||
} finally {
|
} finally {
|
||||||
try {
|
try {
|
||||||
|
if (writer != null) {
|
||||||
writer.close();
|
writer.close();
|
||||||
|
}
|
||||||
} catch (IOException io) {
|
} catch (IOException io) {
|
||||||
throw new UncheckedIOException(io);
|
throw new UncheckedIOException(io);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ public class HoodieLogFormatWriter implements HoodieLogFormat.Writer {
|
|||||||
try {
|
try {
|
||||||
this.output = fs.append(path, bufferSize);
|
this.output = fs.append(path, bufferSize);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
|
log.warn("Remote Exception, attempting to handle or recover lease", e);
|
||||||
handleAppendExceptionOrRecoverLease(path, e);
|
handleAppendExceptionOrRecoverLease(path, e);
|
||||||
} catch (IOException ioe) {
|
} catch (IOException ioe) {
|
||||||
if (ioe.getMessage().equalsIgnoreCase("Not supported")) {
|
if (ioe.getMessage().equalsIgnoreCase("Not supported")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user