BELUGA BEHR created HBASE-21492:
-----------------------------------
Summary: CellCodec Written To WAL Before It's Verified
Key: HBASE-21492
URL: https://issues.apache.org/jira/browse/HBASE-21492
Project: HBase
Issue Type: Improvement
Components: wal
Affects Versions: 2.0.2, 1.2.7
Reporter: BELUGA BEHR
The cell codec class name is written into the WAL file, but the cell codec
class is not actually verified to exist. Therefore, users can inadvertently
configure an invalid class name and it will be recorded into the WAL file. At
that point, the WAL file becomes unreadable and blocks processing of all other
WAL files.
{code:java|title=AbstractProtobufLogWriter.java}
private WALHeader buildWALHeader0(Configuration conf, WALHeader.Builder
builder) {
if (!builder.hasWriterClsName()) {
builder.setWriterClsName(getWriterClassName());
}
if (!builder.hasCellCodecClsName()) {
builder.setCellCodecClsName(WALCellCodec.getWALCellCodecClass(conf));
}
return builder.build();
}
{code}
https://github.com/apache/hbase/blob/025ddce868eb06b4072b5152c5ffae5a01e7ae30/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AbstractProtobufLogWriter.java#L78-L86
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)