flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zentol <...@git.apache.org>
Subject [GitHub] flink pull request #6288: [FLINK-9703] [flink-mesos] Expose Prometheus port ...
Date Thu, 12 Jul 2018 14:46:25 GMT
Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/6288#discussion_r202062001
  
    --- Diff: flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/LaunchableMesosWorker.java
---
    @@ -332,6 +334,22 @@ public String toString() {
     		return taskInfo.build();
     	}
     
    +	/**
    +	 * Get port keys representing the TM's configured endpoints. This includes mandatory
TM endpoints such as
    +	 * data and rpc as well as optionally configured endpoints for services such as prometheus
reporter
    +	 *
    +	 * @return A deterministicly ordered Set of port keys to expose from the TM container
    +	 */
    +	private Set<String> getPortKeys() {
    +		LinkedHashSet<String> tmPortKeys = new LinkedHashSet<>(Arrays.asList(TM_PORT_KEYS));
    +		containerSpec.getDynamicConfiguration().keySet().stream()
    +			.filter(key -> key.endsWith(".port") || key.endsWith(".ports"))  // This matches
property naming convention
    --- End diff --
    
    You have to check the configured value as well, I know of at least one case where negative
ports are used to disable features (and we wouldn't want enable these again).
    Are there any use-cases where one might _not_ want mesos to provide the port?


---

Mime
View raw message