Enabling browsing Ozone from Hue on Cloudera Data Warehouse

Hue can read and write files on the Ozone filesystem, similar to S3 or ADLS. To access Ozone from Hue, you must add the necessary configurations in the hue-safety-valve within the Virtual Warehouse configurations.

You can perform this task on any Hue instances of any environment in which you want to enable the Ozone File Browser. If multiple Hue instances exist within the same cluster, completing this task on one instance per environment is sufficient.
  • Ensure that the Ozone HttpFS Gateway role is running in a healthy state.
  • Go to Cloudera Manager > Ozone > Configuration and add the following entries in the HttpFS Gateway Advanced Configuration Snippet (Safety Valve) for ozone-conf/httpfs-site.xml field:
    Field name Value
    Name httpfs.proxyuser.[***PRINCIPAL-NAME***].hosts
    Value *
    Name httpfs.proxyuser.[***PRINCIPAL-NAME***].groups
    Value *

    Replace the [***PRINCIPAL-NAME***] with the actual Kerberos principal name. The hive principal is the default principal required for communication between Ozone and Hue. If this principal name is changed during installation (e.g., to a custom principal for the Hive service), use that modified principal name here instead.

  • Obtain the following values from the Ozone service. You need it to construct the fs_defaultfs and webhdfs_url URLs:
    • HttpFS Gateway host name (Gateway node)
    • Ozone HttpFS Gateway TTP Web UI Port (ozone.httpfs.http-port)

      The default port is 9778. Ensure that the port used by the Ozone HttpFS Gateway (or any other configured port for that HttpFS instance) is accessible from the Hue node to the Gateway node where the Ozone HttpFS Gateway is installed.

    • Ozone Service ID (ozone.service.id).
  1. Log in to the Cloudera Data Warehouse service as DWAdmin.
  2. Go to Virtual Warehouse > > Edit > CONFIGURATIONS > Hue and select hue-safety-valve from the Configuration files drop-down menu. Add the following lines:
    [desktop]
    [[ozone]]
    [[[default]]]
    fs_defaultfs=ofs://[***SERVICE-ID***] \\This value is taken from the ozone.service.id parameter in the Ozone configuration
    webhdfs_url=https://[***OZONE-HTTPFS-HOST***]:[***OZONE-HTTPFS-PORT***]/webhdfs/v1 
    ssl_cert_ca_verify=true
    security_enabled=true
    If the cluster is not secured, set the webhdfs_url property to http.
    If Ozone is not configured in HA mode, then specify the URL for the Ozone manager in the fs_defaultfs property.
  3. Click Apply Changes.
  4. Log in to Hue as an Administrator on any one instance within the environment.
  5. Click your username in the lower-left corner of the interface, and select Administer Users.
  6. Navigate to the Groups tab, select the default group, and ensure filebrowser.ofs_access:Access to OFS from filebrowser and filepicker permission is selected.
  7. Click Update group to save the changes.
  8. Restart the Hue service.
After configuring the Hue safety valve and restarting the Virtual Warehouse, you may see that the Ozone file browser may take 10 - 15 minutes to display on the Hue web interface, as shown in the following image.