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

Andy Isaacson commented on HDFS-4045:
-------------------------------------

Note for reviewers: I will add the missing javadoc.  Please review the 
architecture and refactoring in hdfs4045-4 and let me know if you'd like to see 
a different approach.  Also, there are a few open-coded constructs that I 
haven't yet found a relevant implementation for, specifically
{code}
+  @Override
+  public void writeRaw(FSEditLogOp op) throws IOException {
+    Checksum checksum = new PureJavaCrc32();
+    checksum.reset();
+    byte [] bytes = op.getRawBytes();
+    checksum.update(bytes, 0, bytes.length);
+    writeBytes(bytes);
+    byte [] b = new byte[4];
+    int sum = (int)checksum.getValue();
+    b[0] = (byte)((sum >> 24) & 0xff);
+    b[1] = (byte)((sum >> 16) & 0xff);
+    b[2] = (byte)((sum >> 8 ) & 0xff);
+    b[3] = (byte)((sum      ) & 0xff);
+    writeBytes(b);
+  }
{code}

                
> SecondaryNameNode cannot read from QuorumJournal URI
> ----------------------------------------------------
>
>                 Key: HDFS-4045
>                 URL: https://issues.apache.org/jira/browse/HDFS-4045
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 3.0.0
>            Reporter: Vinithra Varadharajan
>            Assignee: Andy Isaacson
>         Attachments: hdfs-4045-2.txt, hdfs4045-3.txt, hdfs4045-4.txt, 
> hdfs-4045.txt
>
>
> If HDFS is set up in basic mode (non-HA) with QuorumJournal, and the 
> dfs.namenode.edits.dir is set to only the QuorumJournal URI and no local dir, 
> the SecondaryNameNode is unable to do a checkpoint.

--
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

Reply via email to