HBASE-2090 findbugs issues
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@895913 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9cacb67b69
commit
e2f7f90e00
|
@ -284,6 +284,7 @@ Release 0.21.0 - Unreleased
|
||||||
HBASE-2086 Job(configuration,String) deprecated (Kay Kay via Stack)
|
HBASE-2086 Job(configuration,String) deprecated (Kay Kay via Stack)
|
||||||
HBASE-1996 Configure scanner buffer in bytes instead of number of rows
|
HBASE-1996 Configure scanner buffer in bytes instead of number of rows
|
||||||
(Erik Rozendaal and Dave Latham via Stack)
|
(Erik Rozendaal and Dave Latham via Stack)
|
||||||
|
HBASE-2090 findbugs issues (Kay Kay via Stack)
|
||||||
|
|
||||||
NEW FEATURES
|
NEW FEATURES
|
||||||
HBASE-1901 "General" partitioner for "hbase-48" bulk (behind the api, write
|
HBASE-1901 "General" partitioner for "hbase-48" bulk (behind the api, write
|
||||||
|
|
|
@ -595,26 +595,26 @@ public class Scan implements Writable {
|
||||||
* @deprecated
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
public String getInputColumns() {
|
public String getInputColumns() {
|
||||||
String cols = "";
|
StringBuilder cols = new StringBuilder("");
|
||||||
for (Map.Entry<byte[], NavigableSet<byte[]>> e :
|
for (Map.Entry<byte[], NavigableSet<byte[]>> e :
|
||||||
familyMap.entrySet()) {
|
familyMap.entrySet()) {
|
||||||
byte[] fam = e.getKey();
|
byte[] fam = e.getKey();
|
||||||
if (cols.length() > 0) cols += " ";
|
if (cols.length() > 0) cols.append(" ");
|
||||||
NavigableSet<byte[]> quals = e.getValue();
|
NavigableSet<byte[]> quals = e.getValue();
|
||||||
// check if this family has qualifiers
|
// check if this family has qualifiers
|
||||||
if (quals != null && quals.size() > 0) {
|
if (quals != null && quals.size() > 0) {
|
||||||
String cs = "";
|
StringBuilder cs = new StringBuilder("");
|
||||||
for (byte[] qual : quals) {
|
for (byte[] qual : quals) {
|
||||||
if (cs.length() > 0) cs += " ";
|
if (cs.length() > 0) cs.append(" ");
|
||||||
// encode values to make parsing easier later
|
// encode values to make parsing easier later
|
||||||
cs += Bytes.toStringBinary(fam) + ":" + Bytes.toStringBinary(qual);
|
cs.append(Bytes.toStringBinary(fam) + ":" + Bytes.toStringBinary(qual));
|
||||||
}
|
}
|
||||||
cols += cs;
|
cols.append(cs);
|
||||||
} else {
|
} else {
|
||||||
// only add the family but with old style delimiter
|
// only add the family but with old style delimiter
|
||||||
cols += Bytes.toStringBinary(fam) + ":";
|
cols.append(Bytes.toStringBinary(fam) + ":");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return cols;
|
return cols.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -130,7 +130,7 @@ public class KeyValueHeap implements KeyValueScanner, InternalScanner {
|
||||||
return next(result, -1);
|
return next(result, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
private class KVScannerComparator implements Comparator<KeyValueScanner> {
|
private static class KVScannerComparator implements Comparator<KeyValueScanner> {
|
||||||
private KVComparator kvComparator;
|
private KVComparator kvComparator;
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
|
|
|
@ -3666,7 +3666,7 @@ public class Hbase {
|
||||||
public Object getFieldValue(int fieldID) {
|
public Object getFieldValue(int fieldID) {
|
||||||
switch (fieldID) {
|
switch (fieldID) {
|
||||||
case SUCCESS:
|
case SUCCESS:
|
||||||
return new Boolean(isSuccess());
|
return Boolean.valueOf(isSuccess());
|
||||||
|
|
||||||
case IO:
|
case IO:
|
||||||
return getIo();
|
return getIo();
|
||||||
|
|
|
@ -40,8 +40,8 @@ public class TestStoreReconstruction {
|
||||||
|
|
||||||
private Path dir;
|
private Path dir;
|
||||||
private MiniDFSCluster cluster;
|
private MiniDFSCluster cluster;
|
||||||
private final String TABLE = "testtable";
|
private static final String TABLE = "testtable";
|
||||||
private final int TOTAL_EDITS = 10000;
|
private static final int TOTAL_EDITS = 10000;
|
||||||
private HBaseConfiguration conf;
|
private HBaseConfiguration conf;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -34,7 +34,7 @@ import org.apache.hadoop.hbase.client.Scan;
|
||||||
import org.apache.hadoop.hbase.util.Bytes;
|
import org.apache.hadoop.hbase.util.Bytes;
|
||||||
|
|
||||||
public class TestStoreScanner extends TestCase {
|
public class TestStoreScanner extends TestCase {
|
||||||
private final String CF_STR = "cf";
|
private static final String CF_STR = "cf";
|
||||||
final byte [] CF = Bytes.toBytes(CF_STR);
|
final byte [] CF = Bytes.toBytes(CF_STR);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -21,7 +21,7 @@ import org.apache.hadoop.hdfs.MiniDFSCluster;
|
||||||
public class TestWideScanner extends HBaseTestCase {
|
public class TestWideScanner extends HBaseTestCase {
|
||||||
private final Log LOG = LogFactory.getLog(this.getClass());
|
private final Log LOG = LogFactory.getLog(this.getClass());
|
||||||
|
|
||||||
final int BATCH = 1000;
|
static final int BATCH = 1000;
|
||||||
|
|
||||||
private MiniDFSCluster cluster = null;
|
private MiniDFSCluster cluster = null;
|
||||||
private HRegion r;
|
private HRegion r;
|
||||||
|
|
|
@ -193,7 +193,7 @@ public class TestHLog extends HBaseTestCase implements HConstants {
|
||||||
public void testFindMemstoresWithEditsOlderThan() throws IOException {
|
public void testFindMemstoresWithEditsOlderThan() throws IOException {
|
||||||
Map<byte [], Long> regionsToSeqids = new HashMap<byte [], Long>();
|
Map<byte [], Long> regionsToSeqids = new HashMap<byte [], Long>();
|
||||||
for (int i = 0; i < 10; i++) {
|
for (int i = 0; i < 10; i++) {
|
||||||
Long l = new Long(i);
|
Long l = Long.valueOf(i);
|
||||||
regionsToSeqids.put(l.toString().getBytes(), l);
|
regionsToSeqids.put(l.toString().getBytes(), l);
|
||||||
}
|
}
|
||||||
byte [][] regions =
|
byte [][] regions =
|
||||||
|
|
Loading…
Reference in New Issue