Hi Khoya The error is relevant from the stack trace itself. Setting the hive class path correctly would resolved the issue. I'd recommend you to upgrade the CDH you are using, alteast upgrade to CDH3u3 which has hive 0.7.
Regards Bejoy KS ________________________________ From: Kirk True <k...@mustardgrain.com> To: user@hive.apache.org Cc: Manish Bhoge <manishbh...@rocketmail.com> Sent: Wednesday, March 28, 2012 10:54 AM Subject: Re: error in running simple Hive Query It looks like your "+" in the JAR name is being replaced in the file/URL as " ". Hive 0.5 is old. If possible, consider upgrading. On 03/27/2012 08:17 PM, Manish Bhoge wrote: khoa, > >When you run HiveQL with filter condition then it uses reducer otherwise it just uses map tasks to select your data. There is a issue with your reducer. > >Sent from my BlackBerry, pls excuse typo >________________________________ > >From: "Nguyen, Khoa" <k_ngu...@audiblemagic.com> >Date: Tue, 27 Mar 2012 20:55:24 +0000 >To: user@hive.apache.org<user@hive.apache.org> >ReplyTo: user@hive.apache.org >Subject: error in running simple Hive Query > > >I'm using Hive distribution from CDH v0.5.0+32 and was able to run a simple >query "select * from country;" But when I try to run "select * from country >where code = 'US', I get the error below: hive-exec-0.5.0+32.jar does exist >under /usr/local/cdh_hive-0.5.0 32/lib > >hadoop@Frankenbox2:/usr/local/hive$ hive >Hive history file=/tmp/hadoop/hive_job_log_hadoop_201203271347_1763605691.txt >hive> select * from country; >OK >2DBFBC6B-D532-4AF0-A710-9C03EE1A2648,Australia,AU,2006-08-04 15:03:00.000 NULL NULL NULL >8F61AE16-33E1-45DF-B025-6F40DBB86F1E,Canada,CA,2006-08-04 15:03:00.000 NULL NULL NULL >EE27423E-B9D1-4182-A9EE-8CCD34CF87DD,Germany,DE,2006-08-04 15:03:00.000 NULL NULL NULL >BD80AFB4-D51A-4954-B945-67CDBD1920FB,Spain,ES,2006-08-04 15:03:00.000 NULL NULL NULL >482E6E4C-2777-4C36-A109-418FE00EE673,France,FR,2006-08-04 15:03:00.000 NULL NULL NULL >6F6DF920-2243-4433-BEAD-4F75037965CD,United Kingdom,GB,2006-08-04 15:03:00.000 NULL NULL NULL >08B0E6FB-1606-42C4-8094-E78115BBD0EB,Mexico,MX,2006-08-04 15:03:00.000 NULL NULL NULL >F16D6EAE-CECA-488F-8E51-C313352E6656,United States,US,2006-08-04 15:03:00.000 NULL NULL NULL >Time taken: 5.143 seconds >hive> select * from country where code = 'US'; >Total MapReduce jobs = 1 >Launching Job 1 out of 1 >Number of reduce tasks is set to 0 since there's no reduce operator >java.io.FileNotFoundException: File /usr/local/cdh_hive-0.5.0 >32/lib/hive-exec-0.5.0 32.jar does not exist. > at org.apache.hadoop.fs.RawLocalFileSystem.getFileStatus(RawLocalFileSystem.java:361) > at org.apache.hadoop.fs.FilterFileSystem.getFileStatus(FilterFileSystem.java:245) > at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:192) > at org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem.java:1189) > at org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem.java:1165) > at org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem.java:1137) > at org.apache.hadoop.mapred.JobClient.configureCommandLineOptions(JobClient.java:657) > at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:761) > at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:730) > at org.apache.hadoop.hive.ql.exec.ExecDriver.execute(ExecDriver.java:573) > at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:100) > at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:64) > at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:572) > at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:452) > at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:314) > at org.apache.hadoop.hive.ql.Driver.run(Driver.java:302) > at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123) > at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181) > at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:616) > at org.apache.hadoop.util.RunJar.main(RunJar.java:156) >Job Submission failed with exception 'java.io.FileNotFoundException(File /usr/local/cdh_hive-0.5.0 32/lib/hive-exec-0.5.0 32.jar does not exist.)' >FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.ExecDriver >hive> > >- Khoa > > >