Tabnine Logo
FileChannel$Instance.addGivenOrTempPath
Code IndexAdd Tabnine 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)

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

  • Making http post requests using okhttp
  • notifyDataSetChanged (ArrayAdapter)
  • setContentView (Activity)
  • setRequestProperty (URLConnection)
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • CodeWhisperer alternatives
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