Tabnine Logo
AddElementsFromFile.getElementGenerator
Code IndexAdd Tabnine to your IDE (free)

How to use
getElementGenerator
method
in
uk.gov.gchq.gaffer.operation.impl.add.AddElementsFromFile

Best Java code snippets using uk.gov.gchq.gaffer.operation.impl.add.AddElementsFromFile.getElementGenerator (Showing top 1 results out of 315)

origin: uk.gov.gchq.gaffer/flink-library

  @Override
  public Object doOperation(final AddElementsFromFile op, final Context context, final Store store) throws OperationException {
    final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
    if (null != op.getParallelism()) {
      env.setParallelism(op.getParallelism());
    }

    final FlatMapOperator<String, Element> builder =
        env.readTextFile(op.getFilename())
            .flatMap(new GafferMapFunction(String.class, op.getElementGenerator()));

    if (Boolean.parseBoolean(op.getOption(FlinkConstants.SKIP_REBALANCING))) {
      builder.output(new GafferOutput(op, store));
    } else {
      builder.rebalance().output(new GafferOutput(op, store));
    }

    try {
      env.execute(op.getClass().getSimpleName() + "-" + op.getFilename());
    } catch (final Exception e) {
      throw new OperationException("Failed to add elements from file: " + op.getFilename(), e);
    }

    return null;
  }
}
uk.gov.gchq.gaffer.operation.impl.addAddElementsFromFilegetElementGenerator

Popular methods of AddElementsFromFile

  • getFilename
  • getOption
  • getParallelism

Popular in Java

  • Parsing JSON documents to java classes using gson
  • onCreateOptionsMenu (Activity)
  • getSharedPreferences (Context)
  • setRequestProperty (URLConnection)
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • BoxLayout (javax.swing)
  • JTextField (javax.swing)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • 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