hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hadoop QA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-10407) String Format Exception
Date Sun, 26 Jan 2014 00:47:44 GMT

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

Hadoop QA commented on HBASE-10407:
-----------------------------------

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

    {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:red}-1 site{color}.  The patch appears to cause mvn site goal to fail.

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

Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/8518//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8518//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8518//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8518//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-client.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8518//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8518//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-protocol.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8518//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8518//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-examples.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8518//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-thrift.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8518//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/8518//console

This message is automatically generated.

> String Format Exception
> -----------------------
>
>                 Key: HBASE-10407
>                 URL: https://issues.apache.org/jira/browse/HBASE-10407
>             Project: HBase
>          Issue Type: Bug
>          Components: hadoop2
>    Affects Versions: 0.99.0
>            Reporter: Siwakorn Srisakaokul
>            Priority: Trivial
>         Attachments: hbase.patch, hbase.patch
>
>
> There is a bug in {{hbase/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/metrics2/lib/MetricMutableQuantiles.java:91/92}}.
 When the parameter {{name}} contains a %, it will cause a format exception by String.Format(...).
> *Here is a simple patch to fix it*
> {code:title=hbase.patch|borderStyle=solid}
> From 43a4b247f5ac69f57264b2c1b20dcca8205514c4 Mon Sep 17 00:00:00 2001
> From: Siwakorn Srisakaokul <sping128@gmail.com>
> Date: Wed, 22 Jan 2014 10:09:26 -0800
> Subject: [PATCH] Format Patch
> ---
>  .../org/apache/hadoop/metrics2/lib/MetricMutableQuantiles.java | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
> diff --git a/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/metrics2/lib/MetricMutableQuantiles.java
b/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/metrics2/lib/MetricMutableQuantiles.java
> index b01f88b..c399323 100644
> --- a/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/metrics2/lib/MetricMutableQuantiles.java
> +++ b/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/metrics2/lib/MetricMutableQuantiles.java
> @@ -82,14 +82,12 @@ public class MetricMutableQuantiles extends MutableMetric implements
MetricHisto
>          "Number of %s for %s with %ds interval", lsName, desc, interval));
>      // Construct the MetricsInfos for the quantiles, converting to percentiles
>      quantileInfos = new MetricsInfo[quantiles.length];
> -    String nameTemplate = ucName + "%dthPercentile" + interval + "sInterval"
> -        + uvName;
> -    String descTemplate = "%d percentile " + lvName + " with " + interval
> -        + " second interval for " + desc;
> +    String nameTemplate = "%s%dthPercentile%dsInterval%s";
> +    String descTemplate = "%d percentile %s with %d second interval for %s";
>      for (int i = 0; i < quantiles.length; i++) {
>        int percentile = (int) (100 * quantiles[i].quantile);
> -      quantileInfos[i] = info(String.format(nameTemplate, percentile),
> -          String.format(descTemplate, percentile));
> +      quantileInfos[i] = info(String.format(nameTemplate, ucName, percentile, interval,
uvName),
> +          String.format(descTemplate, percentile, lvName, interval, desc));
>      }
>  
>      estimator = new MetricSampleQuantiles(quantiles);
> -- 
> 1.8.5.2
> {code}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message