Beeline Custom Parameters Configuration Reference

Learn how to configure custom Beeline parameters using Cloudera Manager to adjust settings like null handling, header visibility, and verbosity for better control over query execution.

Overview

By default, beeline is configured with several options, such as:
  • --nullemptystring=false: Treats empty strings as NULL
  • --showHeader=true: Displays column headers in query results.
  • --verbose=false: Suppresses detailed client output logging.

To modify these default Beeline parameters (e.g., --nullemptystring=true, --showHeader=false, --verbose=true), you can make changes through Cloudera Manager. Additionally, you can add a custom HiveServer2 setting, for example, --hiveconf hive.server2.logging.operation.level=VERBOSE.

Steps to Modify Beeline Parameters

  • Log in to Cloudera Manager as an administrator.
  • Go to Clusters > Hive on Tez > Configuration
  • Search for Hive Gateway Client Environment Advanced Configuration Snippet (Safety Valve) for hive-env.sh
  • Click and set the values:
    Name: HIVE_OPTS
    Value: "--nullemptystring=true --showHeader=false --verbose=true --hiveconf hive.server2.logging.operation.level=VERBOSE ${HIVE_OPTS}"
    
  • Save the changes.
  • Redeploy the client configuration.

Results

  • Before the modification:
    $ beeline -e 'SELECT * FROM test_null_m;' -n hive -p hive
    ...
    +-----------------+-----------------+
    | test_null_m.c1  | test_null_m.c2  |
    +-----------------+-----------------+
    | 1               | one             |
    | 2               | NULL            |
    | 3               | NULL            |
    +-----------------+-----------------+
    3 rows selected (0.412 seconds)
  • After the modification:
    $ beeline -e 'SELECT * FROM test_null_m;' -n hive -p hive
    Executing command: SELECT * FROM test_null_m;
    going to print operations logs
    printed operations logs
    ...
    ---VERBOSE Server side logging, used for troubleshooting
    ...
    INFO  : Completed executing...
    INFO  : OK
    +-----------------+-----------------+
    | 1               | one             |
    | 2               |                 |
    | 3               |                 |
    +-----------------+-----------------+
    3 rows selected