[
https://issues.apache.org/jira/browse/HBASE-10564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13903921#comment-13903921
]
Hadoop QA commented on HBASE-10564:
-----------------------------------
{color:red}-1 overall{color}. Here are the results of testing the latest
attachment
http://issues.apache.org/jira/secure/attachment/12629491/HBASE-10564-trunk_v1.patch
against trunk revision .
ATTACHMENT ID: 12629491
{color:green}+1 @author{color}. The patch does not contain any @author
tags.
{color:red}-1 tests included{color}. The patch doesn't appear to include
any new or modified tests.
Please justify why no new tests are needed for this
patch.
Also please list what manual steps were performed to
verify this patch.
{color:green}+1 hadoop1.0{color}. The patch compiles against the hadoop
1.0 profile.
{color:green}+1 hadoop1.1{color}. The patch compiles against the hadoop
1.1 profile.
{color:green}+1 javadoc{color}. The javadoc tool did not generate any
warning messages.
{color:green}+1 javac{color}. The applied patch does not increase the
total number of javac compiler warnings.
{color:green}+1 findbugs{color}. The patch does not introduce any new
Findbugs (version 1.3.9) warnings.
{color:green}+1 release audit{color}. The applied patch does not increase
the total number of release audit warnings.
{color:green}+1 lineLengths{color}. The patch does not introduce lines
longer than 100
{color:green}+1 site{color}. The mvn site goal succeeds with this patch.
{color:green}+1 core tests{color}. The patch passed unit tests in .
Test results:
https://builds.apache.org/job/PreCommit-HBASE-Build/8732//testReport/
Findbugs warnings:
https://builds.apache.org/job/PreCommit-HBASE-Build/8732//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html
Findbugs warnings:
https://builds.apache.org/job/PreCommit-HBASE-Build/8732//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html
Findbugs warnings:
https://builds.apache.org/job/PreCommit-HBASE-Build/8732//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-client.html
Findbugs warnings:
https://builds.apache.org/job/PreCommit-HBASE-Build/8732//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html
Findbugs warnings:
https://builds.apache.org/job/PreCommit-HBASE-Build/8732//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-protocol.html
Findbugs warnings:
https://builds.apache.org/job/PreCommit-HBASE-Build/8732//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html
Findbugs warnings:
https://builds.apache.org/job/PreCommit-HBASE-Build/8732//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-examples.html
Findbugs warnings:
https://builds.apache.org/job/PreCommit-HBASE-Build/8732//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-thrift.html
Findbugs warnings:
https://builds.apache.org/job/PreCommit-HBASE-Build/8732//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
Console output:
https://builds.apache.org/job/PreCommit-HBASE-Build/8732//console
This message is automatically generated.
> HRegionServer.nextLong should be removed since it's not used anywhere, or
> should be used somewhere it meant to
> --------------------------------------------------------------------------------------------------------------
>
> Key: HBASE-10564
> URL: https://issues.apache.org/jira/browse/HBASE-10564
> Project: HBase
> Issue Type: Bug
> Components: regionserver
> Reporter: Feng Honghua
> Assignee: Feng Honghua
> Priority: Minor
> Attachments: HBASE-10564-trunk_v1.patch
>
>
> HRegionServer has its own nextLong method as below:
> {code}
> /**
> * Generate a random positive long number
> *
> * @return a random positive long number
> */
> protected long nextLong() {
> long n = rand.nextLong();
> if (n == 0) {
> return nextLong();
> }
> if (n < 0) {
> n = -n;
> }
> return n;
> }
> {code}
> # It's never called anywhere, if we can ensure it's really useless, it should
> be removed
> # Looks likely below should use *nextLong* rather than *rand.nextLong*(but
> not sure):
> {code}
> protected long addScanner(RegionScanner s, HRegion r) throws
> LeaseStillHeldException {
> long scannerId = -1;
> while (true) {
> scannerId = Math.abs(rand.nextLong() << 24) ^ startcode;
> String scannerName = String.valueOf(scannerId);
> RegionScannerHolder existing =
> scanners.putIfAbsent(scannerName, new RegionScannerHolder(s, r));
> if (existing == null) {
> this.leases.createLease(scannerName, this.scannerLeaseTimeoutPeriod,
> new ScannerListener(scannerName));
> break;
> }
> }
> return scannerId;
> }
> {code}
> # Its implemenation would be better if
> {code}
> if (n == 0) {
> return nextLong();
> }
> {code}
> is changed to below (with better readability and (possible) less call-stacks
> by removing recursion)
> {code}
> while (n == 0) {
> n = rand.nextLong();
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)