hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Purtell (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-11819) Unit test for CoprocessorHConnection
Date Sun, 30 Nov 2014 23:54:13 GMT

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

Andrew Purtell commented on HBASE-11819:
----------------------------------------

After 25 iterations it looks good.

Last round of feedback from me. Here:
{code}
+    public Result getOnCoprocessorHConnection(TableName tableName, byte[] key)
+        throws IOException {
+      conn = CoprocessorHConnection.getConnectionForEnvironment(env);
+      Table hTable = conn.getTable(tableName);
+      Get get = new Get(key);
+      Result result = hTable.get(get);
+      return result;
+    }
{code}
two issues:
# Why are we using a class field instead of a local variable ('conn')? Let's not.
# Add an assertion that the Connection returned by CoprocessorHConnection#getConnectionForEnvironment
is the expected type. A test for {{instanceof CoprocessorHConnection}} should evaluate to
{{true}}


> Unit test for CoprocessorHConnection 
> -------------------------------------
>
>                 Key: HBASE-11819
>                 URL: https://issues.apache.org/jira/browse/HBASE-11819
>             Project: HBase
>          Issue Type: Test
>            Reporter: Andrew Purtell
>            Assignee: Talat UYARER
>            Priority: Minor
>              Labels: newbie++
>             Fix For: 2.0.0, 0.98.9, 0.99.2
>
>         Attachments: HBASE-11819.patch, HBASE-11819v2.patch, HBASE-11819v3.patch, HBASE-11819v4-0.98.patch,
HBASE-11819v4-branch-1.patch, HBASE-11819v4-master.patch, HBASE-11819v4-master.patch
>
>
> Add a unit test to hbase-server that exercises CoprocessorHConnection . 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message