Questions tagged [beeline]

Beeline is a Hive command-line shell that works with HiveServer2

Beeline replaces Hive CLI for Hiveserver. Documentation is available here.

The Beeline shell works in both embedded mode as well as remote mode. In the embedded mode, it runs an embedded Hive (similar to Hive CLI) whereas remote mode is for connecting to a separate HiveServer2 process over Thrift. Starting in Hive 0.14, when Beeline is used with HiveServer2, it also prints the log messages from HiveServer2 for queries it executes to STDERR. Remote HiveServer2 mode is recommended for production use, as it is more secure and doesn't require direct HDFS/metastore access to be granted for users.

There’s detailed documentation of SQLLine which is applicable to Beeline as well.

281 questions
4
votes
0 answers

What are the required steps to use Beeline to query a remote Hadoop instance?

I have a Hadoop cluster running on another server. I am able to ssh into that server and use Hive to run queries. I'm trying to determine if I can query that server remotely, using Hive or Beeline; would prefer Beeline, since it's not being…
jcollum
  • 43,623
  • 55
  • 191
  • 321
4
votes
2 answers

Difference between hive, impala and beeline

I am new to Hadoop eco-system tools. Can anyone help me with understand the difference between hive, beeline and hive. Thanks in advance!
Ramkrushna26
  • 125
  • 1
  • 7
3
votes
2 answers

Optimize Hive Query. java.lang.OutOfMemoryError: Java heap space/GC overhead limit exceeded

How can I optimize a query of this form since I keep running into this OOM error? Or come up with a better execution plan? If I removed the substring clause, the query would work fine, suggesting that this takes a lot of memory. When the job fails,…
user7644509
  • 130
  • 9
3
votes
1 answer

How to access Metastore from beeline?

I need to do some SQL queries (as here) directly from Metasore. PS: the commands SHOW/DESCRIBE are not enough. How to enable access from it as database, or what the database name of Metastore? ... In nowadays (2019) it is possible? NOTES What is…
Peter Krauss
  • 13,174
  • 24
  • 167
  • 304
3
votes
1 answer

Force HiveServer2 to run MapReduce job

I am using hive-1.1.0. Submitting queries to HiveServer2 via Beeline which are read-only and contain no predicates will cause HiveServer2 to try to read the data from HDFS itself without spawning a MapReduce job: SELECT * FROM my_table LIMIT…
Aaron
  • 442
  • 1
  • 5
  • 14
3
votes
1 answer

User is not allowed to impersonate anonymous (state=08S01,code=0) org.apache.hadoop.security.authorize.AuthorizationException

I am getting the below error when I try to start Hive using hiverserver2. Connecting to jdbc:hive2://localhost:10000 18/10/25 09:45:38 [main]: WARN jdbc.HiveConnection: Failed to connect to localhost:10000 Error: Could not open client transport with…
MagnumCodus
  • 171
  • 1
  • 11
3
votes
1 answer

How to download data from beeline hive in csv2 format?

I'm having issue while downloading data from hive via beeline. I want to download a table into file with csv as field delimiter. If the column value has comma, then that value needs to be enclosed by quote. I know that beeline provides…
Makubex
  • 419
  • 3
  • 19
3
votes
0 answers

Why does the properties in hive-site.xml does not get picked up in hive?

I am connecting to Hive using beeline. I'd like to provide the properties of hive-site.xml from a different directory of $HIVE_HOME/conf. The reason is that we do not have permission to $HIVE_HOME/conf directory nor the /etc/hive/conf directory. I…
azimos
  • 55
  • 4
3
votes
2 answers

Remove headers in output in beeline

I am trying beeline cli to query hive table and store output result as variable. Using beeline command: beeline -u connection_string -n user_name -w password_file \ -e "select count(*) from db.table_name" Using this command, I getting the current …
Sandeep Singh
  • 7,790
  • 4
  • 43
  • 68
3
votes
2 answers

Beeline query with SSL (Hive missconfiguration ? )

I am triying on a cluster that have Kerberos to make a beeline query works : beeline -u…
Antoine
  • 355
  • 2
  • 12
3
votes
1 answer

How does "LOAD DATA LOCAL INPATH" to remote hiveserver

I want to import the file on the local machine using the "LOAD DATA LOCAL INPATH.." but, I can not import $ beeline -u jdbc:hive2://example:10000 -e "LOAD DATA LOCAL INPATH 'tmp/file_20161024.dat' OVERWRITE INTO TABLE some_table…
asari-mtr
  • 529
  • 1
  • 5
  • 10
3
votes
0 answers

Why realm is required for some users in beeline connection,even its ensured with ldap authentciation.?

Problem: Why realm is required for some users in beeline connection,even its ensured with ldap authentciation.? While connecting with beeline,with configured ldap authentication some users connected with without realm and some users connect with…
mathes
  • 333
  • 1
  • 8
3
votes
2 answers

Increase write speed in hive for ORC files

Currently an insert overwrite table T1 select * from T2; will take around 100 minutes in my cluster. Table T1 is ORC formatted and T2 is text formatted. I am reading a 60 GB of text data from T2 and inserting into ORC table T1(10 GB after…
Despicable me
  • 548
  • 1
  • 9
  • 24
3
votes
1 answer

How to get whether the table is partitioned by dynamic or static in hive

Trying to find the list of tables have the dynamic partition in hive , Tried the following command and not getting the clue to find the way, Commands tried show partitions describe formatted
William R
  • 739
  • 2
  • 13
  • 34
3
votes
1 answer

How to echo a line while executing hive queries from files using beeline

I have a hive query that has an echo command to print something. Below is a sample HQL file !echo 'Total records'; use testDB; select count(*) from tempTable; After executing the query from hive using the command hive -f sample.hql > op.txt I would…
Alex Raj Kaliamoorthy
  • 2,035
  • 3
  • 29
  • 46
1
2
3
18 19