You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "stack (JIRA)" <ji...@apache.org> on 2013/11/28 19:02:38 UTC

[jira] [Resolved] (HBASE-10056) region_status.rb not adopted to 0.96 api

     [ https://issues.apache.org/jira/browse/HBASE-10056?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

stack resolved HBASE-10056.
---------------------------

       Resolution: Fixed
    Fix Version/s: 0.96.2
                   0.98.0
     Hadoop Flags: Reviewed

Thank you Samir.  This is pretty bad.  Maybe enough to sink the RC I put up last night.  Committed to trunk and to 0.96.

> region_status.rb not adopted to 0.96 api
> ----------------------------------------
>
>                 Key: HBASE-10056
>                 URL: https://issues.apache.org/jira/browse/HBASE-10056
>             Project: HBase
>          Issue Type: Bug
>          Components: scripts
>         Environment: x86_64 GNU/Linux
>            Reporter: Samir Ahmic
>            Assignee: Samir Ahmic
>            Priority: Minor
>             Fix For: 0.98.0, 0.96.2
>
>         Attachments: HBASE-10056.patch
>
>
> When I tried to run this script agains 0.96 cluster i got this error:
> {code}
> $ hbase org.jruby.Main region_status.rb
> NameError: uninitialized constant IOException
>   const_missing at org/jruby/RubyModule.java:2647
>          (root) at region_status.rb:104
> {code}
> This line is causing issue:
> {code}
> table = HTable.new config, '.META.'.to_java_bytes
> {code}
> I belive this should be changed to:
> {code}
> table = HTable.new config, 'hbase:meta'.to_java_bytes
> {code}
> Second issue was caused by this line 
> {code}
> server_count = MetaScanner::allTableRegions(config,$tablename.to_java_bytes,false).size()
> {code}
> MetaScanner.allTablesRegion() is changed in 0.96 so i changed few lines in order to fix this:
> {code}
> if not $tablename.nil?
>  # Creating TableName object
>   $TableName = HTableDescriptor.new($tablename.to_java_bytes).getTableName()
> end
> while true
>   if $tablename.nil?
>     server_count = admin.getClusterStatus().getRegionsCount()
>   else
>     #Creating HConnection object
>     connection = HConnectionManager::getConnection(config);
>     server_count = MetaScanner::allTableRegions(config, connection, $TableName ,false).size()
>   end
>   print "Region Status: #{server_count} / #{meta_count}\n"
> {code}
> After this changes script is working against 0.96. Since i'm far away from expert in jruby  :D can someone review this fix ? I will attach patch. 



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