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

Ted Yu commented on HBASE-13358:
--------------------------------

Proposed addendum to fix broken Shell tests:
{code}
diff --git a/hbase-shell/src/main/ruby/hbase/visibility_labels.rb 
b/hbase-shell/src/main/ruby/hbase/visibility_labels.rb
index a3f8b1a..b715521 100644
--- a/hbase-shell/src/main/ruby/hbase/visibility_labels.rb
+++ b/hbase-shell/src/main/ruby/hbase/visibility_labels.rb
@@ -45,7 +45,8 @@ module Hbase
       end

       begin
-        response = VisibilityClient.addLabels(@config, labels.to_java(:string))
+        connection = @admin.getConnection()
+        response = VisibilityClient.addLabels(connection, 
labels.to_java(:string))
         if response.nil?
           raise(ArgumentError, "DISABLED: Visibility labels feature is not 
available")
         end
@@ -70,7 +71,8 @@ module Hbase
       end

       begin
-        response = VisibilityClient.setAuths(@config, auths.to_java(:string), 
user)
+        connection = @admin.getConnection()
+        response = VisibilityClient.setAuths(connection, 
auths.to_java(:string), user)
         if response.nil?
           raise(ArgumentError, "DISABLED: Visibility labels feature is not 
available")
         end
@@ -90,7 +92,8 @@ module Hbase
     def get_auths(user)
       lables_table_available?
       begin
-        response = VisibilityClient.getAuths(@config, user)
+        connection = @admin.getConnection()
+        response = VisibilityClient.getAuths(connection, user)
         if response.nil?
           raise(ArgumentError, "DISABLED: Visibility labels feature is not 
available")
         end
{code}

> Upgrade VisibilityClient API to accept Connection object.
> ---------------------------------------------------------
>
>                 Key: HBASE-13358
>                 URL: https://issues.apache.org/jira/browse/HBASE-13358
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Srikanth Srungarapu
>            Assignee: Matt Warhaftig
>            Priority: Minor
>             Fix For: 2.0.0, 1.2.0
>
>         Attachments: HBASE-13358-1.2_v5.patch, HBASE-13358-master_v5.patch, 
> HBASE-13358.patch, HBASE-13358_v2.patch, HBASE-13358_v3.patch, 
> HBASE-13358_v4.patch
>
>
> From VisibilityClient class:
> {code}
>   // TODO: Make it so caller passes in a Connection rather than have us do 
> this expensive
>     // setup each time.  This class only used in test and shell at moment 
> though.
> {code}
> Basically, this is the VC's counterpart of HBASE-13171. 



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

Reply via email to