HBASE-19166 AsyncProtobufLogWriter persists ProtobufLogWriter as class name for backward compatibility

This commit is contained in:
tedyu 2018-02-21 13:04:59 -08:00
parent 5d994a24fc
commit bf5f034463
2 changed files with 17 additions and 0 deletions

View File

@ -108,6 +108,15 @@ public class AsyncProtobufLogWriter extends AbstractProtobufLogWriter
this.channelClass = channelClass;
}
/*
* @return class name which is recognized by hbase-1.x to avoid ProtobufLogReader throwing error:
* IOException: Got unknown writer class: AsyncProtobufLogWriter
*/
@Override
protected String getWriterClassName() {
return "ProtobufLogWriter";
}
@Override
public void append(Entry entry) {
int buffered = output.buffered();

View File

@ -38,6 +38,14 @@ public class SecureAsyncProtobufLogWriter extends AsyncProtobufLogWriter {
super(eventLoopGroup, channelClass);
}
/*
* @return class name which is recognized by hbase-1.x to avoid ProtobufLogReader throwing error:
* IOException: Got unknown writer class: SecureAsyncProtobufLogWriter
*/
@Override
protected String getWriterClassName() {
return "SecureProtobufLogWriter";
}
@Override
protected WALHeader buildWALHeader(Configuration conf, WALHeader.Builder builder)
throws IOException {