hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars George (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-5728) Methods Missing in HTableInterface
Date Tue, 10 Apr 2012 08:56:14 GMT

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

Lars George commented on HBASE-5728:
------------------------------------

Here is what you find only in HTable in 0.90.x:

{code}
public ArrayList<Put> getWriteBuffer();
public int getCurrentNrHRS() throws IOException;
public HRegionLocation getRegionLocation(String row) throws IOException;
public HRegionLocation getRegionLocation(byte[] row) throws IOException;
public HConnection getConnection();
public int getScannerCaching();
public void setScannerCaching(int scannerCaching);
public byte[][] getStartKeys() throws IOException;
public byte[][] getEndKeys() throws IOException;
public Pair<byte[][], byte[][]> getStartEndKeys() throws IOException;
public Map<HRegionInfo, HServerAddress> getRegionsInfo() throws IOException;
public void prewarmRegionCache(Map<HRegionInfo, HServerAddress> regionMap);
public void serializeRegionInfo(DataOutput out) throws IOException;
public Map<HRegionInfo, HServerAddress> deserializeRegionInfo(DataInput in) throws IOException;
public void clearRegionCache();
public void setAutoFlush(boolean autoFlush);
public void setAutoFlush(boolean autoFlush, boolean clearBufferOnFail);  
public long getWriteBufferSize();
public void setWriteBufferSize(long writeBufferSize) throws IOException,
{code}

Out of those we should check those that should be elevated into the HTableInterface. Sorting
them a dropping some serialization related ones, I could think of these to be added:

{code}
public HConnection getConnection();

public int getScannerCaching();
public void setScannerCaching(int scannerCaching);

public byte[][] getStartKeys() throws IOException;
public byte[][] getEndKeys() throws IOException;
public Pair<byte[][], byte[][]> getStartEndKeys() throws IOException;
public Map<HRegionInfo, HServerAddress> getRegionsInfo() throws IOException;
public HRegionLocation getRegionLocation(String row) throws IOException;
public HRegionLocation getRegionLocation(byte[] row) throws IOException;

public void prewarmRegionCache(Map<HRegionInfo, HServerAddress> regionMap);
public void clearRegionCache();

public void setAutoFlush(boolean autoFlush);
public void setAutoFlush(boolean autoFlush, boolean clearBufferOnFail);  

public long getWriteBufferSize();
public void setWriteBufferSize(long writeBufferSize) throws IOException,
public ArrayList<Put> getWriteBuffer();
{code}

This is adding a lot to the interface, but we need to really decide what is "generic", and
what is an implementation detail needed only for a concrete class implementing HTableInterface.

I could imagine getConnection() to be very specific to a remote table implementation. This
might be not required for, for example, a HTableInterface implementation for coprocessors
(i.e. the one returned by the copro context). 

This is open for feedback please!
                
> Methods Missing in HTableInterface
> ----------------------------------
>
>                 Key: HBASE-5728
>                 URL: https://issues.apache.org/jira/browse/HBASE-5728
>             Project: HBase
>          Issue Type: Improvement
>          Components: client
>            Reporter: Bing Li
>
> Dear all,
> I found some methods existed in HTable were not in HTableInterface.
>    setAutoFlush
>    setWriteBufferSize
>    ...
> In most cases, I manipulate HBase through HTableInterface from HTablePool. If I need
to use the above methods, how to do that?
> I am considering writing my own table pool if no proper ways. Is it fine?
> Thanks so much!
> Best regards,
> Bing

--
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

        

Mime
View raw message