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

Enis Soztutar commented on HBASE-15903:
---------------------------------------

Looks good overall. 
bq. In patch v2, I enhanced ClientTest.PutGet with deleting the row just 
written and verifying that subsequent Get returns nothing.
Can you please separate that to a different test method for deletes 
specifically. 

- Also, can you please add a delete-test.cc similar to put-test.cc, 
get-test.cc, etc (to test Delete object, not end to end). 

- You can name this method toMutateRequest(). If not, name it 
DeleteToMutateRequest. 
{code}
+  static std::unique_ptr<Request> DelToMutateRequest(const Delete &del,const 
std::string &region_name);
{code}

- In the java side, we do not clear the family map inside addFamilyVersion() 
method: 
{code}
+Delete& Delete::AddFamilyVersion(const std::string& family, int64_t timestamp) 
{
+    const auto &it = family_map_.find(family);
+    if (family_map_.end() != it) {
+        it->second.clear();
{code}

- I know this comes from put.cc, but I'm not sure whether this is safe: 
{code}
+  family_map_[cell->Family()].push_back(std::move(cell));
{code} 
If the family is not initiated before, it will segfault? Can you please check. 

- These calls are not right: 
{code}
+    SetTimeStamp(timestamp);
{code}

- Can you also test all forms of delete (delete row, delete column, etc). 
- Can you please copy-paste the javadocs from the java side for the Delete 
object's methods. 
- There is Table::Delete(std::vector<Delete>) to be done after this and the 
multi-put patch. Let's create a jira so that we don't forget about it. 

> Delete Object
> -------------
>
>                 Key: HBASE-15903
>                 URL: https://issues.apache.org/jira/browse/HBASE-15903
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Sudeep Sunthankar
>            Assignee: Ted Yu
>         Attachments: 15903.v2.txt, 15903.v4.txt, 
> HBASE-15903.HBASE-14850.v1.patch
>
>
> Patch for creating Delete objects. These Delete objects are used by the Table 
> implementation to delete rowkey from a table.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to