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

Josh Elser commented on HBASE-17851:
------------------------------------

Nice test overall, Vlad!
{code:java}
+    edit.add(new KeyValue(rowName, family, Bytes.toBytes("1"),
+        System.currentTimeMillis(), value));
+    long txid = log.append(info, getWalKeyImpl(System.currentTimeMillis(), 
scopes), edit, true);
+    log.sync(txid);
+
+    Thread.sleep(10); // make sure 2nd edit gets a later timestamp
+
+    edit = new WALEdit();
+    edit.add(new KeyValue(rowName, family, Bytes.toBytes("2"),
+        System.currentTimeMillis(), value));
+    txid = log.append(info, getWalKeyImpl(System.currentTimeMillis(), scopes), 
edit, true);{code}
Is using a "real" timestamp actually important here? Or could you just replace 
the {{System.currentTimeMillis()}} calls to be {{1}}, {{2}}, and {{3}} (or 
similar)?
{code:java}
+    //walfactory.shutdown(){code}
Nit: remove commented out code, please.

Otherwise, some trivial checkstyle and whitespace fixes. I think a v2 would be 
ready to go!

> [TEST]: WAL to HFile conversion phase MUST detect and handle missing WAL files
> ------------------------------------------------------------------------------
>
>                 Key: HBASE-17851
>                 URL: https://issues.apache.org/jira/browse/HBASE-17851
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Vladimir Rodionov
>            Assignee: Vladimir Rodionov
>            Priority: Major
>         Attachments: HBASE-17851-v1.patch
>
>
> The code is implemented - we need UT to verify correctness of a failure 
> handling algo.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to