flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From addisonj <...@git.apache.org>
Subject [GitHub] flink pull request #3481: [FLINK-5975] Add volume support to flink-mesos
Date Tue, 07 Mar 2017 21:57:18 GMT
Github user addisonj commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3481#discussion_r104790136
  
    --- Diff: flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/LaunchableMesosWorker.java
---
    @@ -262,9 +265,67 @@ public String toString() {
     			taskInfo.setContainer(containerInfo);
     		}
     
    +		containerInfo.addAllVolumes(volumes(params.containerVolumes()));
    +
     		return taskInfo.build();
     	}
     
    +	/**
    +	 * Used to build volume specs for mesos. This allows for mounting additional volumes
into a container
    +	 *
    +	 * @param containerVolumes a comma delimited optional string of [host_path:]container_path[:RO|RW]
that
    +	 *                         defines mount points for a container volume. If None or empty
string, returns
    +	 *                         an empty iterator
    +	 */
    +	public List<Protos.Volume> volumes(Option<String> containerVolumes) {
    +		if (containerVolumes.isEmpty()) {
    +			return new ArrayList<Protos.Volume>();
    +		}
    +		String[] specs = containerVolumes.get().split(",");
    +		List<Protos.Volume> vols = new ArrayList<Protos.Volume>();
    +		for (int i = 0; i < specs.length; i++) {
    --- End diff --
    
    scala has ruined me... I


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message