Java Code Examples for org.apache.beam.sdk.options.Default#Double
The following examples show how to use
org.apache.beam.sdk.options.Default#Double .
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: CloudDebuggerOptions.java From beam with Apache License 2.0 | 5 votes |
/** The maximum cost (as a ratio of CPU time) allowed for evaluating conditional snapshots. */ @Description( "The maximum cost (as a ratio of CPU time) allowed for evaluating conditional snapshots. " + "Should be a double between 0 and 1. " + "Snapshots will be cancelled if evaluating conditions takes more than this ratio of time.") @Default.Double(0.01) double getMaxConditionCost();
Example 3
Source File: SparkPipelineOptions.java From beam with Apache License 2.0 | 4 votes |
@Description( "A value between 0-1 to describe the percentage of a micro-batch dedicated " + "to reading from UnboundedSource.") @Default.Double(0.1) Double getReadTimePercentage();
Example 4
Source File: LoadData.java From java-docs-samples with Apache License 2.0 | 4 votes |
@Description("The number of gigabytes to write") @Default.Double(40) double getGigabytesWritten();
Example 5
Source File: ReadData.java From java-docs-samples with Apache License 2.0 | 4 votes |
@Description("The number of gigabytes written using the load data script.") @Default.Double(40) double getGigabytesWritten();
Example 6
Source File: VerifyBamId.java From dataflow-java with Apache License 2.0 | 4 votes |
@Description("The minimum allele frequency to use in analysis. Defaults to 0.01.") @Default.Double(0.01) double getMinFrequency();
Example 7
Source File: VerifyBamId.java From dataflow-java with Apache License 2.0 | 4 votes |
@Description("The fraction of positions to check. Defaults to 0.01.") @Default.Double(0.01) double getSamplingFraction();
Example 8
Source File: DataflowPipelineDebugOptions.java From beam with Apache License 2.0 | 3 votes |
/** * The GC thrashing threshold percentage. A given period of time is considered "thrashing" if this * percentage of CPU time is spent in garbage collection. Dataflow will force fail tasks after * sustained periods of thrashing. * * <p>If {@literal 100} is given as the value, MemoryMonitor will be disabled. */ @Description( "The GC thrashing threshold percentage. A given period of time is considered \"thrashing\" if this " + "percentage of CPU time is spent in garbage collection. Dataflow will force fail tasks after " + "sustained periods of thrashing.") @Default.Double(50.0) Double getGCThrashingPercentagePerPeriod();