[
https://issues.apache.org/jira/browse/HBASE-13014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14341561#comment-14341561
]
Ted Yu commented on HBASE-13014:
--------------------------------
{code}
56 public class RegionMover extends AbstractHBaseTool {
{code}
Please add annotation for audience.
{code}
571 * @return
572 * @throws Exception
573 */
574 private String stripServer(ArrayList<String> regionServers, String
hostname, int port)
{code}
{code}
596 * @return
597 * @throws IOException
598 */
599 private ArrayList<String> getServers(HBaseAdmin admin) throws
IOException {
{code}
Please fill out javadoc what return value means for above methods (there're
other methods where @return javadoc is incomplete).
{code}
if (splitServer[0].equals(hostname) &&
splitServer[1].equals(Integer.toString(port))) {
{code}
Integer.toString(port) can be assigned to a variable outside the while loop.
{code}
617 * Trys to scan a row from passed region
{code}
Typo: Trys
{code}
647 * Returns true if passed region is still on serverName when we look
at .META.
{code}
.META. -> hbase:meta
{code}
656 String serverForRegion = getServerNameForRegion(admin, region);
657 if (serverForRegion.equals(serverName)) {
{code}
If getServerNameForRegion() returns null, line 657 would produce NPE.
{code}
658 return true;
659 } else return false;
{code}
'else' keyword can be omitted. Move 'return false;' to next line.
Putting patch on reviewboard would make reviewing easier.
> Java Tool For Region Moving
> ----------------------------
>
> Key: HBASE-13014
> URL: https://issues.apache.org/jira/browse/HBASE-13014
> Project: HBase
> Issue Type: Improvement
> Reporter: Abhishek Singh Chouhan
> Assignee: Abhishek Singh Chouhan
> Attachments: HBASE-13014-v2.patch, HBASE-13014.patch
>
>
> As per discussion on HBASE-12989 we should move the functionality of
> region_mover.rb into a Java tool and use region_mover.rb only only as a
> wrapper around it.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)