diff --git a/CHANGES.txt b/CHANGES.txt index 4ac1e4cda99..dacf7df7fb2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -483,6 +483,9 @@ Release 0.21.0 - Unreleased HBASE-2928 Fault in logic in BinaryPrefixComparator leads to ArrayIndexOutOfBoundsException (pranav via jgray) HBASE-2924 TestLogRolling doesn't use the right HLog half the time + HBASE-2931 Do not throw RuntimeExceptions in RPC/HbaseObjectWritable + code, ensure we log and rethrow as IOE + (Karthik Ranganathan via Stack) IMPROVEMENTS HBASE-1760 Cleanup TODOs in HTable diff --git a/src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java b/src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java index 90e92680e85..20860d69959 100644 --- a/src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java +++ b/src/main/java/org/apache/hadoop/hbase/io/HbaseObjectWritable.java @@ -159,7 +159,6 @@ public class HbaseObjectWritable implements Writable, Configurable { addToMap(WritableByteArrayComparable.class, code++); addToMap(FirstKeyOnlyFilter.class, code++); addToMap(DependentColumnFilter.class, code++); - addToMap(ColumnPrefixFilter.class, code++); addToMap(Delete [].class, code++); @@ -172,6 +171,7 @@ public class HbaseObjectWritable implements Writable, Configurable { // List addToMap(List.class, code++); + addToMap(ColumnPrefixFilter.class, code++); } private Class declaredClass; @@ -450,13 +450,19 @@ public class HbaseObjectWritable implements Writable, Configurable { try { instanceClass = getClassByName(conf, className); } catch (ClassNotFoundException e) { - throw new RuntimeException("Can't find class " + className); + LOG.error("Can't find class " + className, e); + throw new IOException("Can't find class " + className, e); } } else { instanceClass = CODE_TO_CLASS.get(b); } Writable writable = WritableFactories.newInstance(instanceClass, conf); - writable.readFields(in); + try { + writable.readFields(in); + } catch (Exception e) { + LOG.error("Error in readFields", e); + throw new IOException("Error in readFields" , e); + } instance = writable; if (instanceClass == NullInstance.class) { // null declaredClass = ((NullInstance)instance).declaredClass;