Created 03-23-2017 08:37 PM
I'm trying to upload a table in the Ambari Hive View. The file is tab separated and the strings are delimited by double quotes (I have set these settings in the appropriated dialog box in the upload form).
There is always an exception, no matter what variations of the input file I try (different field delimiter, with and without header row, ...):
java.lang.Exception: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 1:77 mismatched input ',' expecting ( near 'CHAR' in primitive type specification java.lang.Exception: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 1:77 mismatched input ',' expecting ( near 'CHAR' in primitive type specification at org.apache.ambari.view.hive2.resources.jobs.JobService.getOne(JobService.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498)
(...)
I'm running this in the HDP Sandbox deployed in Azure.
Sandbox information: Created on: 25_10_2016_08_11_26 for Hadoop stack version: Hadoop 2.7.3.2.5.0.0-1245 Ambari Version: 2.4.0.0-1225 Ambari Hash: 59175b7aa1ddb74b85551c632e3ce42fed8f0c85 Ambari build: Release : 1225 Java version: 1.8.0_111 OS Version: CentOS release 6.8 (Final)
Any suggestion on how to solve this?
Created 03-24-2017 07:34 PM
Thank you for the replies.
After further analysis, I found the root of the problem. It was required to set the length of CHAR columns. The user interface has a widget to set this value, however it appearance is similar to a disabled component, instead of an input field, which is misleading.
Created 03-23-2017 08:46 PM
I did another test: I downloaded an example existing in the Sandbox (cdrs.txt) and repeated the process. It also gave an error (a different one, however). So, the problem shouldn't be the file itself.
java.lang.Exception: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 1:61 Failed to recognize predicate 'LOCAL'. Failed rule: 'identifier' in column specification
java.lang.Exception: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 1:61 Failed to recognize predicate 'LOCAL'. Failed rule: 'identifier' in column specification at org.apache.ambari.view.hive2.resources.jobs.JobService.getOne(JobService.java:141)
Created 03-24-2017 03:15 AM
Are you using "local" in your query, it seems to be a reserved word, can you rename it to something else and try?
Created 03-24-2017 11:23 AM
The used sample data is from the example included in the HDP Sandbox. So it should be correct. Anyway, renaming the column names leads to the same result.
Created 03-24-2017 11:51 AM
Please find error for this column
Created 03-24-2017 07:30 PM
Yes, the error should be there, as the exception says 🙂
Created 03-24-2017 07:34 PM
Thank you for the replies.
After further analysis, I found the root of the problem. It was required to set the length of CHAR columns. The user interface has a widget to set this value, however it appearance is similar to a disabled component, instead of an input field, which is misleading.