hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tsz Wo (Nicholas), SZE (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-3347) FSEditLog should not writes long and short as UTF8 and should not use ArrayWritable for writing non-array items
Date Mon, 05 May 2008 23:41:58 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-3347?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12594400#action_12594400
] 

Tsz Wo (Nicholas), SZE commented on HADOOP-3347:
------------------------------------------------

{code}
  static UTF8 toLogLong(long timestamp) {
    return new UTF8(Long.toString(timestamp));
  }

void logRename(String src, String dst, long timestamp) {
    UTF8 info[] = new UTF8[] { 
      new UTF8(src),
      new UTF8(dst),
      FSEditLog.toLogLong(timestamp)};
    logEdit(OP_RENAME, new ArrayWritable(UTF8.class, info));
  }
{code}
For example, logRename converts timestamp from long to UTF8.  Then, it creates an ArrayWritable
to hold everything.  A better way would be using LongWritable and writing everything directly
without creating an ArrayWritable.


> FSEditLog should not writes long and short as UTF8 and should not use ArrayWritable for
writing non-array items
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-3347
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3347
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: dfs
>            Reporter: Tsz Wo (Nicholas), SZE
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message