Tabnine Logo
ContainerSpecification$Artifact
Code IndexAdd Tabnine to your IDE (free)

How to use
ContainerSpecification$Artifact
in
org.apache.flink.runtime.clusterframework

Best Java code snippets using org.apache.flink.runtime.clusterframework.ContainerSpecification$Artifact (Showing top 20 results out of 315)

origin: com.alibaba.blink/flink-runtime

@Override
public void configure(ContainerSpecification container) throws IOException {
  if(hadoopConfDir == null) {
    return;
  }
  File coreSitePath = new File(hadoopConfDir, "core-site.xml");
  File hdfsSitePath = new File(hadoopConfDir, "hdfs-site.xml");
  container.getEnvironmentVariables().put("HADOOP_CONF_DIR", TARGET_CONF_DIR.toString());
  container.getDynamicConfiguration().setString(ConfigConstants.PATH_HADOOP_CONFIG, TARGET_CONF_DIR.toString());
  container.getArtifacts().add(ContainerSpecification.Artifact
    .newBuilder()
    .setSource(new Path(coreSitePath.toURI()))
    .setDest(new Path(TARGET_CONF_DIR, coreSitePath.getName()))
    .setCachable(true)
    .build());
  container.getArtifacts().add(ContainerSpecification.Artifact
    .newBuilder()
    .setSource(new Path(hdfsSitePath.toURI()))
    .setDest(new Path(TARGET_CONF_DIR, hdfsSitePath.getName()))
    .setCachable(true)
    .build());
}
origin: org.apache.flink/flink-runtime_2.10

@Override
public void configure(ContainerSpecification container) throws IOException {
  if(hadoopConfDir == null) {
    return;
  }
  File coreSitePath = new File(hadoopConfDir, "core-site.xml");
  File hdfsSitePath = new File(hadoopConfDir, "hdfs-site.xml");
  container.getEnvironmentVariables().put("HADOOP_CONF_DIR", TARGET_CONF_DIR.toString());
  container.getDynamicConfiguration().setString(ConfigConstants.PATH_HADOOP_CONFIG, TARGET_CONF_DIR.toString());
  container.getArtifacts().add(ContainerSpecification.Artifact
    .newBuilder()
    .setSource(new Path(coreSitePath.toURI()))
    .setDest(new Path(TARGET_CONF_DIR, coreSitePath.getName()))
    .setCachable(true)
    .build());
  container.getArtifacts().add(ContainerSpecification.Artifact
    .newBuilder()
    .setSource(new Path(hdfsSitePath.toURI()))
    .setDest(new Path(TARGET_CONF_DIR, hdfsSitePath.getName()))
    .setCachable(true)
    .build());
}
origin: org.apache.flink/flink-runtime_2.11

@Override
public void configure(ContainerSpecification container) throws IOException {
  if(hadoopConfDir == null) {
    return;
  }
  File coreSitePath = new File(hadoopConfDir, "core-site.xml");
  File hdfsSitePath = new File(hadoopConfDir, "hdfs-site.xml");
  container.getEnvironmentVariables().put("HADOOP_CONF_DIR", TARGET_CONF_DIR.toString());
  container.getDynamicConfiguration().setString(ConfigConstants.PATH_HADOOP_CONFIG, TARGET_CONF_DIR.toString());
  container.getArtifacts().add(ContainerSpecification.Artifact
    .newBuilder()
    .setSource(new Path(coreSitePath.toURI()))
    .setDest(new Path(TARGET_CONF_DIR, coreSitePath.getName()))
    .setCachable(true)
    .build());
  container.getArtifacts().add(ContainerSpecification.Artifact
    .newBuilder()
    .setSource(new Path(hdfsSitePath.toURI()))
    .setDest(new Path(TARGET_CONF_DIR, hdfsSitePath.getName()))
    .setCachable(true)
    .build());
}
origin: org.apache.flink/flink-runtime

@Override
public void configure(ContainerSpecification container) throws IOException {
  if(hadoopConfDir == null) {
    return;
  }
  File coreSitePath = new File(hadoopConfDir, "core-site.xml");
  File hdfsSitePath = new File(hadoopConfDir, "hdfs-site.xml");
  container.getEnvironmentVariables().put("HADOOP_CONF_DIR", TARGET_CONF_DIR.toString());
  container.getDynamicConfiguration().setString(ConfigConstants.PATH_HADOOP_CONFIG, TARGET_CONF_DIR.toString());
  container.getArtifacts().add(ContainerSpecification.Artifact
    .newBuilder()
    .setSource(new Path(coreSitePath.toURI()))
    .setDest(new Path(TARGET_CONF_DIR, coreSitePath.getName()))
    .setCachable(true)
    .build());
  container.getArtifacts().add(ContainerSpecification.Artifact
    .newBuilder()
    .setSource(new Path(hdfsSitePath.toURI()))
    .setDest(new Path(TARGET_CONF_DIR, hdfsSitePath.getName()))
    .setCachable(true)
    .build());
}
origin: org.apache.flink/flink-runtime_2.10

@Override
public void configure(ContainerSpecification container) throws IOException {
  if(keystore != null) {
    container.getArtifacts().add(ContainerSpecification.Artifact.newBuilder()
      .setSource(keystore)
      .setDest(TARGET_KEYSTORE_PATH)
      .setCachable(false)
      .build());
    container.getDynamicConfiguration().setString(ConfigConstants.SECURITY_SSL_KEYSTORE, TARGET_KEYSTORE_PATH.getPath());
  }
  if(truststore != null) {
    container.getArtifacts().add(ContainerSpecification.Artifact.newBuilder()
      .setSource(truststore)
      .setDest(TARGET_TRUSTSTORE_PATH)
      .setCachable(false)
      .build());
    container.getDynamicConfiguration().setString(ConfigConstants.SECURITY_SSL_TRUSTSTORE, TARGET_TRUSTSTORE_PATH.getPath());
  }
}
origin: com.alibaba.blink/flink-runtime

@Override
public void configure(ContainerSpecification container) throws IOException {
  if(keystore != null) {
    container.getArtifacts().add(ContainerSpecification.Artifact.newBuilder()
      .setSource(keystore)
      .setDest(TARGET_KEYSTORE_PATH)
      .setCachable(false)
      .build());
    container.getDynamicConfiguration().setString(SecurityOptions.SSL_KEYSTORE, TARGET_KEYSTORE_PATH.getPath());
  }
  if(truststore != null) {
    container.getArtifacts().add(ContainerSpecification.Artifact.newBuilder()
      .setSource(truststore)
      .setDest(TARGET_TRUSTSTORE_PATH)
      .setCachable(false)
      .build());
    container.getDynamicConfiguration().setString(SecurityOptions.SSL_TRUSTSTORE, TARGET_TRUSTSTORE_PATH.getPath());
  }
}
origin: org.apache.flink/flink-runtime_2.11

@Override
public void configure(ContainerSpecification container) throws IOException {
  if(keystore != null) {
    container.getArtifacts().add(ContainerSpecification.Artifact.newBuilder()
      .setSource(keystore)
      .setDest(TARGET_KEYSTORE_PATH)
      .setCachable(false)
      .build());
    container.getDynamicConfiguration().setString(SecurityOptions.SSL_KEYSTORE, TARGET_KEYSTORE_PATH.getPath());
  }
  if(truststore != null) {
    container.getArtifacts().add(ContainerSpecification.Artifact.newBuilder()
      .setSource(truststore)
      .setDest(TARGET_TRUSTSTORE_PATH)
      .setCachable(false)
      .build());
    container.getDynamicConfiguration().setString(SecurityOptions.SSL_TRUSTSTORE, TARGET_TRUSTSTORE_PATH.getPath());
  }
}
origin: org.apache.flink/flink-runtime

@Override
public void configure(ContainerSpecification container) throws IOException {
  if(keystore != null) {
    container.getArtifacts().add(ContainerSpecification.Artifact.newBuilder()
      .setSource(keystore)
      .setDest(TARGET_KEYSTORE_PATH)
      .setCachable(false)
      .build());
    container.getDynamicConfiguration().setString(SecurityOptions.SSL_KEYSTORE, TARGET_KEYSTORE_PATH.getPath());
  }
  if(truststore != null) {
    container.getArtifacts().add(ContainerSpecification.Artifact.newBuilder()
      .setSource(truststore)
      .setDest(TARGET_TRUSTSTORE_PATH)
      .setCachable(false)
      .build());
    container.getDynamicConfiguration().setString(SecurityOptions.SSL_TRUSTSTORE, TARGET_TRUSTSTORE_PATH.getPath());
  }
}
origin: org.apache.flink/flink-runtime_2.10

  @Override
  public FileVisitResult visitFile(java.nio.file.Path file, BasicFileAttributes attrs) throws IOException {
    java.nio.file.Path relativePath = sourceRoot.relativize(file);
    ContainerSpecification.Artifact.Builder artifact = ContainerSpecification.Artifact.newBuilder()
      .setSource(new Path(file.toUri()))
      .setDest(new Path(targetPath, relativePath.toString()))
      .setExecutable(Files.isExecutable(file))
      .setCachable(true)
      .setExtract(false);
    env.getArtifacts().add(artifact.build());
    return super.visitFile(file, attrs);
  }
});
origin: org.apache.flink/flink-runtime

  public Artifact build() {
    return new Artifact(source, dest, executable, cachable, extract);
  }
}
origin: com.alibaba.blink/flink-runtime

  @Override
  public FileVisitResult visitFile(java.nio.file.Path file, BasicFileAttributes attrs) throws IOException {
    java.nio.file.Path relativePath = sourceRoot.relativize(file);
    ContainerSpecification.Artifact.Builder artifact = ContainerSpecification.Artifact.newBuilder()
      .setSource(new Path(file.toUri()))
      .setDest(new Path(targetPath, relativePath.toString()))
      .setExecutable(Files.isExecutable(file))
      .setCachable(true)
      .setExtract(false);
    env.getArtifacts().add(artifact.build());
    return super.visitFile(file, attrs);
  }
});
origin: com.alibaba.blink/flink-runtime

  public Artifact build() {
    return new Artifact(source, dest, executable, cachable, extract);
  }
}
origin: org.apache.flink/flink-runtime_2.11

  @Override
  public FileVisitResult visitFile(java.nio.file.Path file, BasicFileAttributes attrs) throws IOException {
    java.nio.file.Path relativePath = sourceRoot.relativize(file);
    ContainerSpecification.Artifact.Builder artifact = ContainerSpecification.Artifact.newBuilder()
      .setSource(new Path(file.toUri()))
      .setDest(new Path(targetPath, relativePath.toString()))
      .setExecutable(Files.isExecutable(file))
      .setCachable(true)
      .setExtract(false);
    env.getArtifacts().add(artifact.build());
    return super.visitFile(file, attrs);
  }
});
origin: org.apache.flink/flink-runtime_2.10

  public Artifact build() {
    return new Artifact(source, dest, executable, cachable, extract);
  }
}
origin: org.apache.flink/flink-runtime

  @Override
  public FileVisitResult visitFile(java.nio.file.Path file, BasicFileAttributes attrs) throws IOException {
    java.nio.file.Path relativePath = sourceRoot.relativize(file);
    ContainerSpecification.Artifact.Builder artifact = ContainerSpecification.Artifact.newBuilder()
      .setSource(new Path(file.toUri()))
      .setDest(new Path(targetPath, relativePath.toString()))
      .setExecutable(Files.isExecutable(file))
      .setCachable(true)
      .setExtract(false);
    env.getArtifacts().add(artifact.build());
    return super.visitFile(file, attrs);
  }
});
origin: org.apache.flink/flink-runtime_2.11

  public Artifact build() {
    return new Artifact(source, dest, executable, cachable, extract);
  }
}
origin: com.alibaba.blink/flink-runtime

@Override
public void configure(ContainerSpecification container) throws IOException {
  if(krb5Conf != null) {
    container.getArtifacts().add(ContainerSpecification.Artifact.newBuilder()
      .setSource(krb5Conf)
      .setDest(TARGET_PATH)
      .setCachable(true)
      .build());
    container.getSystemProperties().setString(JAVA_SECURITY_KRB5_CONF, TARGET_PATH.getPath());
  }
}
origin: org.apache.flink/flink-runtime_2.10

@Override
public void configure(ContainerSpecification container) throws IOException {
  if(keytab != null) {
    container.getArtifacts().add(ContainerSpecification.Artifact.newBuilder()
      .setSource(keytab)
      .setDest(TARGET_PATH)
      .setCachable(false)
      .build());
    container.getDynamicConfiguration().setString(SecurityOptions.KERBEROS_LOGIN_KEYTAB, TARGET_PATH.getPath());
  }
}
origin: com.alibaba.blink/flink-runtime

@Override
public void configure(ContainerSpecification container) throws IOException {
  if(keytab != null) {
    container.getArtifacts().add(ContainerSpecification.Artifact.newBuilder()
      .setSource(keytab)
      .setDest(TARGET_PATH)
      .setCachable(false)
      .build());
    container.getDynamicConfiguration().setString(SecurityOptions.KERBEROS_LOGIN_KEYTAB, TARGET_PATH.getPath());
  }
}
origin: org.apache.flink/flink-runtime

@Override
public void configure(ContainerSpecification container) throws IOException {
  if(krb5Conf != null) {
    container.getArtifacts().add(ContainerSpecification.Artifact.newBuilder()
      .setSource(krb5Conf)
      .setDest(TARGET_PATH)
      .setCachable(true)
      .build());
    container.getSystemProperties().setString(JAVA_SECURITY_KRB5_CONF, TARGET_PATH.getPath());
  }
}
org.apache.flink.runtime.clusterframeworkContainerSpecification$Artifact

Javadoc

An artifact to be copied into the container.

Most used methods

  • <init>
  • newBuilder

Popular in Java

  • Updating database using SQL prepared statement
  • getResourceAsStream (ClassLoader)
  • getExternalFilesDir (Context)
  • setRequestProperty (URLConnection)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • JPanel (javax.swing)
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now