I am using Java API to access HiveServer2, I have requirement of executing multiple hive queries in single call to execute() method of statements class. Is it possible to submit multiple queries of hive in one call to execute() method. I have hive properties to set as:
SET hive.exec.max.created.files=200000;
SET hive.exec.compress.output=true;
SET mapred.output.compression.codec=org.apache.hadoop.io.compress.SnappyCodec;
SET hive.exec.dynamic.partition = true;
SET hive.exec.dynamic.partition.mode = nonstrict;
set hive.exec.max.dynamic.partitions=5000;
set hive.exec.max.dynamic.partitions.pernode=5000;
.
.
Statement stmt = con.createStatement();
stmt.execute("SET hive.exec.max.created.files=200000");
.
.
for that now I am setting these properties one at a time using execute() method. Is there any way so i can set all these properties by executing all above statement in one call to execute() method.
Expected:
stmt.execute("SET hive.exec.max.created.files=200000;
SET hive.exec.dynamic.partition = true;
SET hive.exec.dynamic.partition.mode = nonstrict;
set hive.exec.max.dynamic.partitions=5000;
set hive.exec.max.dynamic.partitions.pernode=5000;");
Thanks.