HBASE-2085 StringBuffer -> StringBuilder - conversion of references as necessary

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@894950 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2009-12-31 22:34:16 +00:00
parent 11d2b63d1c
commit 94464432f8
14 changed files with 16 additions and 14 deletions

View File

@ -276,6 +276,8 @@ Release 0.21.0 - Unreleased
HBASE-2083 [EC2] HDFS DataNode no longer required on master HBASE-2083 [EC2] HDFS DataNode no longer required on master
HBASE-2084 [EC2] JAVA_HOME handling broken HBASE-2084 [EC2] JAVA_HOME handling broken
HBASE-2036 Use Configuration instead of HBaseConfiguration (Enis Soztutar via Stack) HBASE-2036 Use Configuration instead of HBaseConfiguration (Enis Soztutar via Stack)
HBASE-2085 StringBuffer -> StringBuilder - conversion of references as necessary
(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

View File

@ -106,7 +106,7 @@ public class Client {
do { do {
cluster.lastHost = cluster.nodes.get(i); cluster.lastHost = cluster.nodes.get(i);
try { try {
StringBuffer sb = new StringBuffer(); StringBuilder sb = new StringBuilder();
sb.append("http://"); sb.append("http://");
sb.append(cluster.lastHost); sb.append(cluster.lastHost);
sb.append(path); sb.append(path);

View File

@ -81,7 +81,7 @@ public class TableRegionModel implements Serializable {
*/ */
@XmlAttribute @XmlAttribute
public String getName() { public String getName() {
StringBuffer sb = new StringBuffer(); StringBuilder sb = new StringBuilder();
sb.append(table); sb.append(table);
sb.append(','); sb.append(',');
sb.append(Bytes.toString(startKey)); sb.append(Bytes.toString(startKey));

View File

@ -487,7 +487,7 @@ public class HColumnDescriptor implements WritableComparable<HColumnDescriptor>
*/ */
@Override @Override
public String toString() { public String toString() {
StringBuffer s = new StringBuffer(); StringBuilder s = new StringBuilder();
s.append('{'); s.append('{');
s.append(HConstants.NAME); s.append(HConstants.NAME);
s.append(" => '"); s.append(" => '");

View File

@ -463,7 +463,7 @@ public class HTableDescriptor implements WritableComparable<HTableDescriptor> {
*/ */
@Override @Override
public String toString() { public String toString() {
StringBuffer s = new StringBuffer(); StringBuilder s = new StringBuilder();
s.append('{'); s.append('{');
s.append(HConstants.NAME); s.append(HConstants.NAME);
s.append(" => '"); s.append(" => '");

View File

@ -273,7 +273,7 @@ public class Delete implements Writable, Row, Comparable<Row> {
*/ */
@Override @Override
public String toString() { public String toString() {
StringBuffer sb = new StringBuffer(); StringBuilder sb = new StringBuilder();
sb.append("row="); sb.append("row=");
sb.append(Bytes.toString(this.row)); sb.append(Bytes.toString(this.row));
sb.append(", ts="); sb.append(", ts=");

View File

@ -276,7 +276,7 @@ public class Get implements Writable {
*/ */
@Override @Override
public String toString() { public String toString() {
StringBuffer sb = new StringBuffer(); StringBuilder sb = new StringBuilder();
sb.append("row="); sb.append("row=");
sb.append(Bytes.toString(this.row)); sb.append(Bytes.toString(this.row));
sb.append(", maxVersions="); sb.append(", maxVersions=");

View File

@ -404,7 +404,7 @@ public class Put implements HeapSize, Writable, Row, Comparable<Row> {
*/ */
@Override @Override
public String toString() { public String toString() {
StringBuffer sb = new StringBuffer(); StringBuilder sb = new StringBuilder();
sb.append("row="); sb.append("row=");
sb.append(Bytes.toString(this.row)); sb.append(Bytes.toString(this.row));
sb.append(", families={"); sb.append(", families={");

View File

@ -374,7 +374,7 @@ public class Result implements Writable {
*/ */
@Override @Override
public String toString() { public String toString() {
StringBuffer sb = new StringBuffer(); StringBuilder sb = new StringBuilder();
sb.append("keyvalues="); sb.append("keyvalues=");
if(isEmpty()) { if(isEmpty()) {
sb.append("NONE"); sb.append("NONE");

View File

@ -403,7 +403,7 @@ public class Scan implements Writable {
*/ */
@Override @Override
public String toString() { public String toString() {
StringBuffer sb = new StringBuffer(); StringBuilder sb = new StringBuilder();
sb.append("startRow="); sb.append("startRow=");
sb.append(Bytes.toString(this.startRow)); sb.append(Bytes.toString(this.startRow));
sb.append(", stopRow="); sb.append(", stopRow=");

View File

@ -204,7 +204,7 @@ implements WritableComparable<ImmutableBytesWritable> {
*/ */
@Override @Override
public String toString() { public String toString() {
StringBuffer sb = new StringBuffer(3*this.bytes.length); StringBuilder sb = new StringBuilder(3*this.bytes.length);
for (int idx = 0; idx < this.bytes.length; idx++) { for (int idx = 0; idx < this.bytes.length; idx++) {
// if not the first, put a blank separator in // if not the first, put a blank separator in
if (idx != 0) { if (idx != 0) {

View File

@ -149,7 +149,7 @@ public class TimeRange implements Writable {
@Override @Override
public String toString() { public String toString() {
StringBuffer sb = new StringBuffer(); StringBuilder sb = new StringBuilder();
sb.append("maxStamp="); sb.append("maxStamp=");
sb.append(this.maxStamp); sb.append(this.maxStamp);
sb.append(", minStamp="); sb.append(", minStamp=");

View File

@ -87,7 +87,7 @@ public class BuildTableIndex {
String iconfFile = null; String iconfFile = null;
String indexDir = null; String indexDir = null;
String tableName = null; String tableName = null;
StringBuffer columnNames = null; StringBuilder columnNames = null;
// parse args // parse args
for (int i = 0; i < args.length - 1; i++) { for (int i = 0; i < args.length - 1; i++) {
@ -100,7 +100,7 @@ public class BuildTableIndex {
} else if ("-table".equals(args[i])) { } else if ("-table".equals(args[i])) {
tableName = args[++i]; tableName = args[++i];
} else if ("-columns".equals(args[i])) { } else if ("-columns".equals(args[i])) {
columnNames = new StringBuffer(args[++i]); columnNames = new StringBuilder(args[++i]);
while (i + 1 < args.length && !args[i + 1].startsWith("-")) { while (i + 1 < args.length && !args[i + 1].startsWith("-")) {
columnNames.append(" "); columnNames.append(" ");
columnNames.append(args[++i]); columnNames.append(args[++i]);

View File

@ -131,7 +131,7 @@ public class DisabledBecauseVariableSubstTooLargeExceptionTestTableIndex extends
} }
private String createIndexConfContent() { private String createIndexConfContent() {
StringBuffer buffer = new StringBuffer(); StringBuilder buffer = new StringBuilder();
buffer.append("<configuration><column><property>" + buffer.append("<configuration><column><property>" +
"<name>hbase.column.name</name><value>" + Bytes.toString(INPUT_FAMILY) + "<name>hbase.column.name</name><value>" + Bytes.toString(INPUT_FAMILY) +
"</value></property>"); "</value></property>");