hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r900208 - in /hadoop/hbase/trunk: CHANGES.txt src/java/org/apache/hadoop/hbase/client/Scan.java src/java/org/apache/hadoop/hbase/util/FSUtils.java
Date Sun, 17 Jan 2010 20:09:00 GMT
Author: stack
Date: Sun Jan 17 20:08:59 2010
New Revision: 900208

URL: http://svn.apache.org/viewvc?rev=900208&view=rev
Log:
HBASE-2140 findbugs issues - 2 performance warnings as suggested by findbugs

Modified:
    hadoop/hbase/trunk/CHANGES.txt
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/Scan.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/util/FSUtils.java

Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=900208&r1=900207&r2=900208&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Sun Jan 17 20:08:59 2010
@@ -175,6 +175,8 @@
    HBASE-2135  ant javadoc complains about missing classe (Kay Kay via Stack)
    HBASE-2130  bin/* scripts - not to include lib/test/**/*.jar
                (Kay Kay via Stack)
+   HBASE-2140  findbugs issues - 2 performance warnings as suggested by findbugs
+               (Kay Kay via Stack)
 
   IMPROVEMENTS
    HBASE-1760  Cleanup TODOs in HTable

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/Scan.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/Scan.java?rev=900208&r1=900207&r2=900208&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/Scan.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/Scan.java Sun Jan 17 20:08:59
2010
@@ -136,8 +136,9 @@
     TimeRange ctr = scan.getTimeRange();
     tr = new TimeRange(ctr.getMin(), ctr.getMax());
     Map<byte[], NavigableSet<byte[]>> fams = scan.getFamilyMap();
-    for (byte[] fam : fams.keySet()) {
-      NavigableSet<byte[]> cols = fams.get(fam);
+    for (Map.Entry<byte[],NavigableSet<byte[]>> entry : fams.entrySet()) {
+      byte [] fam = entry.getKey();
+      NavigableSet<byte[]> cols = entry.getValue();
       if (cols != null && cols.size() > 0) {
         for (byte[] col : cols) {
           addColumn(fam, col);

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/util/FSUtils.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/util/FSUtils.java?rev=900208&r1=900207&r2=900208&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/util/FSUtils.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/util/FSUtils.java Sun Jan 17 20:08:59
2010
@@ -446,11 +446,11 @@
         }
       }
       // compute percentage per table and store in result list
-      frags.put(d.getName(), new Integer(
+      frags.put(d.getName(), Integer.valueOf(
         Math.round((float) cfFrag / cfCount * 100)));
     }
     // set overall percentage for all tables
-    frags.put("-TOTAL-", new Integer(
+    frags.put("-TOTAL-", Integer.valueOf(
       Math.round((float) cfFragTotal / cfCountTotal * 100)));
     return frags;
   }



Mime
View raw message