congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
BasicOutputFormatProvider.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
co.cask.cdap.internal.app.runtime.batch.BasicOutputFormatProvider
constructor

Best Java code snippets using co.cask.cdap.internal.app.runtime.batch.BasicOutputFormatProvider.<init> (Showing top 3 results out of 315)

origin: cdapio/cdap

 private static OutputFormatProvider getRootOutputFormatProvider(Job job, List<ProvidedOutput> outputsMap)
  throws ClassNotFoundException {
  OutputFormatProvider rootOutputFormatProvider;
  // There are 3 cases possible:
  // [1] output map is empty: user is not going through our APIs to add output; propagate the job's output format
  // [2] output map has single output: provided output format is set as the root OutputFormat
  // [3] output map has multiple outputs: RootOutputFormat is UnsupportedOutputFormat which has RecordWriter that
  // does not support writing. The OutputCommitter is effectively a no-op, as it runs as the RootOutputCommitter
  // in MultipleOutputsCommitter.

  if (outputsMap.isEmpty()) {
   rootOutputFormatProvider = new BasicOutputFormatProvider(job.getOutputFormatClass().getName(),
                                Collections.emptyMap());
  } else if (outputsMap.size() == 1) {
   rootOutputFormatProvider = outputsMap.get(0).getOutputFormatProvider();
  } else {
   rootOutputFormatProvider = new BasicOutputFormatProvider(UnsupportedOutputFormat.class.getName(),
                                Collections.emptyMap());
  }
  return rootOutputFormatProvider;
 }
}
origin: co.cask.cdap/cdap-app-fabric

 private static OutputFormatProvider getRootOutputFormatProvider(Job job, List<ProvidedOutput> outputsMap)
  throws ClassNotFoundException {
  OutputFormatProvider rootOutputFormatProvider;
  // There are 3 cases possible:
  // [1] output map is empty: user is not going through our APIs to add output; propagate the job's output format
  // [2] output map has single output: provided output format is set as the root OutputFormat
  // [3] output map has multiple outputs: RootOutputFormat is UnsupportedOutputFormat which has RecordWriter that
  // does not support writing. The OutputCommitter is effectively a no-op, as it runs as the RootOutputCommitter
  // in MultipleOutputsCommitter.

  if (outputsMap.isEmpty()) {
   rootOutputFormatProvider = new BasicOutputFormatProvider(job.getOutputFormatClass().getName(),
                                Collections.emptyMap());
  } else if (outputsMap.size() == 1) {
   rootOutputFormatProvider = outputsMap.get(0).getOutputFormatProvider();
  } else {
   rootOutputFormatProvider = new BasicOutputFormatProvider(UnsupportedOutputFormat.class.getName(),
                                Collections.emptyMap());
  }
  return rootOutputFormatProvider;
 }
}
origin: co.cask.cdap/hydrator-test

@Override
public void prepareRun(BatchSinkContext context) throws Exception {
 OutputFormatProvider outputFormatProvider =
  new BasicOutputFormatProvider(TextOutputFormat.class.getCanonicalName(),
                 ImmutableMap.of(TextOutputFormat.OUTDIR, config.dirName));
 if (config.name != null) {
  Output output = Output.of(config.name, outputFormatProvider);
  output.alias(config.alias);
  context.addOutput(output);
 } else {
  context.addOutput(Output.of(config.alias, outputFormatProvider));
 }
}
co.cask.cdap.internal.app.runtime.batchBasicOutputFormatProvider<init>

Popular methods of BasicOutputFormatProvider

    Popular in Java

    • Reactive rest calls using spring rest template
    • getSupportFragmentManager (FragmentActivity)
    • findViewById (Activity)
    • compareTo (BigDecimal)
    • PrintStream (java.io)
      Fake signature of an existing Java class.
    • Calendar (java.util)
      Calendar is an abstract base class for converting between a Date object and a set of integer fields
    • LinkedHashMap (java.util)
      LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
    • Scanner (java.util)
      A parser that parses a text string of primitive types and strings with the help of regular expressio
    • Set (java.util)
      A Set is a data structure which does not allow duplicate elements.
    • TimerTask (java.util)
      The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
    • Top plugins for WebStorm
    Tabnine Logo
    • Products

      Search for Java codeSearch for JavaScript code
    • IDE Plugins

      IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
    • Company

      About UsContact UsCareers
    • Resources

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