hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-4054) Usability improvement to HTablePool
Date Fri, 08 Jul 2011 04:26:16 GMT

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

Ted Yu commented on HBASE-4054:
-------------------------------

There were tests broken by this JIRA.
For TestRemoteTable:
{noformat}
Jul 7, 2011 11:06:01 PM com.sun.jersey.spi.container.ContainerResponse mapMappableContainerException
SEVERE: The RuntimeException could not be mapped to a response, re-throwing to the HTTP container

java.lang.ClassCastException: org.apache.hadoop.hbase.client.HTablePool$PooledHTable cannot
be cast to org.apache.hadoop.hbase.client.HTable
	at org.apache.hadoop.hbase.rest.RowResource.update(RowResource.java:162)
	at org.apache.hadoop.hbase.rest.RowResource.put(RowResource.java:289)
{noformat}

And TestTableResource.testTableInfoText():
{noformat}
    2011-07-07 17:58:45,139 ERROR [318977678@qtp-1052953772-1] log.Slf4jLog(87): /TestTableResource/regions
    java.lang.ClassCastException: org.apache.hadoop.hbase.client.HTablePool$PooledHTable cannot
be cast to org.apache.hadoop.hbase.client.HTable
        at org.apache.hadoop.hbase.rest.RegionsResource.getTableRegions(RegionsResource.java:75)
        at org.apache.hadoop.hbase.rest.RegionsResource.get(RegionsResource.java:91)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
{noformat}

The attached addendum fixes the above two tests.

> Usability improvement to HTablePool
> -----------------------------------
>
>                 Key: HBASE-4054
>                 URL: https://issues.apache.org/jira/browse/HBASE-4054
>             Project: HBase
>          Issue Type: Improvement
>          Components: client
>    Affects Versions: 0.90.3
>            Reporter: Daniel Iancu
>            Priority: Minor
>         Attachments: HBASE-4054_Usability_improvement_to_HTablePool-trunk.patch, HBASE-4054_Usability_improvement_to_HTablePool.patch
>
>
> To improve the usability of the HTablePool the implementation should not rely on the
user returning the connection to the pool but rather do that transparently when user closes
the HTableImplementation it got.
>  
> To do that a HTableImplementation proxy implementation should be returned that wraps
a HTable object and holds a reference to the pool. When the client close the proxy it will
actually automatically return the wrapped HTable back in pool to be reused. In this case the
method HTablePool.putTable don't need to be public

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message