Java Code Examples for org.apache.beam.sdk.options.Default#Enum
The following examples show how to use
org.apache.beam.sdk.options.Default#Enum .
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: PipelineOptionsTableGenerator.java From beam with Apache License 2.0 | 5 votes |
/** 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 2
Source File: SinkOptions.java From gcp-ingestion with Mozilla Public License 2.0 | 4 votes |
@Description("File format for --inputType=file; must be one of" + " json (each line contains payload[String] and attributeMap[String,String]) or" + " text (each line is payload)") @Default.Enum("json") InputFileFormat getInputFileFormat();
Example 3
Source File: DataflowWorkerLoggingOptions.java From beam with Apache License 2.0 | 4 votes |
/** This option controls the default log level of all loggers without a log level override. */ @Description("Controls the default log level of all loggers without a log level override.") @Default.Enum("INFO") Level getDefaultWorkerLogLevel();
Example 4
Source File: DataflowPipelineOptions.java From beam with Apache License 2.0 | 4 votes |
/** This option controls Flexible Resource Scheduling mode. */ @Description("Controls the Flexible Resource Scheduling mode.") @Default.Enum("UNSPECIFIED") FlexResourceSchedulingGoal getFlexRSGoal();
Example 5
Source File: SamzaPipelineOptions.java From beam with Apache License 2.0 | 4 votes |
@Description( "Samza application execution environment." + "See {@link org.apache.beam.runners.samza.SamzaExecutionEnvironment} for detailed environment descriptions.") @Default.Enum("LOCAL") SamzaExecutionEnvironment getSamzaExecutionEnvironment();
Example 6
Source File: CombineLoadTest.java From beam with Apache License 2.0 | 4 votes |
@Description("Per key combiner type.") @Default.Enum("MEAN") CombinerType getPerKeyCombiner();
Example 7
Source File: NexmarkOptions.java From beam with Apache License 2.0 | 4 votes |
@Description("How to derive names of resources.") @Default.Enum("QUERY_AND_SALT") NexmarkUtils.ResourceNameMode getResourceNameMode();
Example 8
Source File: NexmarkOptions.java From beam with Apache License 2.0 | 4 votes |
@Description("Which suite to run. Default is to use command line arguments for one job.") @Default.Enum("DEFAULT") NexmarkSuite getSuite();
Example 9
Source File: BigQueryTornadoes.java From beam with Apache License 2.0 | 4 votes |
@Description("Mode to use when reading from BigQuery") @Default.Enum("EXPORT") TypedRead.Method getReadMethod();
Example 10
Source File: SinkOptions.java From gcp-ingestion with Mozilla Public License 2.0 | 4 votes |
@Description("Compression format for --errorOutputType=file") @Default.Enum("GZIP") Compression getErrorOutputFileCompression();
Example 11
Source File: SinkOptions.java From gcp-ingestion with Mozilla Public License 2.0 | 4 votes |
@Description("Type of --errorOutput; must be one of [pubsub, file]") @Default.Enum("pubsub") ErrorOutputType getErrorOutputType();
Example 12
Source File: SinkOptions.java From gcp-ingestion with Mozilla Public License 2.0 | 4 votes |
@Description("Compression format for --outputType=file") @Default.Enum("GZIP") Compression getOutputFileCompression();
Example 13
Source File: SinkOptions.java From gcp-ingestion with Mozilla Public License 2.0 | 4 votes |
@Description("Method of writing to BigQuery for error output") @Default.Enum("file_loads") BigQueryWriteMethod getErrorBqWriteMethod();
Example 14
Source File: SinkOptions.java From gcp-ingestion with Mozilla Public License 2.0 | 4 votes |
@Description("File format for --outputType=file|stdout; must be one of" + " json (each line contains payload[String] and attributeMap[String,String]) or" + " text (each line is payload)") @Default.Enum("json") OutputFileFormat getOutputFileFormat();
Example 15
Source File: SinkOptions.java From gcp-ingestion with Mozilla Public License 2.0 | 4 votes |
@Description("Method of writing to BigQuery") @Default.Enum("file_loads") BigQueryWriteMethod getBqWriteMethod();
Example 16
Source File: SinkOptions.java From gcp-ingestion with Mozilla Public License 2.0 | 4 votes |
@Description("Method of reading from BigQuery; the table will either be exported to GCS" + " (GA and free, but may take some time to export and may hit quotas) or accessed using the " + " BigQuery Storage API (beta and some cost, but faster and no quotas)") @Default.Enum("export") BigQueryReadMethod getBqReadMethod();
Example 17
Source File: SinkOptions.java From gcp-ingestion with Mozilla Public License 2.0 | 4 votes |
@Description("Type of --output; must be one of [pubsub, file, avro, stdout]") @Default.Enum("file") OutputType getOutputType();
Example 18
Source File: SinkOptions.java From gcp-ingestion with Mozilla Public License 2.0 | 4 votes |
@Description("Type of source specified by --input") @Default.Enum("pubsub") InputType getInputType();
Example 19
Source File: DataflowWorkerLoggingOptions.java From beam with Apache License 2.0 | 3 votes |
/** * Controls the log level given to messages printed to {@code System.out}. * * <p>Note that the message may be filtered depending on the {@link #getDefaultWorkerLogLevel * defaultWorkerLogLevel} or if a {@code System.out} override is specified via {@link * #getWorkerLogLevelOverrides workerLogLevelOverrides}. */ @Description( "Controls the log level given to messages printed to System.out. Note that the " + "message may be filtered depending on the defaultWorkerLogLevel or if a 'System.out' " + "override is specified via workerLogLevelOverrides.") @Default.Enum("INFO") Level getWorkerSystemOutMessageLevel();
Example 20
Source File: DataflowWorkerLoggingOptions.java From beam with Apache License 2.0 | 3 votes |
/** * Controls the log level given to messages printed to {@code System.err}. * * <p>Note that the message may be filtered depending on the {@link #getDefaultWorkerLogLevel * defaultWorkerLogLevel} or if a {@code System.err} override is specified via {@link * #getWorkerLogLevelOverrides workerLogLevelOverrides}. */ @Description( "Controls the log level given to messages printed to System.err. Note that the " + "message may be filtered depending on the defaultWorkerLogLevel or if a 'System.err' " + "override is specified via workerLogLevelOverrides.") @Default.Enum("ERROR") Level getWorkerSystemErrMessageLevel();