/** * A utility to build a GetServerInfoResponse. * * @param serverName * @param webuiPort * @return the response */ public static GetServerInfoResponse buildGetServerInfoResponse( final ServerName serverName, final int webuiPort) { GetServerInfoResponse.Builder builder = GetServerInfoResponse.newBuilder(); ServerInfo.Builder serverInfoBuilder = ServerInfo.newBuilder(); serverInfoBuilder.setServerName(ProtobufUtil.toServerName(serverName)); if (webuiPort >= 0) { serverInfoBuilder.setWebuiPort(webuiPort); } builder.setServerInfo(serverInfoBuilder.build()); return builder.build(); }
public Builder mergeFrom(org.apache.hadoop.hbase.protobuf.generated.AdminProtos.ServerInfo other) { if (other == org.apache.hadoop.hbase.protobuf.generated.AdminProtos.ServerInfo.getDefaultInstance()) return this; if (other.hasServerName()) { mergeServerName(other.getServerName()); } if (other.hasWebuiPort()) { setWebuiPort(other.getWebuiPort()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.apache.hadoop.hbase.protobuf.generated.AdminProtos.ServerInfo other) { if (other == org.apache.hadoop.hbase.protobuf.generated.AdminProtos.ServerInfo.getDefaultInstance()) return this; if (other.hasServerName()) { mergeServerName(other.getServerName()); } if (other.hasWebuiPort()) { setWebuiPort(other.getWebuiPort()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.apache.hadoop.hbase.protobuf.generated.AdminProtos.ServerInfo other) { if (other == org.apache.hadoop.hbase.protobuf.generated.AdminProtos.ServerInfo.getDefaultInstance()) return this; if (other.hasServerName()) { mergeServerName(other.getServerName()); } if (other.hasWebuiPort()) { setWebuiPort(other.getWebuiPort()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.apache.hadoop.hbase.protobuf.generated.AdminProtos.ServerInfo other) { if (other == org.apache.hadoop.hbase.protobuf.generated.AdminProtos.ServerInfo.getDefaultInstance()) return this; if (other.hasServerName()) { mergeServerName(other.getServerName()); } if (other.hasWebuiPort()) { setWebuiPort(other.getWebuiPort()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }