Java Code Examples for org.apache.flink.runtime.clusterframework.ContainerSpecification#getArtifacts()

The following examples show how to use org.apache.flink.runtime.clusterframework.ContainerSpecification#getArtifacts() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LaunchableMesosWorker.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
/**
 * Configures an artifact server to serve the artifacts associated with a container specification.
 * @param server the server to configure.
 * @param container the container with artifacts to serve.
 * @throws IOException if the artifacts cannot be accessed.
 */
static void configureArtifactServer(MesosArtifactServer server, ContainerSpecification container) throws IOException {
	// serve the artifacts associated with the container environment
	for (ContainerSpecification.Artifact artifact : container.getArtifacts()) {
		server.addPath(artifact.source, artifact.dest);
	}
}
 
Example 2
Source File: ContainerOverlayTestBase.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
/**
 * Check that an artifact exists for the given remote path.
    */
protected static ContainerSpecification.Artifact checkArtifact(ContainerSpecification spec, Path remotePath) {
	for(ContainerSpecification.Artifact artifact : spec.getArtifacts()) {
		if(remotePath.equals(artifact.dest)) {
			return artifact;
		}
	}
	throw new AssertionError("no such artifact (" + remotePath + ")");
}
 
Example 3
Source File: LaunchableMesosWorker.java    From flink with Apache License 2.0 5 votes vote down vote up
/**
 * Configures an artifact server to serve the artifacts associated with a container specification.
 * @param server the server to configure.
 * @param container the container with artifacts to serve.
 * @throws IOException if the artifacts cannot be accessed.
 */
static void configureArtifactServer(MesosArtifactServer server, ContainerSpecification container) throws IOException {
	// serve the artifacts associated with the container environment
	for (ContainerSpecification.Artifact artifact : container.getArtifacts()) {
		server.addPath(artifact.source, artifact.dest);
	}
}
 
Example 4
Source File: ContainerOverlayTestBase.java    From flink with Apache License 2.0 5 votes vote down vote up
/**
 * Check that an artifact exists for the given remote path.
    */
protected static ContainerSpecification.Artifact checkArtifact(ContainerSpecification spec, Path remotePath) {
	for(ContainerSpecification.Artifact artifact : spec.getArtifacts()) {
		if(remotePath.equals(artifact.dest)) {
			return artifact;
		}
	}
	throw new AssertionError("no such artifact (" + remotePath + ")");
}
 
Example 5
Source File: LaunchableMesosWorker.java    From flink with Apache License 2.0 5 votes vote down vote up
/**
 * Configures an artifact server to serve the artifacts associated with a container specification.
 * @param server the server to configure.
 * @param container the container with artifacts to serve.
 * @throws IOException if the artifacts cannot be accessed.
 */
static void configureArtifactServer(MesosArtifactServer server, ContainerSpecification container) throws IOException {
	// serve the artifacts associated with the container environment
	for (ContainerSpecification.Artifact artifact : container.getArtifacts()) {
		server.addPath(artifact.source, artifact.dest);
	}
}
 
Example 6
Source File: ContainerOverlayTestBase.java    From flink with Apache License 2.0 5 votes vote down vote up
/**
 * Check that an artifact exists for the given remote path.
    */
protected static ContainerSpecification.Artifact checkArtifact(ContainerSpecification spec, Path remotePath) {
	for(ContainerSpecification.Artifact artifact : spec.getArtifacts()) {
		if(remotePath.equals(artifact.dest)) {
			return artifact;
		}
	}
	throw new AssertionError("no such artifact (" + remotePath + ")");
}