If the Oracle database is used for Oozie, then you must update the
APP_PATH
column type to store values with more than 255 characters. This
ensures Oozie does not get stuck in PREP state when your application path exceeds the 255
character limit. If the APP_PATH
column type is not updated, then Oozie
fails to run the jobs with the following database error message Data too long
for column 'app_path'. This scenario is also applicable to coordinator and
bundle jobs. For database types other than Oracle, this update is not mandatory for using
Oozie. It works without the update if the APP_PATH
value does not exceed
255 characters. Also, Oozie's internal database schema validation fails with an unexpected
APP_PATH
column type. However, this validation does not have any effect.
It just logs it's result.
You must update the
APP_PATH
column type in the
WF_JOBS,
BUNDLE_JOBS, and
COORD_JOBS tables in the Oozie database for the following
conditions:
- When you use the Oracle database for Oozie
service.
- When you are upgrading Cloudera Runtime from earlier versions to Cloudera Base on premises 7.1.9 SP1 CHF1 version or later.
If you do not execute the following statements on the Oozie Oracle database, then the Oozie
service fails to run the jobs with a database persistence error. This update is not
mandatory, but highly recommended for other database types, such as MySQL, MariaDB, and
PostgreSQL, due to the internal database schema validation.
Examples:
- On the Oozie Oracle database - The following example uses the Oracle sqlplus
command-line
tool:
sqlplus <OOZIE_DB_USERNAME>@localhost/<SERVICE_NAME>
SQL> ALTER TABLE <TABLE_NAME> ADD (APP_PATH_TMP CLOB);
Table altered.
SQL> UPDATE <TABLE_NAME> SET APP_PATH_TMP = APP_PATH;
X rows updated.
SQL> ALTER TABLE <TABLE_NAME> DROP COLUMN APP_PATH;
Table altered.
SQL> ALTER TABLE <TABLE_NAME> RENAME COLUMN APP_PATH_TMP TO APP_PATH;
Table altered.
- On the Oozie MySQL database - The following example uses the MySQL mysql command-line
tool:
$ mysql -u root -p
Enter password:
mysql> use <OOZIE_DATABASE_NAME>;
Database changed
mysql> ALTER TABLE <TABLE_NAME> MODIFY COLUMN app_path text;
Query OK, X rows affected (0.03 sec)
Records: X Duplicates: 0 Warnings: 0
mysql> exit
Bye
- On the Oozie MariaDB database - The following example uses the MariaDB mysql
command-line tool:
$ mysql -u root -p
Enter password:
MariaDB [(none)]> use <OOZIE_DATABASE_NAME>;
Database changed
MariaDB [OOZIE_DATABASE_NAME]> ALTER TABLE <TABLE_NAME> MODIFY COLUMN app_path text;
Query OK, X rows affected (2.11 sec)
Records: X Duplicates: 0 Warnings: 0
MariaDB [OOZIE_DATABASE_NAME]> exit
Bye
- On the Oozie PostgreSQL database - The following example uses the PostgreSQL psql
command-line tool:
$ psql -U postgres
Password for user postgres: *****
postgres=# \c <OOZIE_DATABASE_NAME>;
You are now connected to database "<OOZIE_DATABASE_NAME>" as user "postgres".
OOZIE_DATABASE_NAME=# ALTER TABLE <TABLE_NAME> ALTER COLUMN app_path type text;
ALTER TABLE
OOZIE_DATABASE_NAME=# \q