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

Robert Yokota commented on HBASE-17935:
---------------------------------------

During FastFailInterceptorContext.prepare, the server is only set if the 
callable is an instance of RegionServerCallable, which is not the case for all 
admin ops

{code:java}
  public FastFailInterceptorContext prepare(RetryingCallable<?> callable,
      int tries) {
    if (callable instanceof RegionServerCallable) {
      RegionServerCallable<?> retryingCallable = (RegionServerCallable<?>) 
callable;
      server = retryingCallable.getLocation().getServerName();
    }
    this.tries = tries;
    return this;
  }
{code}



> NPE when using PreemptiveFastFailInterceptor with HBaseAdmin client
> -------------------------------------------------------------------
>
>                 Key: HBASE-17935
>                 URL: https://issues.apache.org/jira/browse/HBASE-17935
>             Project: HBase
>          Issue Type: Bug
>          Components: Client
>    Affects Versions: 1.1.2
>            Reporter: Robert Yokota
>            Assignee: Robert Yokota
>            Priority: Minor
>         Attachments: HBASE-17935.master.001.patch
>
>
> When setting hbase.client.fast.fail.mode.enabled=true and using the admin 
> client, got a NPE:
> java.lang.NullPointerException
>         at 
> java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
>         at 
> org.apache.hadoop.hbase.client.PreemptiveFastFailInterceptor.intercept(PreemptiveFastFailInterceptor.java:115)
>         at 
> org.apache.hadoop.hbase.client.PreemptiveFastFailInterceptor.intercept(PreemptiveFastFailInterceptor.java:376)
>         at 
> org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithRetries(RpcRetryingCaller.java:135)
>         at 
> org.apache.hadoop.hbase.client.HBaseAdmin.executeCallable(HBaseAdmin.java:4297)
>         at 
> org.apache.hadoop.hbase.client.HBaseAdmin.executeCallable(HBaseAdmin.java:4289)
>         at 
> org.apache.hadoop.hbase.client.HBaseAdmin.getNamespaceDescriptor(HBaseAdmin.java:3009)
>         at 
> com.yammer.calmie.store.hbase.HBaseConnectionFactory.namespaceExists(HBaseConnectionFactory.java:146)
>         at 
> com.yammer.calmie.store.hbase.HBaseConnectionFactory.createHTable(HBaseConnectionFactory.java:116)
>         at 
> com.yammer.calmie.store.hbase.HBaseConnectionFactory.declareTable(HBaseConnectionFactory.java:97)
>         at 
> com.yammer.feedie.core.index.calmie.MessageCalmieIndex.<init>(MessageCalmieIndex.java:46)
>         at com.yammer.feedie.core.MessageStore.init(MessageStore.java:108)
>         at com.yammer.feedie.core.MessageStore.<init>(MessageStore.java:89)
>         at com.yammer.feedie.FeedieService.setup(FeedieService.java:148)
>         at com.yammer.feedie.FeedieService.run(FeedieService.java:315)
>         at com.yammer.feedie.FeedieService.run(FeedieService.java:65)
>         at 
> com.yammer.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:38)
>         at 
> com.yammer.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:58)
>         at com.yammer.dropwizard.cli.Cli.run(Cli.java:53)
>         at com.yammer.dropwizard.Service.run(Service.java:61)
>         at com.yammer.feedie.FeedieService.main(FeedieService.java:84)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to