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 | 
withCPUCount(int cpuCount)
Sets desired minimal CPU or vCPU count to have in transform's 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)
ramBytes - specifies a positive RAM size in bytes. A number greater than 2G
     (Integer.MAX_VALUE) is typical.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 ResourceHints withCPUCount(int cpuCount)
cpuCount - specifies a positive CPU count.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.Objectpublic int hashCode()
hashCode in class java.lang.Object