修改oozie action node name的长度限制
2013-08-21 11:01
465 查看
在使用oozie的过程中,可能会遇到如下问题:
E0724: Invalid node name, name [your action node name] must be 50 chars or less
可是去mysql里查看表结构,发现WF_ACTIONS表的name字段长度是varchar(255),于是去查看源代码,发现在core包里的ParamChecker类里有这样一个方法被LiteWorkflowAppParser类调用了
这里的MAX_NODE_NAME_LEN被写死了50, 于是修改成100重新编译打包,打包时最好跳过测试,mvn install -Dmaven.test.skip=true
打好包之后把 oozie-core-xxx.jar包拷到oozie的安装目录覆盖掉原jar包,重启oozie即可
E0724: Invalid node name, name [your action node name] must be 50 chars or less
可是去mysql里查看表结构,发现WF_ACTIONS表的name字段长度是varchar(255),于是去查看源代码,发现在core包里的ParamChecker类里有这样一个方法被LiteWorkflowAppParser类调用了
private static final int MAX_NODE_NAME_LEN = 50; /** * Check that the given string is a valid action name [a-zA-Z_][0-9a-zA-Z_\-]* and not longer than 50 chars. * * @param actionName string to validate is a token. * @return the given string. */ public static String validateActionName(String actionName) { ParamChecker.notEmpty(actionName, "action name"); if (actionName.length() > MAX_NODE_NAME_LEN) { throw new IllegalArgumentException(XLog.format("name [{0}] must be {1} chars or less", actionName, MAX_NODE_NAME_LEN)); } char c = actionName.charAt(0); if (!(c >= 'A' && c <= 'Z') && !(c >= 'a' && c <= 'z') && !(c == '_')) { throw new IllegalArgumentException(XLog.format("name [{0}], must start with [A-Za-z_]", actionName)); } for (int i = 1; i < actionName.length(); i++) { c = actionName.charAt(i); if (!(c >= '0' && c <= '9') && !(c >= 'A' && c <= 'Z') && !(c >= 'a' && c <= 'z') && !(c == '_' || c == '-')) { throw new IllegalArgumentException(XLog.format("name [{0}] must be [A-Za-z_][0-9A-Za-z_]*", actionName)); } } return actionName; }
这里的MAX_NODE_NAME_LEN被写死了50, 于是修改成100重新编译打包,打包时最好跳过测试,mvn install -Dmaven.test.skip=true
打好包之后把 oozie-core-xxx.jar包拷到oozie的安装目录覆盖掉原jar包,重启oozie即可
相关文章推荐
- Discuz!论坛运营之修改帖子10000字节长度限制最大字数的方法
- 修改dede标题长度限制 改此参数后…
- UITextField限制输入长度,修改placeholder颜色和大小
- SQL 语句 最大长度限制 DB2如何修改最大长度限制
- 修改数据库中group_concat的返回结果的长度限制
- 如何修改Mysql中group_concat的长度限制
- {dede:field name="title"/} 长度限制
- Discuz3.2版本 修改注册用户名长度限制
- 修改UCenter用户名长度限制的方法
- AIX修改用户名和密码长度限制
- Dedecms5.7修改TAG、title、keywords及栏目名称长度限制
- 修改Mysql索引长度限制
- DedeCMSv5.7 tag标签长度限制12字节修改方法
- dede5.7 标题长度限制修改
- dedecms 文章标题 产品名称 长度不受限制 终极修改
- Discuze修改用户名长度限制
- dede限制标题长度加省略号的修改方法
- dedecms 文章标题 产品名称 长度不受限制 终极修改
- 数组实现的队列(限制最大长度)的head、tail指针的修改方法。
- dedecms 文章标题 产品名称 长度不受限制 终极修改