HBASE-4609 ThriftServer.getRegionInfo() is expecting old ServerName format, need to
use new Addressing class instead (Jonathan Gray) git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1196873 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c61f0f296f
commit
76060691bb
|
@ -443,6 +443,8 @@ Release 0.92.0 - Unreleased
|
|||
HBASE-4713 Raise debug level to warn on ExecutionException in
|
||||
HConnectionManager$HConnectionImplementation (Lucian George Iordache)
|
||||
HBASE-4716 Improve locking for single column family bulk load
|
||||
HBASE-4609 ThriftServer.getRegionInfo() is expecting old ServerName format, need to
|
||||
use new Addressing class instead (Jonathan Gray)
|
||||
|
||||
TESTS
|
||||
HBASE-4450 test for number of blocks read: to serve as baseline for expected
|
||||
|
|
|
@ -72,6 +72,7 @@ import org.apache.hadoop.hbase.thrift.generated.TCell;
|
|||
import org.apache.hadoop.hbase.thrift.generated.TRegionInfo;
|
||||
import org.apache.hadoop.hbase.thrift.generated.TRowResult;
|
||||
import org.apache.hadoop.hbase.thrift.generated.TScan;
|
||||
import org.apache.hadoop.hbase.util.Addressing;
|
||||
import org.apache.hadoop.hbase.util.Bytes;
|
||||
import org.apache.hadoop.hbase.util.VersionInfo;
|
||||
import org.apache.hadoop.hbase.util.Writables;
|
||||
|
@ -953,9 +954,10 @@ public class ThriftServer {
|
|||
value = startRowResult.getValue(HConstants.CATALOG_FAMILY,
|
||||
HConstants.SERVER_QUALIFIER);
|
||||
if (value != null && value.length > 0) {
|
||||
ServerName sn = new ServerName(Bytes.toString(value), -1/*Any value works here for startcode*/);
|
||||
region.setServerName(Bytes.toBytes(sn.getHostname()));
|
||||
region.port = sn.getPort();
|
||||
String hostAndPort = Bytes.toString(value);
|
||||
region.setServerName(Bytes.toBytes(
|
||||
Addressing.parseHostname(hostAndPort)));
|
||||
region.port = Addressing.parsePort(hostAndPort);
|
||||
}
|
||||
return region;
|
||||
} catch (IOException e) {
|
||||
|
|
Loading…
Reference in New Issue