Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on 04-13-2018 01:45 AM - edited 09-16-2022 06:06 AM
Dear Support,
I get a problem upgrading CDH from 5.9.1 to 5.9.3
The shells on CDH 5.9.1 are going well, but on CDH 5.9.3 show errors.
Here are the examples.
CASE 1.
[root@tcrmmn1 SH]# cat test.hql
insert into default.sample_07
--test
select * from default.sample_07 limit 10
;
[root@tcrmmn1 SH]# ./test9_nok.sh
insert into default.sample_07
--test
select * from default.sample_07 limit 10
;
Error: Error while compiling statement: FAILED: ParseException line 1:29 cannot recognize input near '<EOF>' '<EOF>' '<EOF>' in statement (state=42000,code=40000)
[root@tcrmmn1 SH]# cat test9_nok.sh
#!/bin/bash
value=`cat test.hql`
echo "$value"
beeline -u jdbc:hive2://10.1.9.5:10000/default?characterEncoding=UTF-8 -n hive -p 1qaz@WSX3edc --verbose=false --showHeader=false --silent=true --outputformat=tsv2 -e "$value"
CASE 2.
[root@tcrmmn1 SH]# ./test7_nok.sh
insert into default.sample_07
--test
select * from default.sample_07 limit 10
;
Error: Error while compiling statement: FAILED: ParseException line 1:29 cannot recognize input near '<EOF>' '<EOF>' '<EOF>' in statement (state=42000,code=40000)
[root@tcrmmn1 SH]# cat test7_nok.sh
#!/bin/bash
V_SQL=\
"insert into default.sample_07
--test
select * from default.sample_07 limit 10
;
"
echo "${V_SQL}"
beeline -u jdbc:hive2://10.1.9.5:10000/default?characterEncoding=UTF-8 -n hive -p 1qaz@WSX3edc --verbose=false --showHeader=false --silent=true --outputformat=tsv2 -e "${V_SQL}"
I also try the option -f. It's fine. Excute Sucessfuly.
[root@tcrmmn1 SH]# cat test10_ok.sh
#!/bin/bash
value=`cat test.hql`
echo "$value"
beeline -u jdbc:hive2://10.1.9.5:10000/default?characterEncoding=UTF-8 -n hive -p 1qaz@WSX3edc --verbose=false --showHeader=false --silent=true --outputformat=tsv2 -f test.hql
How can I fix it without modifying shell file?
Thank you!
Best Regards,
Ping
Created 05-11-2018 12:26 PM
This regression was introduced into the product in CDH 5.9.2 [HIVE-13864] and it was addressed in CDH 5.11.2, CDH 5.12.1 or CDH 5.13.0 and higher. [HIVE-17050]
Created 04-15-2018 07:43 PM
does your
set hive.variable.substitute=true;
script has this line inserted ?
Created 04-15-2018 09:13 PM
Thanks for replying
I add the property to the script.
beeline -u jdbc:hive2://10.7.2.111:10000/default?characterEncoding=UTF-8 -n hive -p 1qaz@WSX3edc --hiveconf hive.variable.substitute=true --verbose=false --showHeader=false --silent=true --outputformat=tsv2 -e "$value"
The result is the same.
Error: Error while compiling statement: FAILED: ParseException line 1:29 cannot recognize input near '<EOF>' '<EOF>' '<EOF>' in statement (state=42000,code=40000)
Created 05-11-2018 12:26 PM
This regression was introduced into the product in CDH 5.9.2 [HIVE-13864] and it was addressed in CDH 5.11.2, CDH 5.12.1 or CDH 5.13.0 and higher. [HIVE-17050]
Created 08-26-2018 08:02 PM
Hi,
I have exactly the issue described in this post and I am running CDH 5.13.3
I have tried putting this in the hql script as mentioned above:
set hive.variable.substitute=true;
and that does not help either.
Can someone advise what to try ?
Thanks
Created on 07-17-2022 01:30 AM - edited 07-17-2022 01:34 AM
Hi @csguna ,
set hive.variable.substitute=true;
Could you share what is the purpose inserting this line to the code?
Thanks.
Created 07-18-2022 02:31 AM
@newbieone, as this is an older post, you would have a better chance of receiving a resolution by starting a new thread. This will also be an opportunity to provide details specific to your environment that could aid others in assisting you with a more accurate answer to your question. You can link this thread as a reference in your new post.
Regards,
Vidya Sargur,