Duo Zhang created HBASE-27632:
---------------------------------

             Summary: Refactor WAL.Reader implementation so we can better 
support WAL splitting and replication
                 Key: HBASE-27632
                 URL: https://issues.apache.org/jira/browse/HBASE-27632
             Project: HBase
          Issue Type: Improvement
          Components: Replication, wal
            Reporter: Duo Zhang


WAL splitting and replication has completely different requirements on WAL 
reader, the latter one is much comlicated as it wants to tail a WAL file which 
is currently being written.
I think split them into two classes is better here.

But we exposes two configurations out

'hbase.regionserver.hlog.reader.impl'
'hbase.regionserver.hlog.writer.impl'

which indicates that we only have one implementation for wal reader.

These two configurations are inrtoduced in 0.96, for reading the pre 0.94 
sequence file format WAL file. And starting from 2.0.0, we have already dropped 
the support of reading sequence file format WAL file, so I think the 
configurations are useless now.
Now we stil require users to specify SecureProtobufLogReader and 
SecureProtobufLogWriter when enable WAL encryption, but actually they are both 
the only choice, so just use 'hbase.regionserver.wal.encryption' to determine 
whether we need to use SecureProtobufLogWriter to write WAL. And for reading, I 
do not think we should rely on the configuration, we should detect whether the 
WAL file itself is encrypted(I believe we have already done this in 
SecureProtobufLogReader.readHeader.

So in general, I prefer we just mark these two configurations deprecated and do 
not use them in our code base, so we can have different Reader implementations 
for WAL splitting and replication.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to