hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stack (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-7414) Convert some HFile metadata to PB
Date Mon, 07 Jan 2013 21:46:16 GMT

    [ https://issues.apache.org/jira/browse/HBASE-7414?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13546303#comment-13546303
] 

stack commented on HBASE-7414:
------------------------------

On whether this patch breaks our being able to read hfiles written w/ non-pb fileinfo, we
have an old v1 hfile under src/test/resources.  It is used by TestHFileReaderV1.  In the test
we explicitly read the file trailer and at least verify we can read its version.  So, if this
test passes, we can have some faith we have not broke our being able to read hfiles w/ non-pb
trailers.  Just saying.

On the patch, the below name change could confuse.  In the past I have named pb generated
files the same as their POJO wrapper or user.  I thought I was being smart keeping stuff together.
 Then Elliott gave me a dirty look last year after spending an hour or more trying to figure
why something wasn't working only to find that he was confused by the fact that there was
a POJO ServerName and a pb ServerName and it took him a while to realize this.....

 // Map of name/values
-message FileInfoProto {
+message FileInfo {
   repeated BytesBytesPair mapEntry = 1;
 }
+
+// HFile file trailer
+message FileTrailer {

Why do the below version test?  All files would be written w/ pbs going forward?

{code}
+    if (majorVersion > 2 || (majorVersion == 2 && minorVersion >= PBUF_TRAILER_MINOR_VERSION))
{
+      serializeAsPB(baosDos);
+    } else {
+      serializeAsWritable(baosDos);
+    }
{code}

Else patch looks great.  This is a nice change.

                
> Convert some HFile metadata to PB
> ---------------------------------
>
>                 Key: HBASE-7414
>                 URL: https://issues.apache.org/jira/browse/HBASE-7414
>             Project: HBase
>          Issue Type: Task
>          Components: HFile
>            Reporter: stack
>            Assignee: Andrew Purtell
>            Priority: Critical
>             Fix For: 0.96.0
>
>         Attachments: 7414.patch, 7414.patch, 7414.patch
>
>
> See HBASE-7201
> Convertion should be in a manner that does not prevent our being able to read old style
hfiles with Writable metadata.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message