[ 
https://issues.apache.org/jira/browse/HBASE-5209?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13210818#comment-13210818
 ] 

David S. Wang commented on HBASE-5209:
--------------------------------------

Stack,

Thanks for the review.

I am a bit confused about your previous comment though: I do not update 
HMasterInterface in my latest patch, nor do I change anything related to 
isActiveMaster. The only version that I update is VERSION for ClusterStatus, 
and I already add the new fields to the end with my current patch. I think 
perhaps that is what you are referring to.

I did two tests with "hbase hbck -details" to test ClusterStatus:

1. I tested old client (top of trunk 0.92) with new server (0.92 with my patch 
but without bumping VERSION), and things worked fine.

2. I tested new client (0.92 with my patch but without bumping VERSION), with 
old server (top of trunk 0.92), and got the following error.  I'm thinking 
because the new client expects the new fields I added that the old server never 
sends. Is this OK behavior?

INFO zookeeper.ClientCnxn: Session establishment complete on server 
haus02.sf.cloudera.com/172.29.5.33:30181, sessionid = 0x1358ef9f91b000b, 
negotiated timeout = 5000

[... pauses for some time ...]

12/02/17 15:51:46 ERROR io.HbaseObjectWritable: Error in readFields 
java.net.SocketTimeoutException: 60000 millis timeout while waiting for channel 
to be ready for read. ch : java.nio.channels.SocketChannel[connected 
local=/172.29.5.33:41223 remote=haus04.sf.cloudera.com/172.29.5.35:31000] 
at org.apache.hadoop.net.SocketIOWithTimeout.doIO(SocketIOWithTimeout.java:164)
at org.apache.hadoop.net.SocketInputStream.read(SocketInputStream.java:155)
at org.apache.hadoop.net.SocketInputStream.read(SocketInputStream.java:128)
at java.io.FilterInputStream.read(FilterInputStream.java:116)
at 
org.apache.hadoop.hbase.ipc.HBaseClient$Connection$PingInputStream.read(HBaseClient.java:311)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
at java.io.DataInputStream.readByte(DataInputStream.java:248)
at org.apache.hadoop.io.WritableUtils.readVLong(WritableUtils.java:299)
at org.apache.hadoop.io.WritableUtils.readVInt(WritableUtils.java:320)
at org.apache.hadoop.hbase.util.Bytes.readByteArray(Bytes.java:146)
at org.apache.hadoop.hbase.ClusterStatus.readFields(ClusterStatus.java:334)
at 
org.apache.hadoop.hbase.io.HbaseObjectWritable.readObject(HbaseObjectWritable.java:647)
at 
org.apache.hadoop.hbase.io.HbaseObjectWritable.readFields(HbaseObjectWritable.java:311)
at 
org.apache.hadoop.hbase.ipc.HBaseClient$Connection.receiveResponse(HBaseClient.java:593)
at org.apache.hadoop.hbase.ipc.HBaseClient$Connection.run(HBaseClient.java:50
                
> HConnection/HMasterInterface should allow for way to get hostname of 
> currently active master in multi-master HBase setup
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-5209
>                 URL: https://issues.apache.org/jira/browse/HBASE-5209
>             Project: HBase
>          Issue Type: Improvement
>          Components: master
>    Affects Versions: 0.94.0, 0.90.5, 0.92.0
>            Reporter: Aditya Acharya
>            Assignee: David S. Wang
>             Fix For: 0.94.0, 0.90.7, 0.92.1
>
>         Attachments: HBASE-5209-v0.diff, HBASE-5209-v1.diff
>
>
> I have a multi-master HBase set up, and I'm trying to programmatically 
> determine which of the masters is currently active. But the API does not 
> allow me to do this. There is a getMaster() method in the HConnection class, 
> but it returns an HMasterInterface, whose methods do not allow me to find out 
> which master won the last race. The API should have a 
> getActiveMasterHostname() or something to that effect.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to