Java Code Examples for org.apache.beam.sdk.options.Default#Class

The following examples show how to use org.apache.beam.sdk.options.Default#Class . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GcsOptions.java    From beam with Apache License 2.0 5 votes vote down vote up
/**
 * The class of the validator that should be created and used to validate paths. If pathValidator
 * has not been set explicitly, an instance of this class will be constructed and used as the path
 * validator.
 */
@Description(
    "The class of the validator that should be created and used to validate paths. "
        + "If pathValidator has not been set explicitly, an instance of this class will be "
        + "constructed and used as the path validator.")
@Default.Class(GcsPathValidator.class)
Class<? extends PathValidator> getPathValidatorClass();
 
Example 2
Source File: GcpOptions.java    From beam with Apache License 2.0 5 votes vote down vote up
/**
 * The class of the credential factory that should be created and used to create credentials. If
 * gcpCredential has not been set explicitly, an instance of this class will be constructed and
 * used as a credential factory.
 */
@Description(
    "The class of the credential factory that should be created and used to create "
        + "credentials. If gcpCredential has not been set explicitly, an instance of this class will "
        + "be constructed and used as a credential factory.")
@Default.Class(GcpCredentialFactory.class)
Class<? extends CredentialFactory> getCredentialFactoryClass();
 
Example 3
Source File: PipelineResourcesOptions.java    From beam with Apache License 2.0 5 votes vote down vote up
/**
 * The class of the pipeline resources detector factory that should be created and used to create
 * the detector. If not set explicitly, a default class will be used to instantiate the factory.
 */
@JsonIgnore
@Description(
    "The class of the pipeline resources detector factory that should be created and used to create "
        + "the detector. If not set explicitly, a default class will be used to instantiate the factory.")
@Default.Class(ClasspathScanningResourcesDetectorFactory.class)
Class<? extends PipelineResourcesDetector.Factory> getPipelineResourcesDetectorFactoryClass();
 
Example 4
Source File: PipelineOptionsTableGenerator.java    From beam with Apache License 2.0 5 votes vote down vote up
/** Returns a string representation of the {@link Default} value on the passed in method. */
private static Optional<String> getDefaultValueFromAnnotation(Method method) {
  for (Annotation annotation : method.getAnnotations()) {
    if (annotation instanceof Default.Class) {
      return Optional.of(((Default.Class) annotation).value().getSimpleName());
    } else if (annotation instanceof Default.String) {
      return Optional.of(((Default.String) annotation).value());
    } else if (annotation instanceof Default.Boolean) {
      return Optional.of(Boolean.toString(((Default.Boolean) annotation).value()));
    } else if (annotation instanceof Default.Character) {
      return Optional.of(Character.toString(((Default.Character) annotation).value()));
    } else if (annotation instanceof Default.Byte) {
      return Optional.of(Byte.toString(((Default.Byte) annotation).value()));
    } else if (annotation instanceof Default.Short) {
      return Optional.of(Short.toString(((Default.Short) annotation).value()));
    } else if (annotation instanceof Default.Integer) {
      return Optional.of(Integer.toString(((Default.Integer) annotation).value()));
    } else if (annotation instanceof Default.Long) {
      return Optional.of(Long.toString(((Default.Long) annotation).value()));
    } else if (annotation instanceof Default.Float) {
      return Optional.of(Float.toString(((Default.Float) annotation).value()));
    } else if (annotation instanceof Default.Double) {
      return Optional.of(Double.toString(((Default.Double) annotation).value()));
    } else if (annotation instanceof Default.Enum) {
      return Optional.of(((Default.Enum) annotation).value());
    } else if (annotation instanceof Default.InstanceFactory) {
      return Optional.of(((Default.InstanceFactory) annotation).value().getSimpleName());
    }
  }
  return Optional.empty();
}
 
Example 5
Source File: DataflowPipelineDebugOptions.java    From beam with Apache License 2.0 5 votes vote down vote up
/**
 * The class responsible for staging resources to be accessible by workers during job execution.
 * If stager has not been set explicitly, an instance of this class will be created and used as
 * the resource stager.
 */
@Description(
    "The class of the stager that should be created and used to stage resources. "
        + "If stager has not been set explicitly, an instance of the this class will be created "
        + "and used as the resource stager.")
@Default.Class(GcsStager.class)
Class<? extends Stager> getStagerClass();
 
Example 6
Source File: S3Options.java    From beam with Apache License 2.0 4 votes vote down vote up
@Description(
    "Factory class that should be created and used to create a builder of AmazonS3 client."
        + "Override the default value if you need a S3 client with custom properties, like path style access, etc.")
@Default.Class(DefaultS3ClientBuilderFactory.class)
Class<? extends S3ClientBuilderFactory> getS3ClientFactoryClass();
 
Example 7
Source File: SamzaPipelineOptions.java    From beam with Apache License 2.0 4 votes vote down vote up
@Description("The factory to read config file from config file path.")
@Default.Class(PropertiesConfigFactory.class)
Class<? extends ConfigFactory> getConfigFactory();
 
Example 8
Source File: IdentityByState.java    From dataflow-java with Apache License 2.0 4 votes vote down vote up
@Description("The class that determines the strategy for calculating the similarity of alleles.")
@Default.Class(SharedMinorAllelesCalculatorFactory.class)
Class<? extends CallSimilarityCalculatorFactory> getCallSimilarityCalculatorFactory();
 
Example 9
Source File: JoinNonVariantSegmentsWithVariants.java    From dataflow-java with Apache License 2.0 4 votes vote down vote up
@Description("The class that determines the strategy for merging non-variant segments and variants.")
@Default.Class(MergeNonVariantSegmentsWithSnps.class)
Class<? extends VariantMergeStrategy> getVariantMergeStrategy();