Support Questions

Find answers, ask questions, and share your expertise

Impala shell error

avatar
Contributor

Hi ,

 

im unable to connect impala shell ( kerberised cluster ) with below: command  on Edge node 

impala-shell -i hostname.abc.com -d default -k

case scenario :  we have two Edge node A and B , able to connect on edgenode A  and unable to connect on edgenode  B with same credentials. checked with different user is it also same as working  on Edge node A and edgenode B . 

observed that both have different python version  A has 2.7.5 as default and B has 3.7.0 is this the cause of connection , if yes how to rectify. 

ERROR screenshot shared.

 


shell error.jpg
1 ACCEPTED SOLUTION

avatar
Contributor

Hi Vidya , 

 

Issue has been resolved by setting path : 

export PATH=/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin:/usr/bin/python2:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/opt/anaconda3/bin:/opt/anaconda3/condabin

 

 

View solution in original post

11 REPLIES 11

avatar
Expert Contributor

Hello Syed,

 

Yes, the impala is compatible with Python version 2.7.5.

 

 

avatar
Expert Contributor

You can try the below steps in edge node B

virtualenv venv -p python2

cd venv

source bin/activate

(venv) impala-shell

avatar
Contributor

Thanks for the solution , every time i have to come in venv and run impala shell ? or it will work without venv !!

 

avatar
Expert Contributor

Yes, you need to switch to venv everytime or you need to reinstall python with the 2.7.5 version.

avatar
Contributor

How to fix it permanently that default to  python2.7.5 and impala shell to be work ?

avatar
Expert Contributor

For a permanent fix, you need to install the python version 2.7.5.

avatar
Contributor

Python 2.7.5 is already installed and multiple version are available tried to set path but not working , any alternate solution.. .!!!

 

 

avatar
Contributor

Hi,

Me sharing below line from bashrc of a particular user 

# .bashrc

export PYSPARK_DRIVER_PYTHON="jupyter"
export PYSPARK_DRIVER_PYTHON_OPTS="notebook"
export SPARK_HOME="/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/spark/"
export PATH="$PATH:/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/"

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

# >>> conda initialize >>>

# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/opt/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/opt/anaconda3/etc/profile.d/conda.sh" ]; then
. "/opt/anaconda3/etc/profile.d/conda.sh"
else

export PATH="/opt/anaconda3/bin:$PATH"
export PATH="/opt/anaconda3/condabin:$PATH"
fi
fi
unset __conda_setup

# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=

# User specific aliases and functions
alias python=/usr/bin/python2
export PYSPARK_PYTHON=/usr/src/Python-3.7.0/python

but still im getting same error 

Thanks,

Syed

avatar
Master Collaborator

Hello Syed,

 

Can you try the alternatives command to change the python version? Check the below link.

https://medium.com/coderlist/how-to-change-default-python-version-on-linux-fedora-28-c22da18bdd6

 

Regards,

Chethan YM