[jira] [Commented] (HDFS-3488) BlockPoolSliceScanner#getNewBlockScanTime does not handle numbers 31 bits properly

2015-05-01 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-3488?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14524606#comment-14524606
 ] 

Hadoop QA commented on HDFS-3488:
-

\\
\\
| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:red}-1{color} | patch |   0m  0s | The patch command could not apply 
the patch during dryrun. |
\\
\\
|| Subsystem || Report/Notes ||
| Patch URL | 
http://issues.apache.org/jira/secure/attachment/12574374/HDFS-3488.001.patch |
| Optional Tests | javadoc javac unit findbugs checkstyle |
| git revision | trunk / f1a152c |
| Console output | 
https://builds.apache.org/job/PreCommit-HDFS-Build/10534/console |


This message was automatically generated.

 BlockPoolSliceScanner#getNewBlockScanTime does not handle numbers  31 bits 
 properly
 

 Key: HDFS-3488
 URL: https://issues.apache.org/jira/browse/HDFS-3488
 Project: Hadoop HDFS
  Issue Type: Bug
Reporter: Colin Patrick McCabe
Assignee: Colin Patrick McCabe
Priority: Minor
 Attachments: HDFS-3488.001.patch


 This code does not handle the case where period  2**31 properly:
 {code}
 long period = Math.min(scanPeriod, 
Math.max(blockMap.size(),1) * 600 * 1000L);
 int periodInt = Math.abs((int)period);
 return System.currentTimeMillis() - scanPeriod + 
 DFSUtil.getRandom().nextInt(periodInt);
 {code}
 So, for example, if period = 0x1, we'll map that to 0, and so forth.



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


[jira] [Commented] (HDFS-3488) BlockPoolSliceScanner#getNewBlockScanTime does not handle numbers 31 bits properly

2013-03-19 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/HDFS-3488?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13606701#comment-13606701
 ] 

Hadoop QA commented on HDFS-3488:
-

{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  http://issues.apache.org/jira/secure/attachment/12574374/HDFS-3488.001.patch
  against trunk revision .

{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 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 javadoc{color}.  The javadoc tool did not generate any 
warning messages.

{color:green}+1 eclipse:eclipse{color}.  The patch built with 
eclipse:eclipse.

{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 core tests{color}.  The patch passed unit tests in 
hadoop-hdfs-project/hadoop-hdfs.

{color:green}+1 contrib tests{color}.  The patch passed contrib unit tests.

Test results: 
https://builds.apache.org/job/PreCommit-HDFS-Build/4116//testReport/
Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/4116//console

This message is automatically generated.

 BlockPoolSliceScanner#getNewBlockScanTime does not handle numbers  31 bits 
 properly
 

 Key: HDFS-3488
 URL: https://issues.apache.org/jira/browse/HDFS-3488
 Project: Hadoop HDFS
  Issue Type: Bug
Reporter: Colin Patrick McCabe
Assignee: Colin Patrick McCabe
Priority: Minor
 Attachments: HDFS-3488.001.patch


 This code does not handle the case where period  2**31 properly:
 {code}
 long period = Math.min(scanPeriod, 
Math.max(blockMap.size(),1) * 600 * 1000L);
 int periodInt = Math.abs((int)period);
 return System.currentTimeMillis() - scanPeriod + 
 DFSUtil.getRandom().nextInt(periodInt);
 {code}
 So, for example, if period = 0x1, we'll map that to 0, and so forth.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira