You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Jerry Gates (JIRA)" <ji...@apache.org> on 2011/04/11 10:05:05 UTC

[jira] [Created] (HIVE-2103) this.getJdbcTemplate().queryForInt("select count(*) from user_info"); search

this.getJdbcTemplate().queryForInt("select count(*) from user_info"); search
----------------------------------------------------------------------------

                 Key: HIVE-2103
                 URL: https://issues.apache.org/jira/browse/HIVE-2103
             Project: Hive
          Issue Type: Test
          Components: JDBC
    Affects Versions: 0.7.0
         Environment: Linux, jdk1.6.0_20, hive-0.7.0
            Reporter: Jerry Gates
            Priority: Minor


use the following: this.getJdbcTemplate().queryForInt("select count(*) from user_info");
the hive.log contents like that:

2011-04-11 15:38:44,270 WARN  mapred.JobClient (JobClient.java:configureCommandLineOptions(539)) - Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same.
2011-04-11 15:39:03,455 ERROR ql.Driver (SessionState.java:printError(343)) - FAILED: Parse Error: line 0:-1 mismatched input '<EOF>' expecting FROM in from clause

org.apache.hadoop.hive.ql.parse.ParseException: line 0:-1 mismatched input '<EOF>' expecting FROM in from clause

        at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:406)
        at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:327)
        at org.apache.hadoop.hive.ql.Driver.run(Driver.java:736)
        at org.apache.hadoop.hive.service.HiveServer$HiveServerHandler.execute(HiveServer.java:116)
        at org.apache.hadoop.hive.service.ThriftHive$Processor$execute.process(ThriftHive.java:699)
        at org.apache.hadoop.hive.service.ThriftHive$Processor.process(ThriftHive.java:677)
        at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:253)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)




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

[jira] [Commented] (HIVE-2103) this.getJdbcTemplate().queryForInt("select count(*) from user_info"); search

Posted by "Bennie Schut (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13018244#comment-13018244 ] 

Bennie Schut commented on HIVE-2103:
------------------------------------

Does queryForLong work for you? It's what I use. This should of course be fixed.

> this.getJdbcTemplate().queryForInt("select count(*) from user_info"); search
> ----------------------------------------------------------------------------
>
>                 Key: HIVE-2103
>                 URL: https://issues.apache.org/jira/browse/HIVE-2103
>             Project: Hive
>          Issue Type: Test
>          Components: JDBC
>    Affects Versions: 0.7.0
>         Environment: Linux, jdk1.6.0_20, hive-0.7.0
>            Reporter: Jerry Gates
>            Priority: Minor
>              Labels: hive
>
> use the following: this.getJdbcTemplate().queryForInt("select count(*) from user_info");
> the hive.log contents like that:
> 2011-04-11 15:38:44,270 WARN  mapred.JobClient (JobClient.java:configureCommandLineOptions(539)) - Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same.
> 2011-04-11 15:39:03,455 ERROR ql.Driver (SessionState.java:printError(343)) - FAILED: Parse Error: line 0:-1 mismatched input '<EOF>' expecting FROM in from clause
> org.apache.hadoop.hive.ql.parse.ParseException: line 0:-1 mismatched input '<EOF>' expecting FROM in from clause
>         at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:406)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:327)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:736)
>         at org.apache.hadoop.hive.service.HiveServer$HiveServerHandler.execute(HiveServer.java:116)
>         at org.apache.hadoop.hive.service.ThriftHive$Processor$execute.process(ThriftHive.java:699)
>         at org.apache.hadoop.hive.service.ThriftHive$Processor.process(ThriftHive.java:677)
>         at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:253)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:619)

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