Updated on 2022-12-14 GMT+08:00

Submitting an Email Job

Scenario

This section describes how to add an email job on the Hue web UI.

Procedure

  1. Log in to Manager, choose Cluster > Name of the desired cluster > Services > Oozie > Configurations, switch from Basic Configurations to All Configurations, and search for the oozie.site.configs parameter.

  2. Add the following parameters and click Save. In the displayed dialog box, click OK.

    Table 1 Parameters

    Name

    Value

    oozie.email.smtp.host

    SMTP server, for example, xxx.xxx.com.

    oozie.email.from.address

    Sender email address, for example, zhangsan@xx.com.

    oozie.email.smtp.auth

    true

    oozie.email.smtp.username

    Sender account, for example, zhangsan.

    oozie.email.smtp.password

    Sender account password, for example, 111111.

    oozie.email.attachment.enabled

    true

    oozie.email.smtp.port

    SMTP server port number, for example, 25.

  3. On the Oozie dashboard page, choose More > Restart Service, enter the administrator password, and click OK to restart the Oozie service.
  4. Log in to the Hue web UI. For details, see Accessing the Hue Web UI.
  5. In the navigation tree on the left, click and choose Workflow to open the Workflow editor.
  6. Click Documents, click to select a Hive script from the operation list, and drag it to the operation page.

  7. In the displayed dialog box, configure To addresses, Subject, and Body, and click Add.

    • To addresses: specifies the recipient email address. Separate multiple email addresses with commas (,).
    • Subject: specifies the email subject.
    • Body: specifies the email body.

  8. You can configure cc, bcc, and Attachment in the displayed dialog box based on service requirements.

    • cc: specifies the address that will receive the carbon copy of the email. Separate multiple email addresses with commas (,).
    • bcc: specifies the address that will receive the carbon copy of the email and is invisible to the recipient. Separate multiple email addresses with commas (,).
    • Attachment: specifies the HDFS address of the attachment.

  9. Click in the upper right corner of the Oozie editor to save the job.
  10. After the job is saved, click . In the displayed dialog box, click Submit to submit the job.

    After the job is submitted, you can view the related contents of the job, such as the detailed information, logs, and processes, on the Hue web UI.