You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Pankaj Kumar (Jira)" <ji...@apache.org> on 2021/03/02 04:16:00 UTC

[jira] [Commented] (HBASE-25540) ArrayIndexOutOfBoundsException thrown when table CF name is "#"

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

Pankaj Kumar commented on HBASE-25540:
--------------------------------------

Thanks [~anoop.hbase] for the pointer.
As discussed offline, currently CF name only can contain # (table & namespace name only support alphanumeric chars). So we can do indexOf(#) and then do substring to parse the store name which will be less CPU intensive compared to Pattern.quote() approach. 

Have raised PR, please review.

> ArrayIndexOutOfBoundsException thrown when table CF name is "#"
> ---------------------------------------------------------------
>
>                 Key: HBASE-25540
>                 URL: https://issues.apache.org/jira/browse/HBASE-25540
>             Project: HBase
>          Issue Type: Bug
>          Components: metrics
>            Reporter: Pankaj Kumar
>            Assignee: Pankaj Kumar
>            Priority: Minor
>
> ArrayIndexOutOfBoundsException will be thrown when CF name is "#",
> https://github.com/apache/hbase/blob/a04ea7ea4493f5bc583b4d08a2a6a88e7c6b8c54/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsTableSourceImpl.java#L340
> {noformat}
> 2021-01-30 00:11:14,172 | ERROR | HBase-Metrics2-1 | Error getting metrics from source RegionServer,sub=Tables | org.apache.hadoop.metrics2.impl.MetricsSourceAdapter.getMetrics(MetricsSourceAdapter.java:202)
> java.lang.ArrayIndexOutOfBoundsException: 1
>         at org.apache.hadoop.hbase.regionserver.MetricsTableSourceImpl.addGauge(MetricsTableSourceImpl.java:336)
>         at org.apache.hadoop.hbase.regionserver.MetricsTableSourceImpl.snapshot(MetricsTableSourceImpl.java:321)
>         at org.apache.hadoop.hbase.regionserver.MetricsTableAggregateSourceImpl.getMetrics(MetricsTableAggregateSourceImpl.java:98)
>         at org.apache.hadoop.metrics2.impl.MetricsSourceAdapter.getMetrics(MetricsSourceAdapter.java:200)
>         at org.apache.hadoop.metrics2.impl.MetricsSourceAdapter.updateJmxCache(MetricsSourceAdapter.java:183)
>         at org.apache.hadoop.metrics2.impl.MetricsSourceAdapter.getMBeanInfo(MetricsSourceAdapter.java:156)
>         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getNewMBeanClassName(DefaultMBeanServerInterceptor.java:333)
>         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:319)
>         at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522)
>         at org.apache.hadoop.metrics2.util.MBeans.register(MBeans.java:67)
>         at org.apache.hadoop.metrics2.impl.MetricsSourceAdapter.startMBeans(MetricsSourceAdapter.java:222)
>         at org.apache.hadoop.metrics2.impl.MetricsSourceAdapter.start(MetricsSourceAdapter.java:101)
>         at org.apache.hadoop.metrics2.impl.MetricsSystemImpl.registerSource(MetricsSystemImpl.java:268)
>         at org.apache.hadoop.metrics2.impl.MetricsSystemImpl$1.postStart(MetricsSystemImpl.java:239)
>         at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:498)
>         at org.apache.hadoop.metrics2.impl.MetricsSystemImpl$3.invoke(MetricsSystemImpl.java:324)
>         at com.sun.proxy.$Proxy7.postStart(Unknown Source)
>         at org.apache.hadoop.metrics2.impl.MetricsSystemImpl.start(MetricsSystemImpl.java:193)
>         at org.apache.hadoop.metrics2.impl.JmxCacheBuster$JmxCacheBusterRunnable.run(JmxCacheBuster.java:109)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)