hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Stack (Jira)" <j...@apache.org>
Subject [jira] [Resolved] (HBASE-24486) Remove the unused method online in admin.rb
Date Tue, 02 Jun 2020 18:24:00 GMT

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

Michael Stack resolved HBASE-24486.
-----------------------------------
    Fix Version/s: 3.0.0-alpha-1
     Hadoop Flags: Reviewed
       Resolution: Fixed

Merged. Thanks for patch [~filtertip] and reviews, [~zghao] and [~claraxiong]

> Remove the unused method online in admin.rb
> -------------------------------------------
>
>                 Key: HBASE-24486
>                 URL: https://issues.apache.org/jira/browse/HBASE-24486
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Zheng Wang
>            Assignee: Zheng Wang
>            Priority: Minor
>             Fix For: 3.0.0-alpha-1
>
>
> Skiming the todo list, seems this method not used any more.
>  
> {code:java}
> # Enables/disables a region by name
> def online(region_name, on_off)
>   # Open meta table
>   meta = @connection.getTable(org.apache.hadoop.hbase.TableName::META_TABLE_NAME)
>   # Read region info
>   # FIXME: fail gracefully if can't find the region
>   region_bytes = region_name.to_java_bytes
>   g = org.apache.hadoop.hbase.client.Get.new(region_bytes)
>   g.addColumn(org.apache.hadoop.hbase.HConstants::CATALOG_FAMILY, org.apache.hadoop.hbase.HConstants::REGIONINFO_QUALIFIER)
>   hri_bytes = meta.get(g).value
>   # Change region status
>   hri = org.apache.hadoop.hbase.util.Writables.getWritable(hri_bytes, org.apache.hadoop.hbase.HRegionInfo.new)
>   hri.setOffline(on_off)
>   # Write it back
>   put = org.apache.hadoop.hbase.client.Put.new(region_bytes)
>   put.addColumn(org.apache.hadoop.hbase.HConstants::CATALOG_FAMILY,
>                 org.apache.hadoop.hbase.HConstants::REGIONINFO_QUALIFIER,
>                 org.apache.hadoop.hbase.util.Writables.getBytes(hri))
>   meta.put(put)
> end
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message