MCPcopy Index your code
hub / github.com/OpenTSDB/asynchbase / toString

Method toString

src/HBaseRpc.java:728–753  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

726 }
727
728 public String toString() {
729 // Try to rightsize the buffer.
730 final String method = new String(this.method((byte) 0));
731 final StringBuilder buf = new StringBuilder(16 + method.length() + 2
732 + 8 + (table == null ? 4 : table.length + 2) // Assumption: ASCII => +2
733 + 6 + (key == null ? 4 : key.length * 2) // Assumption: binary => *2
734 + 9 + (region == null ? 4 : region.stringSizeHint())
735 + 10 + 1 + 1);
736 buf.append("HBaseRpc(method=");
737 buf.append(method);
738 buf.append(", table=");
739 Bytes.pretty(buf, table);
740 buf.append(", key=");
741 Bytes.pretty(buf, key);
742 buf.append(", region=");
743 if (region == null) {
744 buf.append("null");
745 } else {
746 region.toStringbuf(buf);
747 }
748 buf.append(", attempt=").append(attempt)
749 .append(", timeout=").append(timeout)
750 .append(", hasTimedout=").append(has_timedout);
751 buf.append(')');
752 return buf.toString();
753 }
754
755 /**
756 * Helper for subclass's {@link #toString} implementations.

Callers 3

getMockHBaseRpcMethod · 0.95
toStringWithQualifierMethod · 0.45

Calls 5

methodMethod · 0.95
prettyMethod · 0.95
stringSizeHintMethod · 0.80
appendMethod · 0.80
toStringbufMethod · 0.80

Tested by 1

getMockHBaseRpcMethod · 0.76