Qwerty
Qwerty

Reputation: 35

Does .beeline serve the same purpose as the .hiverc?

My office is currently transitioning from hive to beeline.

I currently have a .hiverc file that loads some JAR files for me and I would like to transition everything in the .hiverc to beeline if possible.

Currently the only file in my directory that seems relevant is the .beeline (unless I am looking for .beelinerc, haha). Does beeline support what hive supported with the .hiverc file?

.hiverc contents:

set hive.cli.print.header=true;
set hive.cli.print.current.db=true;
set hive.variable.substitute=true;
set hive.groupby.orderby.position.alias=true;
--set hive.execution.engine=spark;
set hive.execution.engine=mr;
set mapreduce.map.output.compress=true;
set mapreduce.map.output.compress.codec=org.apache.hadoop.io.compress.SnappyCodec;
set hive.exec.compress.intermediate=true;
set hive.exec.compress.output=true;
set hive.auto.convert.join=false;
set mapreduce.map.memory.mb=2048;
set mapreduce.reduce.memory.mb=2048;
set mapreduce.map.java.opts=-Xmx4916m;
set mapreduce.reduce.java.opts=-Xmx4916m;
set mapreduce.task.io.sort.mb=600;
set mapred.reduce.tasks=199;
set hive.exec.dynamic.partition.mode=nonstrict;
set hive.vectorized.execution.enabled=false;
set hive.optimize.sort.dynamic.partition=false;
set hive.optimize.index.filter=false;
set hive.exec.reducers.max=2999;
set hive.exec.orc.default.buffer.size=131072;
set hive.exec.reducers.bytes.per.reducer=64000000;
set hive.exec.orc.default.buffer.size=65536;
set hive.exec.dynamic.partition.mode=nonstrict;
set hive.vectorized.execution.enabled=true;
set hive.optimize.index.filter=false;
set fs.hdfs.impl.disable.cache=false;
--
set mapreduce.job.queuename=Three;
set mapred.job.queue.name=Three;
--add jar hdfs:///user/user_A/esri/spatial-sdk-hadoop.jar;
add jar hdfs:///user/user_A/esri/esri-geometry-api.jar;
add jar hdfs:///user/user_A/esri/spatial-sdk-hive-1.1.1-SNAPSHOT.jar;
add jar hdfs:///user/user_A/esri/spatial-sdk-json-1.1.1-SNAPSHOT.jar;
source /home/user_A/esri/function-ddl.sql;
add jar /home/edpintdatp/jobs/data_ingestion/thirdpartyjars/json-serde-1.3.1.jar;
add jar hdfs:///user/user_A/esri/brickhouse-0.7.1-SNAPSHOT.jar;
source /home/user_A/esri/brickhouse.sql;

Upvotes: 1

Views: 1327

Answers (2)

Kharthigeyan
Kharthigeyan

Reputation: 680

Use the beeline command line option -i as shown below for initialization.

beeline -i ~/.hiverc -u jdbc:hive2://hiveserver2.com:10000 $USER org.apache.hive.jdbc.HiveDriver

Refer this wiki link

Upvotes: 1

philantrovert
philantrovert

Reputation: 10092

According to this Jira Ticket , your .hiverc will work with beeline as it works with hive-cli if your Hive Version is > 0.14.0.

Upvotes: 2

Related Questions