From 2f636a44dd4fd73817ecded9eac501d964bd35d8 Mon Sep 17 00:00:00 2001 From: Wei-Chiu Chuang Date: Tue, 23 Apr 2024 17:35:54 -0700 Subject: [PATCH 1/2] HBASE-28546 Make WAL rolling exception clear Change-Id: I842cc1028ab87f75a70db737f52a4b83b8586b3d --- .../hadoop/hbase/regionserver/wal/AsyncProtobufLogWriter.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncProtobufLogWriter.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncProtobufLogWriter.java index f10f39222722..96ab5fa67ba3 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncProtobufLogWriter.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncProtobufLogWriter.java @@ -205,9 +205,11 @@ private long writeWALMetadata(Consumer> action) throws I InterruptedIOException ioe = new InterruptedIOException(); ioe.initCause(e); throw ioe; - } catch (ExecutionException | TimeoutException e) { + } catch (ExecutionException e) { Throwables.propagateIfPossible(e.getCause(), IOException.class); throw new RuntimeException(e.getCause()); + } catch (TimeoutException e) { + throw new RuntimeException(e); } } From f93dedf01ac2b36d061fb49f0ead778aa2dd5f74 Mon Sep 17 00:00:00 2001 From: Wei-Chiu Chuang Date: Wed, 29 May 2024 16:30:15 -0700 Subject: [PATCH 2/2] Use TimeoutIOException instead Change-Id: I52dba1d32d81191c781b35d6d028aaeac90b7cce --- .../hadoop/hbase/regionserver/wal/AsyncProtobufLogWriter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncProtobufLogWriter.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncProtobufLogWriter.java index 96ab5fa67ba3..bb874a001d2f 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncProtobufLogWriter.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncProtobufLogWriter.java @@ -32,6 +32,7 @@ import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.HBaseConfiguration; +import org.apache.hadoop.hbase.exceptions.TimeoutIOException; import org.apache.hadoop.hbase.io.ByteBufferWriter; import org.apache.hadoop.hbase.io.asyncfs.AsyncFSOutput; import org.apache.hadoop.hbase.io.asyncfs.AsyncFSOutputHelper; @@ -209,7 +210,7 @@ private long writeWALMetadata(Consumer> action) throws I Throwables.propagateIfPossible(e.getCause(), IOException.class); throw new RuntimeException(e.getCause()); } catch (TimeoutException e) { - throw new RuntimeException(e); + throw new TimeoutIOException(e); } }