- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我正在尝试访问通过 oozie java 操作配置设置的属性,但我没有得到我正在寻找的值,想知道我是否可以获得任何帮助?
我的工作流程
...........
<action name="ref-record-load">
<java>
<configuration>
<property>
<name>oozie.launcher.mapred.child.java.opts</name>
<value>-Xmx4g -XX:MaxPermSize=256m</value>
</property>
<property>
<name>load.type</name>
<value>full</value>
</property>
</configuration>
.............
我正在尝试通过以下方式从我的代码中访问此属性
oozieConfigFile = System.getProperty("oozie.action.conf.xml");
final FileInputStream inputStream = new FileInputStream(oozieConfigFile);
final Properties oozieConfigProperties = new Properties();
oozieConfigProperties.loadFromXML(inputStream);
loadType = oozieConfigProperties.getProperty("load.type");
但我没有在 loadType 中看到任何值。我尝试访问该属性的方式有问题吗?
请帮忙
最佳答案
xml 文件在那里。但是它无法通过 loadFromXML() 加载。尝试使用 hadoop 配置类:
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
...
Configuration conf = new Configuration(false);
conf.addResource(new Path(System.getProperty("oozie.action.conf.xml")));
String loadType = conf.get("load.type")
...
它应该可以工作。
关于java - 无法从 oozie.action.conf.xml 检索属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28969637/
我正在尝试将 Oozie 数据库从 derby 迁移到 MySql。一切都运行良好,除非我尝试运行命令 ./oozie-setup.sh prepare-war 出现以下错误 setting CA
当我在 oozie 的 job.properties 中更改协调员作业的开始时间时,该作业不会采用更改后的时间,而是在旧的计划时间运行。 旧的job.properties: startMinute=0
我已经尝试过 oozie job -oozie http://sandbox.hortonworks.com:11000/oozie -config ./job.properties -kill *
当我尝试终止或暂停时,我在用户“runner”下提交了 oozie 协调员作业,我收到以下错误消息: [runner@hadooptools ~]$ oozie job -oozie http
如何自动重新运行工作流中失败的任何操作? 我知道从命令行或彻底的色调手动重新运行的方法。 $oozie job -rerun ... 我们可以在工作流中设置或提供任何参数以在操作失败时自动重试吗? 最
我对 oozie 有点陌生。我在我的服务器上安装了(使用 cdh 存储库)oozie(我遵循了 CDH4 文档 [我的 hadoop 在 cdh4 中运行])。 我已使用以下信息更新我的 core-s
在 oozie 中,input-events 非常简单,如果指定的文件/文件夹不存在,协调器作业将保持在 WAITING 状态。但我无法理解 output-events 的作用。 根据我的理解,在 o
我有一个 java 操作已暂停 5 天,处于此状态,我不知道 oozie 要我做什么。有什么想法吗? 最佳答案 这意味着有一个错误。如果您配置了重试,则可能会多次重试。配置重试后,在第一个错误之后,作
我的要求是在任何工作流操作失败的情况下终止或停止启动工作流的协调器。 wf:id 给出工作流的 ID。 协调有没有这样的功能?? 如果没有,请提出将坐标传递给工作流的方法。 最佳答案 您可以在协调器中
在我的 oozie coordinator.xml 中,我不想指定结束时间。 有没有办法做到这一点。 coordinator.xml hdfs://l
我在 Oozie 3.3.2 上运行 oozie 工作流时出现以下错误 Error: E0732 : E0732: Fork /Join[join1]不是成对的(join 应该是 [join2]) 现
我是 Oozie 的新手,只是想知道 - 如何使用 Oozie 安排 sqoop 作业。我知道可以将 sqoop 操作添加为 Oozie 工作流程的一部分。但是我怎样才能安排一个 sqoop 操作并让
我正在尝试运行 sh通过 Oozie 编写脚本,但我面临一个问题: Cannot run program "script.sh" (in directory "/mapred/local/taskTr
我可以在 Oozie 移动操作中使用通配符(例如 *)或文件模式(例如 {})吗? 我正在尝试将我的工作结果移动到存档目录中。 目录结构状态: output - 201304 - 201305 a
请记住,我是 oozie 的完全新手。我知道可以使用 arg 标签在 oozie 工作流 xml 中指定命令行参数。我想知道如何指定一个可选的命令行参数,以便 oozie 不会提示如果用户没有指定缺少
我可以使用 Hue 创建一个不会过期(没有结束日期)的无限 Oozie 协调器吗? 请帮忙! 最佳答案 没有。您不能创建一个永不过期的协调器。这是 Oozie Coordinator xsd引用:
我是 Oozie 的新手,我正在尝试安装和设置 Oozie。我按照 Apache 站点上提供的说明进行操作:“http://oozie.apache.org/docs/3.3.2/DG_QuickSt
我想知道是否有一种方法可以在不重启 oozie 作业(协调器)的情况下重新加载 oozie 作业的配置文件。 因为协调器实际上运行着我们的许多任务,所以有时我们可能只需要更改作业配置文件的一行,然后进
任何人都可以建议哪个最适合 Hadoop 的调度程序。如果是奥兹。 oozie 与 cron 工作有何不同。 最佳答案 Oozie 是最好的选择。 Oozie Coordinator 允许在文件到达
我正在编写一个 oozie java 操作,它在作业 ./lib 文件夹中的 jar 文件中包含我的自定义代码。 我还想在我的工作外部的文件夹中添加一个 jar 到类路径中(即 /home/me/ot
我是一名优秀的程序员,十分优秀!