[
https://issues.apache.org/jira/browse/HBASE-14296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15177954#comment-15177954
]
Biju Nair commented on HBASE-14296:
-----------------------------------
>From user perspective, not throwing an exception when a table object is
>created on a non existent table will break the norm. They would need to
>remember to check the exception when first action is taken on the object which
>will be like trying to remember to check on file exists exception when trying
>to read or write to a file and not when a file is open. Since the number of
>table objects created in the life of a process will be small, it is worth the
>additional table existence checking in getTable call from the usability
>perspective. Something to consider.
> ConnectionManager should validate the table existence before returning the
> table instance
> -----------------------------------------------------------------------------------------
>
> Key: HBASE-14296
> URL: https://issues.apache.org/jira/browse/HBASE-14296
> Project: HBase
> Issue Type: Bug
> Components: Client
> Affects Versions: 2.0.0, 1.2.0, 0.98.15
> Reporter: Pankaj Kumar
> Assignee: Pankaj Kumar
> Priority: Minor
>
> Table instance should be returned only when table exist.
> {code}
> public HTableInterface getTable(TableName tableName, ExecutorService
> pool) throws IOException {
> if (managed) {
> throw new NeedUnmanagedConnectionException();
> }
> return new HTable(tableName, this, tableConfig, rpcCallerFactory,
> rpcControllerFactory, pool);
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)