如何在Apache Flink作业中获取System.getProperties()

时间:2018-11-09 14:50:38

标签: apache-flink flink-streaming

我正在运行由3个服务器组成的flink独立群集。我在这个文件flink-1.6.0 / conf / flink-conf.yaml

的3个节点上添加了“ env.java.opts:'-Dmykey = 1000'”此设置。

当我检查Java程序时,可以看到此参数传递给TaskManager和JobManager

caption {
    font-size: 15px;
}

table {
    font-family: arial, sans-serif;
    border-collapse: collapse;
    border-spacing: none;
    width: 100%;
}


td,
th {
    border-collapse: collapse;
    text-align: center;
}

th {
    border: 1px solid black;
    padding: 8px;
}

td {
    padding: none;
    border: 1px solid black;
}
table table th, table table td {
  border: none;
}

table table tr:first-child td:nth-child(2) {
  border: 1px solid red;
}

td .celltable tr td{
    border:none;
}
table tr td  .celltable > tr:first-child td:nth-child(2) {
    border-collapse: collapse;
    border: 8px solid black;

} 

当我尝试打印所有属性(迭代System.getProperties())时,无法获取自定义属性。

我有一些使用属性文件来获取外部信息的库,我无法更改我的库,而使它们使用ParameterTools。我做了很多事情,但仍然无法解决。有什么建议吗?

0 个答案:

没有答案
相关问题