Josh,
Thank you. The RPCServer.getRemoteIp() is what I was looking for.
Best,

On Thu, Apr 26, 2018 at 6:46 AM, Josh Elser <els...@apache.org> wrote:

> Xu,
>
> Can you be more specific about what you're asking for in a "clientID" or
> "clientName"?
>
> Or even better, look at the static methods on the class
> org.apache.hadoop.hbase.ipc.RpcServer. There are a number of getters
> which use ThreadLocal variables to provide context about the user who
> submitted the RPC with the current thread is processing.
>
>
> On 4/25/18 6:55 PM, Xu Cang wrote:
>
>> Hi,
>> I am trying to implement a coprocessor and one info I'd like to get is
>> clientID or clientName for each Get op. I haven't found a place I can
>> retrieve this. Is this possible?
>>
>> I am going to implement RegionObserver. The hook I refer to is this:
>>
>> void preGetOp(ObserverContext<RegionCoprocessorEnvironment> c, Get get,
>> List<Cell> result)
>>
>>  From this preGetOp method, I have only observerContext and 'Get' objects.
>> Is client ID in any of these data structures? If not, are thee other ways
>> to get that info?
>>
>> Thanks,
>>
>> Xu
>>
>>

Reply via email to