How to Run Hue Shell Commands
You may need to administer Hue programmatically, for example, to reset the superuser password. This page addresses managed deployments of CDH 5.5 and higher.
- Gather the following information:
- Hue server database password (embedded or external).
- Path to /build/env/bin/hue:
# Parcels (e.g., /opt/cloudera/parcels/CDH-5.9.0-1.cdh5.9.0.p0.23/lib/hue) realpath /opt/cloudera/parcels/`ls -l /opt/cloudera/parcels | grep CDH | tail -1 | awk '{print $9}'`/lib/hue # Packages /usr/lib/hue
- Path to the current Hue process directory (with Hue configuration files):
#Example path: /var/run/cloudera-scm-agent/process/56-hue-HUE_SERVER/ realpath /var/run/cloudera-scm-agent/process/`ls -alrt /var/run/cloudera-scm-agent/process | grep HUE | tail -1 | awk '{print $9}'`
- Set HUE_CONF_DIR to the latest Hue process directory:
export HUE_CONF_DIR="/var/run/cloudera-scm-agent/process/`ls -alrt /var/run/cloudera-scm-agent/process | grep HUE | tail -1 | awk '{print $9}'`" echo $HUE_CONF_DIR
- Run shell subcommands
When true, HUE_IGNORE_PASSWORD_SCRIPT_ERRORS runs the Hue shell even if hue.ini contains passwords generated by Cloudera Manager (such as bind_password and ssl_password).
Note: Do not export HUE_IGNORE_PASSWORD_SCRIPT_ERRORS or HUE_DATABASE_PASSWORD to ensure that they are not stored and only apply to this command.
Parcels
- List available subcommands
HUE_IGNORE_PASSWORD_SCRIPT_ERRORS=1 HUE_DATABASE_PASSWORD=<db_password> /opt/cloudera/parcels/`ls -l /opt/cloudera/parcels | grep CDH | tail -1 | awk '{print $9}'`/lib/hue/build/env/bin/hue
- Run the interactive Hue Python shell (Ctrl+D to quit)
HUE_IGNORE_PASSWORD_SCRIPT_ERRORS=1 HUE_DATABASE_PASSWORD=<db_password> /opt/cloudera/parcels/`ls -l /opt/cloudera/parcels | grep CDH | tail -1 | awk '{print $9}'`/lib/hue/build/env/bin/hue shell
- Change a user password
HUE_IGNORE_PASSWORD_SCRIPT_ERRORS=1 HUE_DATABASE_PASSWORD=<db_password> /opt/cloudera/parcels/`ls -l /opt/cloudera/parcels | grep CDH | tail -1 | awk '{print $9}'`/lib/hue/build/env/bin/hue changepassword <username>
Packages- List available subcommands
HUE_IGNORE_PASSWORD_SCRIPT_ERRORS=1 HUE_DATABASE_PASSWORD=<db_password> /usr/lib/hue/build/env/bin/hue
- Run the interactive Hue Python shell (Ctrl+D to quit)
HUE_IGNORE_PASSWORD_SCRIPT_ERRORS=1 HUE_DATABASE_PASSWORD=<db_password> /usr/lib/hue/build/env/bin/hue shell
- Change a user password
HUE_IGNORE_PASSWORD_SCRIPT_ERRORS=1 HUE_DATABASE_PASSWORD=<db_password> /usr/lib/hue/build/env/bin/hue changepassword <username>
- List available subcommands
For unmanaged and lower CDH versions, see:
Page generated August 14, 2017.
<< How to Use S3 as Source or Sink in Hue | ©2016 Cloudera, Inc. All rights reserved | Hue Troubleshooting >> |
Terms and Conditions Privacy Policy |