Codota Logo
FileChannel$Instance.addGivenOrTempPath
Code IndexAdd Codota to your IDE (free)

How to use
addGivenOrTempPath
method
in
org.qcri.rheem.basic.channels.FileChannel$Instance

Best Java code snippets using org.qcri.rheem.basic.channels.FileChannel$Instance.addGivenOrTempPath (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
origin: org.qcri.rheem/rheem-java

final String path = output.addGivenOrTempPath(this.targetPath, javaExecutor.getCompiler().getConfiguration());
final FileSystem fileSystem = FileSystems.getFileSystem(path).orElseThrow(
    () -> new IllegalStateException(String.format("No file system found for \"%s\".", this.targetPath))
origin: org.qcri.rheem/rheem-java

final String path = output.addGivenOrTempPath(this.targetPath, javaExecutor.getCompiler().getConfiguration());
origin: org.qcri.rheem/rheem-spark

@Override
public Tuple<Collection<ExecutionLineageNode>, Collection<ChannelInstance>> evaluate(
    ChannelInstance[] inputs,
    ChannelInstance[] outputs,
    SparkExecutor sparkExecutor,
    OptimizationContext.OperatorContext operatorContext) {
  assert inputs.length == this.getNumInputs();
  assert outputs.length <= 1;
  final FileChannel.Instance output = (FileChannel.Instance) outputs[0];
  final String targetPath = output.addGivenOrTempPath(this.targetPath, sparkExecutor.getConfiguration());
  RddChannel.Instance input = (RddChannel.Instance) inputs[0];
  input.provideRdd()
      .coalesce(1) // TODO: Remove. This only hotfixes the issue that JavaObjectFileSource reads only a single file.
      .saveAsObjectFile(targetPath);
  LoggerFactory.getLogger(this.getClass()).info("Writing dataset to {}.", targetPath);
  return ExecutionOperator.modelEagerExecution(inputs, outputs, operatorContext);
}
origin: org.qcri.rheem/rheem-spark

@Override
public Tuple<Collection<ExecutionLineageNode>, Collection<ChannelInstance>> evaluate(
    ChannelInstance[] inputs,
    ChannelInstance[] outputs,
    SparkExecutor sparkExecutor,
    OptimizationContext.OperatorContext operatorContext) {
  assert inputs.length == this.getNumInputs();
  final FileChannel.Instance output = (FileChannel.Instance) outputs[0];
  final String targetPath = output.addGivenOrTempPath(this.targetPath, sparkExecutor.getConfiguration());
  final RddChannel.Instance input = (RddChannel.Instance) inputs[0];
  final JavaRDD<Object> rdd = input.provideRdd();
  final JavaRDD<String> serializedRdd = rdd
      .map(dataQuantum -> {
        // TODO: Once there are more tuple types, make this generic.
        @SuppressWarnings("unchecked")
        Tuple2<Object, Object> tuple2 = (Tuple2<Object, Object>) dataQuantum;
        return String.valueOf(tuple2.field0) + '\t' + String.valueOf(tuple2.field1);
      });
  this.name(serializedRdd);
  serializedRdd
      .coalesce(1) // TODO: Allow more than one TSV file?
      .saveAsTextFile(targetPath);
  return ExecutionOperator.modelEagerExecution(inputs, outputs, operatorContext);
}
org.qcri.rheem.basic.channelsFileChannel$InstanceaddGivenOrTempPath

Popular methods of FileChannel$Instance

  • getSinglePath
    If there is only a single element on #getPaths(), retrieves it. Otherwise, fails.
  • <init>
    Creates a new instance.
  • addPath
  • generateTempPath
  • getLineage
  • wasProduced

Popular in Java

  • Reactive rest calls using spring rest template
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getSystemService (Context)
  • onCreateOptionsMenu (Activity)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Vector (java.util)
    The Vector class implements a growable array of objects. Like an array, it contains components that
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now