Support Questions

Find answers, ask questions, and share your expertise

"init script execution failed" error while running tpch-setup.sh

avatar
Explorer

I am following the instructions to run hive tpch 

https://github.com/hortonworks/hive-testbench.git

 I am using Cloudera Enterprise Trial 7.3.1

 

I solved the initial error(https://community.cloudera.com/t5/Support-Questions/Error-while-running-hive-tpch-Exception-in-threa... ) and tried to rerun the tpch-setup.sh. I am running into following error.

 

+ echo 'TPC-H text data generation complete.'
TPC-H text data generation complete.
+ echo 'Loading text data into external tables.'
Loading text data into external tables.
+ runcommand 'beeline -u jdbc:hive2://techmach.com:10000/default -i settings/load-flat.sql -f ddl-tpch/bin_flat/alltables.sql -d DB=tpch_text_2 -d LOCATION=/tmp/tpch-generate/2'
+ '[' X '!=' X ']'
+ beeline -u jdbc:hive2://techmach.com:10000/default -i settings/load-flat.sql -f ddl-tpch/bin_flat/alltables.sql -d DB=tpch_text_2 -d LOCATION=/tmp/tpch-generate/2
+ i=1
+ total=8
+ test 2 -le 1000
+ SCHEMA_TYPE=flat
+ DATABASE=tpch_flat_orc_2
+ MAX_REDUCERS=2600
++ test 2 -gt 2600
++ echo 2
+ REDUCERS=2
+ for t in '${TABLES}'
+ echo 'Optimizing table part (1/8).'
Optimizing table part (1/8).
+ COMMAND='beeline -u jdbc:hive2://techmach.com:10000/default -i settings/load-flat.sql -f ddl-tpch/bin_flat/part.sql 	    -d DB=tpch_flat_orc_2 	    -d SOURCE=tpch_text_2 -d BUCKETS=13             -d SCALE=2 -d REDUCERS=2 	    -d FILE=orc'
+ runcommand 'beeline -u jdbc:hive2://techmach.com:10000/default -i settings/load-flat.sql -f ddl-tpch/bin_flat/part.sql 	    -d DB=tpch_flat_orc_2 	    -d SOURCE=tpch_text_2 -d BUCKETS=13             -d SCALE=2 -d REDUCERS=2 	    -d FILE=orc'
+ '[' X '!=' X ']'
+ beeline -u jdbc:hive2://techmach.com:10000/default -i settings/load-flat.sql -f ddl-tpch/bin_flat/part.sql -d DB=tpch_flat_orc_2 -d SOURCE=tpch_text_2 -d BUCKETS=13 -d SCALE=2 -d REDUCERS=2 -d FILE=orc
+ '[' 1 -ne 0 ']'
+ echo 'Command failed, try '\''export DEBUG_SCRIPT=ON'\'' and re-running'
Command failed, try 'export DEBUG_SCRIPT=ON' and re-running
+ exit 1

 

Below is the failing command output when run from the console

beeline -u jdbc:hive2://testmach.com:10000/default -i settings/load-flat.sql -f ddl-tpch/bin_flat/part.sql -d DB=tpch_flat_orc_2 -d SOURCE=tpch_text_2 -d BUCKETS=13 -d SCALE=2 -d REDUCERS=2 -d FILE=orc
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-7.1.6-1.cdh7.1.6.p0.10506313/jars/log4j-slf4j-impl-2.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-7.1.6-1.cdh7.1.6.p0.10506313/jars/slf4j-log4j12-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console. Set system property 'log4j2.debug' to show Log4j2 internal initialization logging.
WARNING: Use "yarn jar" to launch YARN applications.
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-7.1.6-1.cdh7.1.6.p0.10506313/jars/log4j-slf4j-impl-2.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-7.1.6-1.cdh7.1.6.p0.10506313/jars/slf4j-log4j12-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
Connecting to jdbc:hive2://testmach.com:10000/default
DB=tpch_flat_orc_2
Running init script settings/load-flat.sql
0: jdbc:hive2://testmach.com:10000/d (closed)> --set hive.enforce.bucketing=true;
0: jdbc:hive2://testmach.com:10000/d (closed)> --set hive.enforce.sorting=true;
0: jdbc:hive2://testmach.com:10000/d (closed)> set hive.exec.dynamic.partition.mode=nonstrict;
DB=tpch_flat_orc_2
No current connection
init script execution failed.

 

load-flat.sql

https://github.com/hortonworks/hive-testbench/blob/hdp3/settings/load-flat.sql 

1 ACCEPTED SOLUTION

avatar
Explorer

-d option is not supported in beeline. Issue got resolved using --hivevar

View solution in original post

1 REPLY 1

avatar
Explorer

-d option is not supported in beeline. Issue got resolved using --hivevar