Class ResourceHints


  • public class ResourceHints
    extends java.lang.Object
    Pipeline authors can use resource hints to provide additional information to runners about the desired aspects of the execution environment. Resource hints can be specified via PTransform#setResourceHints for parts of the pipeline, or globally via resourceHints pipeline option.

    Interpretation of hints is provided by Beam runners.

    • Method Detail

      • withMinRam

        public ResourceHints withMinRam​(long ramBytes)
        Sets desired minimal available RAM size to have in transform's execution environment.
      • withMinRam

        public ResourceHints withMinRam​(java.lang.String ramBytes)
        Sets desired minimal available RAM size to have in transform's execution environment.
        Parameters:
        ramBytes - specifies a human-friendly size string, for example: '10.5 GiB', '4096 MiB', etc.
      • withAccelerator

        public ResourceHints withAccelerator​(java.lang.String accelerator)
        Declares hardware accelerators that are desired to have in the execution environment.
      • withHint

        public ResourceHints withHint​(java.lang.String urn,
                                      ResourceHint hint)
        Declares a custom resource hint that has a specified URN.
      • hints

        public java.util.Map<java.lang.String,​ResourceHint> hints()
      • equals

        public boolean equals​(@Nullable java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object