You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by 249550148 <gi...@git.apache.org> on 2016/04/25 05:07:58 UTC

[GitHub] phoenix pull request: IndexFailed when data table name contains ":...

GitHub user 249550148 opened a pull request:

    https://github.com/apache/phoenix/pull/166

    IndexFailed when data table name contains  ":"

    bin/hbase org.apache.phoenix.mapreduce.index.IndexTool  --data-table raw:cell_call --index-table INDEX --output-path hdfs://ip:port/folder
    
    failed when active index table
    
    
    2016-04-23 00:13:06,262 ERROR [main] index.IndexTool:  An exception occured while performing the indexing job : org.apache.phoenix.exception.PhoenixParserException: ERROR 601 (42P00): Syntax error. Encountered ":" at line 1, column 44.
            at org.apache.phoenix.exception.PhoenixParserException.newException(PhoenixParserException.java:33)
            at org.apache.phoenix.parse.SQLParser.parseStatement(SQLParser.java:111)
            at org.apache.phoenix.jdbc.PhoenixStatement$PhoenixStatementParser.parseStatement(PhoenixStatement.java:1185)
            at org.apache.phoenix.jdbc.PhoenixStatement.parseStatement(PhoenixStatement.java:1268)
            at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1339)
            at org.apache.phoenix.mapreduce.index.IndexToolUtil.updateIndexState(IndexToolUtil.java:72)
            at org.apache.phoenix.mapreduce.index.IndexTool.run(IndexTool.java:252)
            at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
            at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
            at org.apache.phoenix.mapreduce.index.IndexTool.main(IndexTool.java:378)
    Caused by: NoViableAltException(25@[])
            at org.apache.phoenix.parse.PhoenixSQLParser.from_table_name(PhoenixSQLParser.java:9170)
            at org.apache.phoenix.parse.PhoenixSQLParser.alter_index_node(PhoenixSQLParser.java:2762)
            at org.apache.phoenix.parse.PhoenixSQLParser.oneStatement(PhoenixSQLParser.java:838)
            at org.apache.phoenix.parse.PhoenixSQLParser.statement(PhoenixSQLParser.java:500)
            at org.apache.phoenix.parse.SQLParser.parseStatement(SQLParser.java:108)
            ... 8 more

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

    $ git pull https://github.com/249550148/phoenix master

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

    https://github.com/apache/phoenix/pull/166.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 #166
    
----
commit 7cebc2cd07dfb4359e3badf95738718a73c0d448
Author: 249550148 <dd...@foxmail.com>
Date:   2016-04-25T03:06:02Z

    IndexFailed when data table name contains  ":"
    
    bin/hbase org.apache.phoenix.mapreduce.index.IndexTool  --data-table raw:cell_call --index-table INDEX --output-path hdfs://ip:port/folder
    
    failed when active index table
    
    
    2016-04-23 00:13:06,262 ERROR [main] index.IndexTool:  An exception occured while performing the indexing job : org.apache.phoenix.exception.PhoenixParserException: ERROR 601 (42P00): Syntax error. Encountered ":" at line 1, column 44.
            at org.apache.phoenix.exception.PhoenixParserException.newException(PhoenixParserException.java:33)
            at org.apache.phoenix.parse.SQLParser.parseStatement(SQLParser.java:111)
            at org.apache.phoenix.jdbc.PhoenixStatement$PhoenixStatementParser.parseStatement(PhoenixStatement.java:1185)
            at org.apache.phoenix.jdbc.PhoenixStatement.parseStatement(PhoenixStatement.java:1268)
            at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1339)
            at org.apache.phoenix.mapreduce.index.IndexToolUtil.updateIndexState(IndexToolUtil.java:72)
            at org.apache.phoenix.mapreduce.index.IndexTool.run(IndexTool.java:252)
            at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
            at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
            at org.apache.phoenix.mapreduce.index.IndexTool.main(IndexTool.java:378)
    Caused by: NoViableAltException(25@[])
            at org.apache.phoenix.parse.PhoenixSQLParser.from_table_name(PhoenixSQLParser.java:9170)
            at org.apache.phoenix.parse.PhoenixSQLParser.alter_index_node(PhoenixSQLParser.java:2762)
            at org.apache.phoenix.parse.PhoenixSQLParser.oneStatement(PhoenixSQLParser.java:838)
            at org.apache.phoenix.parse.PhoenixSQLParser.statement(PhoenixSQLParser.java:500)
            at org.apache.phoenix.parse.SQLParser.parseStatement(SQLParser.java:108)
            ... 8 more

----


---
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] phoenix pull request: IndexFailed when data table name contains ":...

Posted by 249550148 <gi...@git.apache.org>.
Github user 249550148 closed the pull request at:

    https://github.com/apache/phoenix/pull/166


---
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] phoenix pull request: IndexFailed when data table name contains ":...

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

    https://github.com/apache/phoenix/pull/166#issuecomment-215305552
  
    Yes, I have already fixed it as a part of my work on PHOENIX-2862.


---
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] phoenix pull request: IndexFailed when data table name contains ":...

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

    https://github.com/apache/phoenix/pull/166#issuecomment-214203754
  
    Have you tried passing table name with quotes
    bin/hbase org.apache.phoenix.mapreduce.index.IndexTool --data-table "\"raw:table\"" --index-table INDEX --output-path hdfs://ip:port/folder


---
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] phoenix pull request: IndexFailed when data table name contains ":...

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

    https://github.com/apache/phoenix/pull/166#issuecomment-214240303
  
    @ankitsinghal 
    both "raw:table" and "\"raw:table\"" do not work


---
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] phoenix pull request: IndexFailed when data table name contains ":...

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

    https://github.com/apache/phoenix/pull/166#issuecomment-215140554
  
    can you try with this, use (singlequote,doublequote,doublequote) to escape double quotes on command line.
    bin/hbase org.apache.phoenix.mapreduce.index.IndexTool --data-table '""raw:table""' --index-table INDEX --output-path hdfs://ip:port/folder
    
    It should work with version prior to current master.(as master has namespace mapping feature which requires some changes to recognize the mapped tables and escape properly . need modification in  SchemaUtil.getTableNameFromFullName and getSchemaNameFromFullName ).



---
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] phoenix pull request: IndexFailed when data table name contains ":...

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

    https://github.com/apache/phoenix/pull/166#issuecomment-214258122
  
    @ankitsinghal 
    Yes, the same exception.
    
    And raw:table is an existing hbase table.
    I create view "raw:table" on that table.
    then create index on the view.


---
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] phoenix pull request: IndexFailed when data table name contains ":...

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

    https://github.com/apache/phoenix/pull/166#issuecomment-215291162
  
    thanks @ankitsinghal .
    
    I'm using version 4.7.0-hbase-1.1,  and '""raw:table""' failed:
    
    ERROR [main] index.IndexTool:  An exception occured while performing the indexing job : java.lang.IllegalArgumentException:  INDEX is not an index table for "raw:table" 
    	at org.apache.phoenix.mapreduce.index.IndexTool.run(IndexTool.java:187)
    	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
    	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
    	at org.apache.phoenix.mapreduce.index.IndexTool.main(IndexTool.java:378)
    
    when switching to '"raw:table"',  Syntax error. Encountered ":" at line 1, column 37 happens again.
    
    Will next version fix this problem? 
    For now,  I can still mannually active index by execute  "ALTER INDEX IF EXISTS INDEX ON "raw:table" ACTIVE".


---
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] phoenix pull request: IndexFailed when data table name contains ":...

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

    https://github.com/apache/phoenix/pull/166#issuecomment-214250448
  
    Are you getting the same exception?
    was the raw:table an existing hbase table and you have created a phoenix view/table over it?
    is the table name raw:table or RAW:TABLE?



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