-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failing count(*) for the 1st time under beeline and also using prior table length (FB) #65
Comments
Please share exact command line statements, also could you please let me know if you are using serde2 or serde3 |
Please check https://community.cloudera.com/t5/Support-Questions/Adding-hive-auxiliary-jar-files/td-p/120245 and try to place the jar on hdfs location |
Hi , We tried to have the JAR in HDFS also , but we are getting same "Fixed record length 0 is invalid " issue.But not tried yet Auxiliary configuration . It is working fine in HIVE CLI . Can you please help why we are getting exception when we run in beeline using Tez engine. Exception Caused by: java.io.IOException: java.io.IOException: Fixed record length 0 is invalid. It should be set to a value greater than zero |
Add jar won't work, please place your jar in hive.aux.jars.path specified in hive-site.xml or place it in hdfs and set hive.aux.jars.path=<hdfs_location> in beeline
Let me know if it still fails |
I tried to set hive.aux.jars.path=<hdfs_location> in beeline like below .But it is not able to recognize : jdbc:hive2://myhost.bnymellon.net:38001> set hive.aux.jars.path=hdfs:///user/myid/jar/CobolSerdeHive.jar ; |
Hi Ram - We added cobolserde jar to auxlib path and modified hive-site.xml . |
Hi Ram - Can you please see if you can help us on this issue |
@poongs84 the custom serde is written for map reduce. It won’t work for Tez or Spark. Try setting execution engine to mr before running your query. |
Hi Ram - Thanks for suggestion . One question . Why it works for Tez mode in HIVE CLI but not in beeline |
@poongs84 that’s something I need to debug further.. I never intended it to work with tez.. if it is working in hive cli and not in beeline, there may be extra modifications we need to add to code to support beeline and tez...We need to further look into beeline and tez documentation... |
Hi Ram - Since we are planning to move to HDP 3 soon, there it supports only beeline and looks like MR engine also is NOT supported . Is there anyway to make this cobol serde jar to work in tez engine with beeline . |
HI Ram - Can you please see if this JAR can be made to work on Tez with Beeline. |
Hi Ram - Can you see if you can help us on this issue |
@poongs84 Please use org.apache.hadoop.mapreduce.lib.input.FixedLengthInputFormat if you are using beeline.. |
Thanks for the input Ram. We will give a try. Can you please confirm if the change is needed in 1) import from org.apache.hadoop.mapred.FixedLengthInputFormat to org.apache.hadoop.mapreduce.lib.input.FixedLengthInputFormat in CobolSerDe (both instances) and CobolSerDeUtils classes is sufficient and 2) CREATE TABLE statement "STORED AS INPUTFORMAT"? |
Just in create table will do, I believe. |
I am able to create table .But when I execute select statement it throws error ADD JAR //CobolSerdeHive.jar; select count(*) from default.default.MY_BINARY_TABLE Error: Error while compiling statement: FAILED: SemanticException 1:22 Input format must implement InputFormat. Error encountered near token 'MY_BINARY_TABLE'(state=42000,code=40000) |
@poongs84 error suggests ur table name is wrong... I see 2 instances of default in table name, correct it and try again |
@rbheemana .. that is typo error while I paste in comments .The query executed is just have default.MY_BINARY_TABLE |
What is the word near offset 22 in your exact query then..? |
the below is the query executed and failed with exception Error: Error while compiling statement: FAILED: SemanticException 1:22 Input format must implement InputFormat. Error encountered near token 'MY_BINARY_TABLE ' (state=42000,code=40000) |
We are using this Serde for past few years under CLI but we are in the process of switching to beeline. While testing under beeline, we are encountering 2 strange behavior, which I think is related to same problem. All our tables are FB files and the same JAR is working perfectly fine under CLI and count(*) is returning fine.
When we issue count() for table (FB file) after add JAR for the very 1st time, we are getting following exception. But if we re-issue count() from exactly same table, it is running fine. But if we are selecting a column(s) from the table for the very 1st time, then there is NO issue.
"diagnostics=[TaskAttempt 0 failed, info=[Error: Failure while running task:java.lang.RuntimeException: java.lang.RuntimeException: java.io.IOException: java.io.IOException: Fixed record length 0 is invalid. It should be set to a value greater than zero".
Any subsequent 1st count(*) for another table, the length of prior table is used and doesn't match with the total length of the 2nd table file and hence throwing exception. Here also, if we select column(s), then the current table FB length is used.
Any help is appreciated.
Thanks,
Rama.
The text was updated successfully, but these errors were encountered: