[
https://issues.apache.org/jira/browse/HBASE-12437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14213776#comment-14213776
]
Jerry He commented on HBASE-12437:
----------------------------------
This is from the SequenceFile doc:
{code}
SequenceFile Header
version - 3 bytes of magic header SEQ, followed by 1 byte of actual version
number (e.g. SEQ4 or SEQ6)
keyClassName -key class
valueClassName - value class
compression - A boolean which specifies if compression is turned on for
keys/values in this file.
blockCompression - A boolean which specifies if block-compression is turned
on for keys/values in this file.
compression codec - CompressionCodec class which is used for compression of
keys and/or values (if compression is enabled).
metadata - Metadata for this file.
sync - A sync marker to denote end of the header.
{code}
And we put additional info int he metadata part:
{code}
public class SequenceFileLogReader extends ReaderBase {
private static final Log LOG = LogFactory.getLog(SequenceFileLogReader.class);
// Legacy stuff from pre-PB WAL metadata.
private static final Text WAL_VERSION_KEY = new Text("version");
// Let the version be 1. Let absence of a version meta tag be old, version 0.
// Set this version '1' to be the version that introduces compression,
// the COMPRESSION_VERSION.
private static final int COMPRESSION_VERSION = 1;
{code}
> HLogFactory should be able to accept multiple custom WALReaders in case of
> failure to read WAL logs due to upgrade/migrate of hbase
> -----------------------------------------------------------------------------------------------------------------------------------
>
> Key: HBASE-12437
> URL: https://issues.apache.org/jira/browse/HBASE-12437
> Project: HBase
> Issue Type: Bug
> Components: wal
> Affects Versions: 0.96.0, 0.98.4
> Reporter: Enoch Hsu
> Assignee: Enoch Hsu
> Fix For: 1.0.0, 0.98.4
>
> Attachments: HBASE_12437.patch
>
>
> The HLogFactory createReader function allows the user to create their own
> reader and just assumes that the reader will work correctly.
> The default implementation checks between Protobuf and sequencefiles.
> However, the custom reader option does not account for any differences in the
> files.
> There should be an option or configuration to specify multiple custom readers
> in the case that an old custom reader was used for sequence files and and a
> custom reader is being used for protobuf instead of throwing an IPBRE
> The current HLogFactory does not allow me to fall back and handle upgraded
> file systems similar to the default case.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)