Tabnine Logo
Input.getAlias
Code IndexAdd Tabnine to your IDE (free)

How to use
getAlias
method
in
co.cask.cdap.api.data.batch.Input

Best Java code snippets using co.cask.cdap.api.data.batch.Input.getAlias (Showing top 3 results out of 315)

origin: co.cask.cdap/hydrator-spark-core2

private Input suffixInput(Input input) {
 String suffixedAlias = String.format("%s-%s", input.getAlias(), UUID.randomUUID());
 return input.alias(suffixedAlias);
}
origin: cdapio/cdap

@Override
public void addInput(Input input, @Nullable Class<?> mapperCls) {
 if (input.getNamespace() != null && input.getNamespace().equals(NamespaceId.SYSTEM.getNamespace())
  && !getProgram().getNamespaceId().equals(NamespaceId.SYSTEM.getNamespace())) {
  // trying to access system namespace from a program outside system namespace is not allowed
  throw new IllegalArgumentException(String.format("Accessing Input %s in system namespace " +
                            "is not allowed from the namespace %s",
                           input.getName(), getProgram().getNamespaceId()));
 }
 if (input instanceof Input.DatasetInput) {
  Input.DatasetInput datasetInput = (Input.DatasetInput) input;
  Input.InputFormatProviderInput createdInput = createInput(datasetInput);
  addInput(createdInput.getAlias(), createdInput.getInputFormatProvider(), mapperCls);
 } else if (input instanceof Input.InputFormatProviderInput) {
  addInput(input.getAlias(), ((Input.InputFormatProviderInput) input).getInputFormatProvider(), mapperCls);
 } else {
  // shouldn't happen unless user defines their own Input class
  throw new IllegalArgumentException(String.format("Input %s has unknown input class %s",
                           input.getName(), input.getClass().getCanonicalName()));
 }
}
origin: co.cask.cdap/cdap-app-fabric

@Override
public void addInput(Input input, @Nullable Class<?> mapperCls) {
 if (input.getNamespace() != null && input.getNamespace().equals(NamespaceId.SYSTEM.getNamespace())
  && !getProgram().getNamespaceId().equals(NamespaceId.SYSTEM.getNamespace())) {
  // trying to access system namespace from a program outside system namespace is not allowed
  throw new IllegalArgumentException(String.format("Accessing Input %s in system namespace " +
                            "is not allowed from the namespace %s",
                           input.getName(), getProgram().getNamespaceId()));
 }
 if (input instanceof Input.DatasetInput) {
  Input.DatasetInput datasetInput = (Input.DatasetInput) input;
  Input.InputFormatProviderInput createdInput = createInput(datasetInput);
  addInput(createdInput.getAlias(), createdInput.getInputFormatProvider(), mapperCls);
 } else if (input instanceof Input.StreamInput) {
  Input.StreamInput streamInput = (Input.StreamInput) input;
  String namespace = streamInput.getNamespace();
  if (namespace == null) {
   namespace = getProgram().getNamespaceId();
  }
  addInput(input.getAlias(),
       new StreamInputFormatProvider(new NamespaceId(namespace), streamInput, streamAdmin),
       mapperCls);
 } else if (input instanceof Input.InputFormatProviderInput) {
  addInput(input.getAlias(), ((Input.InputFormatProviderInput) input).getInputFormatProvider(), mapperCls);
 } else {
  // shouldn't happen unless user defines their own Input class
  throw new IllegalArgumentException(String.format("Input %s has unknown input class %s",
                           input.getName(), input.getClass().getCanonicalName()));
 }
}
co.cask.cdap.api.data.batchInputgetAlias

Popular methods of Input

  • ofDataset
    Returns an Input defined by a dataset.
  • of
  • alias
  • fromNamespace
    Sets the namespace of the input.
  • getName
  • getNamespace
  • ofStream

Popular in Java

  • Parsing JSON documents to java classes using gson
  • requestLocationUpdates (LocationManager)
  • findViewById (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • JFrame (javax.swing)
  • Github Copilot 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