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

Toshihiro Suzuki commented on HBASE-20293:
------------------------------------------

{code:java}
/testptch/hbase/hbase-shell/src/main/ruby/hbase/table.rb:268:5: C: 
Metrics/AbcSize: Assignment Branch Condition size for _count_internal is too 
high. [28.05/15]
/testptch/hbase/hbase-shell/src/main/ruby/hbase/table.rb:432:5: C: 
Metrics/AbcSize: Assignment Branch Condition size for _hash_to_scan is too 
high. [89.6/15]
/testptch/hbase/hbase-shell/src/main/ruby/hbase/table.rb:513:5: C: 
Metrics/AbcSize: Assignment Branch Condition size for _scan_internal is too 
high. [47.39/15]
{code}
To fix too high AbcSize errors for _count_internal, _hash_to_scan and 
_scan_internal, we need to rewrite the methods. So I think we can ignore them 
here.

 
{code:java}
/testptch/hbase/hbase-shell/src/main/ruby/hbase/table.rb:728:30: C: 
Layout/DotPosition: Place the . on the next line, together with the method name.
/testptch/hbase/hbase-shell/src/main/ruby/hbase/table.rb:729:75: C: 
Layout/DotPosition: Place the . on the next line, together with the method name.
/testptch/hbase/hbase-shell/src/main/ruby/hbase/table.rb:730:70: C: 
Layout/DotPosition: Place the . on the next line, together with the method name.
{code}
I don't think we can fix these DotPosition errors, because if we fix them, the 
following error occurs:
{code:java}
[ERROR] testRunShellTests(org.apache.hadoop.hbase.client.TestShell)  Time 
elapsed: 0.726 s  <<< ERROR!
org.jruby.embed.EvalFailedException: 
(SyntaxError) 
/Users/tsuzuki/work/brfrn169/hbase/hbase-shell/src/main/ruby/hbase/table.rb:729:
 syntax error, unexpected tDOT

        .select { |s| RegionReplicaUtil.isDefaultReplica(s.getRegionInfo) }
        ^
        at 
org.apache.hadoop.hbase.client.TestShell.testRunShellTests(TestShell.java:36)
Caused by: org.jruby.exceptions.RaiseException: 
(SyntaxError) 
/Users/tsuzuki/work/brfrn169/hbase/hbase-shell/src/main/ruby/hbase/table.rb:729:
 syntax error, unexpected tDOT

        .select { |s| RegionReplicaUtil.isDefaultReplica(s.getRegionInfo) }
        ^
{code}

> get_splits returns duplicate split points when region replication is on
> -----------------------------------------------------------------------
>
>                 Key: HBASE-20293
>                 URL: https://issues.apache.org/jira/browse/HBASE-20293
>             Project: HBase
>          Issue Type: Bug
>          Components: shell
>            Reporter: Toshihiro Suzuki
>            Assignee: Toshihiro Suzuki
>            Priority: Minor
>         Attachments: HBASE-20293.branch-1.001.patch, 
> HBASE-20293.branch-1.002.patch, HBASE-20293.branch-1.003.patch, 
> HBASE-20293.branch-1.004.patch, HBASE-20293.master.001.patch, 
> HBASE-20293.master.002.patch, HBASE-20293.master.003.patch, 
> HBASE-20293.master.004.patch
>
>
> When region replication is on, get_splits returns duplicate split points like 
> the following:
> {code}
> hbase(main):001:0> create "test", "cf", {REGION_REPLICATION => 3}, SPLITS => 
> ["10"]
> Created table test
> Took 1.0975 seconds
> hbase(main):002:0> get_splits "test"
> Total number of splits = 4
> 10
> 10
> 10
> Took 0.0941 seconds
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to