Changing the Hadoop log directory

Add the HADOOP_LOG_DIR environment variable to the dse-env.sh file to recognize changes to the default log directory used by the Hadoop component that is integrated into DataStax Enterprise.

You must add the HADOOP_LOG_DIR environment variable to the dse-env.sh file to enable DataStax Enterpriseto recognize changes to the default log directory used by the Hadoop component integrated into DataStax Enterprise.

Note: If you change the default Hadoop log directory environment variable in hadoop-env.sh and restart DataStax Enterprise, the change is not recognized.

Procedure

  1. In the dse-env.sh file, comments describe where to add the command to configure the environment variable. For example:
    The default location of the dse-env.sh file depends on the type of installation:
    Installer-Services and Package installations /etc/dse/dse-env.sh
    Installer-No Services and Tarball installations install_location/bin/dse-env.sh
    #!/bin/sh
    
    # Add any environment overrides you need here. This is where users
    # may set third-party variables such as HADOOP_LOG_DIR
    
    export HADOOP_LOG_DIR=/var/log/hadoop/new_log_location
    
    # ==================================
    # don't change after this.
    if [ -r "`dirname "$0"`/dse.in.sh" ]; then
    . . .
  2. Restart DataStax Enterprise after configuring the new log location.

    In a packaged installation, DataStax Enterprise loads the environment variable change using /usr/share/dse/dse.in.sh after you restart the node.