public class ResourceHints
extends java.lang.Object
PTransform#setResourceHints
for parts of the pipeline,
or globally via resourceHints
pipeline option.
Interpretation of hints is provided by Beam runners.
Modifier and Type | Method and Description |
---|---|
static ResourceHints |
create()
Creates a
ResourceHints instance with no hints. |
boolean |
equals(@Nullable java.lang.Object other) |
static ResourceHints |
fromOptions(PipelineOptions options)
Creates a
ResourceHints instance with hints supplied in options. |
int |
hashCode() |
java.util.Map<java.lang.String,ResourceHint> |
hints() |
ResourceHints |
mergeWithOuter(ResourceHints outer) |
ResourceHints |
withAccelerator(java.lang.String accelerator)
Declares hardware accelerators that are desired to have in the execution environment.
|
ResourceHints |
withHint(java.lang.String urn,
ResourceHint hint)
Declares a custom resource hint that has a specified URN.
|
ResourceHints |
withMinRam(long ramBytes)
Sets desired minimal available RAM size to have in transform's execution environment.
|
ResourceHints |
withMinRam(java.lang.String ramBytes)
Sets desired minimal available RAM size to have in transform's execution environment.
|
public static ResourceHints create()
ResourceHints
instance with no hints.public static ResourceHints fromOptions(PipelineOptions options)
ResourceHints
instance with hints supplied in options.public ResourceHints withMinRam(long ramBytes)
public ResourceHints withMinRam(java.lang.String ramBytes)
ramBytes
- specifies a human-friendly size string, for example: '10.5 GiB', '4096 MiB',
etc.public ResourceHints withAccelerator(java.lang.String accelerator)
public ResourceHints withHint(java.lang.String urn, ResourceHint hint)
public java.util.Map<java.lang.String,ResourceHint> hints()
public ResourceHints mergeWithOuter(ResourceHints outer)
public boolean equals(@Nullable java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object