You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by karel1980 <gi...@git.apache.org> on 2014/04/16 13:15:56 UTC

[GitHub] incubator-phoenix pull request: PHOENIX-886 Avoid WARN log from hb...

GitHub user karel1980 opened a pull request:

    https://github.com/apache/incubator-phoenix/pull/29

    PHOENIX-886 Avoid WARN log from hbase when table doesn't exist

    See https://issues.apache.org/jira/browse/PHOENIX-886

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/NGDATA/incubator-phoenix PHOENIX-886-table-not-found-warning

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-phoenix/pull/29.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #29
    
----
commit db51737515931cd78bde113a0749d46945e7b625
Author: Karel Vervaeke <ka...@ngdata.com>
Date:   2014-04-16T11:04:02Z

    PHOENIX-886 Avoid WARN log from hbase when table doesn't exist

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-phoenix pull request: PHOENIX-886 Avoid WARN log from hb...

Posted by JamesRTaylor <gi...@git.apache.org>.
Github user JamesRTaylor commented on the pull request:

    https://github.com/apache/incubator-phoenix/pull/29#issuecomment-40627413
  
    Thanks for the pull request. The code is written this way to avoid making multiple admin calls. Plus, even if you checked up front, you'd still have the possibility for the exception to occur, as the table may get removed right after you check that it exists.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-phoenix pull request: PHOENIX-886 Avoid WARN log from hb...

Posted by JamesRTaylor <gi...@git.apache.org>.
Github user JamesRTaylor commented on a diff in the pull request:

    https://github.com/apache/incubator-phoenix/pull/29#discussion_r11695764
  
    --- Diff: phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java ---
    @@ -258,6 +258,24 @@ public HTableInterface getTable(byte[] tableName) throws SQLException {
         
         @Override
         public HTableDescriptor getTableDescriptor(byte[] tableName) throws SQLException {
    +        HBaseAdmin admin = getAdmin();
    --- End diff --
    
    We turn this exception into a TableNotFoundException on purpose. We don't want to make two admin calls in order to get the HTableDescriptor. If you feel strongly, then file an HBase bug to decrease the log level of this exception.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-phoenix pull request: PHOENIX-886 Avoid WARN log from hb...

Posted by karel1980 <gi...@git.apache.org>.
Github user karel1980 commented on the pull request:

    https://github.com/apache/incubator-phoenix/pull/29#issuecomment-40795390
  
    Concerning the additional admin call: I agree; 
    Concerning the possibility of the exception still occurreing: it is a very small window. It should work well enough in practice. It's handled anyway so it won't cause any real harm if it does fail (just as it doesn't do any harm right now. It's just a warning :)
    
    I don't really want to suppress the warning permanently, I just want to avoid the unsightly error from sqlline in order not to confuse users. The 'WARN' level in HBase is fine (IMHO) for other uses.
    To have HBase log the exception conditionally we would have to pass a flag from the HTable constructor all the way down to org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.prefetchRegionCache (unless there's a more elegant solution I didn't think of)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---