Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/391.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 我们可以在oozie决策节点中使用参数吗?_Java_Hadoop_Oozie - Fatal编程技术网

Java 我们可以在oozie决策节点中使用参数吗?

Java 我们可以在oozie决策节点中使用参数吗?,java,hadoop,oozie,Java,Hadoop,Oozie,我试图在oozie 3.3.2中执行决策控制节点,但得到javax.servlet.jsp.el.ELException 遇到“{” ${fs:fileSize(${OutputDir}/000000\u 0)gt 100} 由于上述FS方法需要字符串输入,我应该如何以字符串格式传递参数?从 您需要传递硬编码,即封装在'中,如${fs:fileSize('/usr/foo/myinputdir'/1000)gt 10} 或 仅参数名${fs:fileSize(OutputDir/1000)

我试图在oozie 3.3.2中执行决策控制节点,但得到javax.servlet.jsp.el.ELException

遇到“{”


${fs:fileSize(${OutputDir}/000000\u 0)gt 100}

由于上述FS方法需要字符串输入,我应该如何以字符串格式传递参数?

您需要传递硬编码,即封装在
'
中,如
${fs:fileSize('/usr/foo/myinputdir'/1000)gt 10}

仅参数名
${fs:fileSize(OutputDir/1000)gt 10}


这个
OutputDir
可以在工作流的
部分或
.properties
文件中指定,或者在提交作业时使用
-D

传递。是的,您可以。事实上,您可以将多个参数与concat函数相结合(我认为这有助于解决原始海报的问题)

例如,如果${location}和${date}是配置文件中定义的两个参数:

<decision name="check-directory-exists">
     <switch>
        <case to="load-directory">
          <!-- check if the directory at this location for this date exists -->
          ${fs:exists(concat(location, date))}
        </case>
        <!-- The directory doesn't exist, there is nothing to do -->
        <default to="end" />
     </switch>
 </decision>

我已经这样做了。这篇论坛帖子建议它应该是有效的。我们可以像下面那样为阈值提供参数吗?我尝试了这个,但它不起作用。${fs:fileSize('/user/mytable')lt“${ThresholdSize}”@Satha我不确定,但是你能不能不用
$
符号试试?@Satha你能不能也这样试试?
${fs:fileSize('/user/mytable')lt ThresholdSize('/user/mytable')lt ThresholdSize*GB}?它就是这样工作的。谢谢Suvarna的帮助
<decision name="check-directory-exists">
     <switch>
        <case to="load-directory">
          <!-- check if the directory at this location for this date exists -->
          ${fs:exists(concat(location, date))}
        </case>
        <!-- The directory doesn't exist, there is nothing to do -->
        <default to="end" />
     </switch>
 </decision>
${fs:exists(concat(concat(location, "/"), date))}