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

Tsuyoshi OZAWA commented on YARN-1239:
--------------------------------------

Thank you for updating a patch, Jian. These are my review comments:

1. DUMMY_VERSION_INFO and VERSION_INFO should be initialized as 1L, not 1. 

{code}
+  private final static long DUMMY_VERSION_INFO = -1;
{code}

{code}
+  protected final long VERSION_INFO = 1;
{code}

2. These code should pass long value.

{code}
+    int wrongVersion = 1234;
+    stateStoreHelper.writeVersion(wrongVersion);
{code}
{code}
+    int rightVersion = 1;
+    stateStoreHelper.writeVersion(rightVersion);
{code}

3. We can define strings of error messages as static final in RMStateStore to 
avoid duplicating defining these messages in test cases.

{code}
+      Assert.assertTrue(t.getMessage().contains(
+        "Loading an incompatible version of Resource Manager state"));
+    }
{code}

> Save version information in the state store
> -------------------------------------------
>
>                 Key: YARN-1239
>                 URL: https://issues.apache.org/jira/browse/YARN-1239
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: resourcemanager
>            Reporter: Bikas Saha
>            Assignee: Jian He
>         Attachments: YARN-1239.1.patch, YARN-1239.2.patch, YARN-1239.patch
>
>
> When creating root dir for the first time we should write version 1. If root 
> dir exists then we should check that the version in the state store matches 
> the version from config.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to