hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jesse Yates (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-12428) region_mover.rb script is broken. If port is not specified there's a object nil exception
Date Thu, 06 Nov 2014 19:24:34 GMT

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

Jesse Yates commented on HBASE-12428:
-------------------------------------

bq. Isn't this (-maybe) a cleaner fix? Keep logic local to the method where it is needed.

No, stop it Lars. Its a smaller fix but not better. This script is called once from the outside
and has a single flow of execution. It already does the correct check for the hostname, but
doesn't check the port being set. That means you end up having the two null checks local to
the load/unload methods for a variable that should be script-global anyways. This way its
checked one place - think of it as setting up the defaults if user didn't provide overrides
- and never has to be worried about again.

But thanks for the +1 on the original. I'll be committing today, if thats ok with you boss.
:)

> region_mover.rb script is broken. If port is not specified there's a object nil exception
> -----------------------------------------------------------------------------------------
>
>                 Key: HBASE-12428
>                 URL: https://issues.apache.org/jira/browse/HBASE-12428
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.98.7
>            Reporter: Sameer Vaishampayan
>            Assignee: Sameer Vaishampayan
>              Labels: newbie, patch
>             Fix For: 0.98.7
>
>         Attachments: 12428-maybe-0.98.txt, HBASE-12428-0.98.7.patch
>
>
> TypeError: can't convert nil into String
>     getFilename at /home/user/hbase/bin/region_mover.rb:466
>   unloadRegions at /home/user/hbase/bin/region_mover.rb:327
>          (root) at /home/user/hbase/bin/region_mover.rb:515



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

Mime
View raw message