HBASE-2140 findbugs issues - 2 performance warnings as suggested by findbugs
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@900208 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b2da74b0ac
commit
8bc2888278
|
@ -175,6 +175,8 @@ Release 0.21.0 - Unreleased
|
||||||
HBASE-2135 ant javadoc complains about missing classe (Kay Kay via Stack)
|
HBASE-2135 ant javadoc complains about missing classe (Kay Kay via Stack)
|
||||||
HBASE-2130 bin/* scripts - not to include lib/test/**/*.jar
|
HBASE-2130 bin/* scripts - not to include lib/test/**/*.jar
|
||||||
(Kay Kay via Stack)
|
(Kay Kay via Stack)
|
||||||
|
HBASE-2140 findbugs issues - 2 performance warnings as suggested by findbugs
|
||||||
|
(Kay Kay via Stack)
|
||||||
|
|
||||||
IMPROVEMENTS
|
IMPROVEMENTS
|
||||||
HBASE-1760 Cleanup TODOs in HTable
|
HBASE-1760 Cleanup TODOs in HTable
|
||||||
|
|
|
@ -136,8 +136,9 @@ public class Scan implements Writable {
|
||||||
TimeRange ctr = scan.getTimeRange();
|
TimeRange ctr = scan.getTimeRange();
|
||||||
tr = new TimeRange(ctr.getMin(), ctr.getMax());
|
tr = new TimeRange(ctr.getMin(), ctr.getMax());
|
||||||
Map<byte[], NavigableSet<byte[]>> fams = scan.getFamilyMap();
|
Map<byte[], NavigableSet<byte[]>> fams = scan.getFamilyMap();
|
||||||
for (byte[] fam : fams.keySet()) {
|
for (Map.Entry<byte[],NavigableSet<byte[]>> entry : fams.entrySet()) {
|
||||||
NavigableSet<byte[]> cols = fams.get(fam);
|
byte [] fam = entry.getKey();
|
||||||
|
NavigableSet<byte[]> cols = entry.getValue();
|
||||||
if (cols != null && cols.size() > 0) {
|
if (cols != null && cols.size() > 0) {
|
||||||
for (byte[] col : cols) {
|
for (byte[] col : cols) {
|
||||||
addColumn(fam, col);
|
addColumn(fam, col);
|
||||||
|
|
|
@ -446,11 +446,11 @@ public class FSUtils {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// compute percentage per table and store in result list
|
// 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)));
|
Math.round((float) cfFrag / cfCount * 100)));
|
||||||
}
|
}
|
||||||
// set overall percentage for all tables
|
// set overall percentage for all tables
|
||||||
frags.put("-TOTAL-", new Integer(
|
frags.put("-TOTAL-", Integer.valueOf(
|
||||||
Math.round((float) cfFragTotal / cfCountTotal * 100)));
|
Math.round((float) cfFragTotal / cfCountTotal * 100)));
|
||||||
return frags;
|
return frags;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue