Reference documentation and code samples for the Google Cloud Dataproc v1 API class NodeGroupAffinity.
Node Group Affinity for clusters using sole-tenant node groups.
The Dataproc NodeGroupAffinity resource is not related to the
Dataproc [NodeGroup][google.cloud.dataproc.v1.NodeGroup] resource.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eNodeGroupAffinity\u003c/code\u003e class in the Google Cloud Dataproc v1 API is used to specify affinity for clusters using sole-tenant node groups, and is unrelated to the \u003ccode\u003eNodeGroup\u003c/code\u003e resource.\u003c/p\u003e\n"],["\u003cp\u003eVersion 5.17.0 is the latest version of the \u003ccode\u003eNodeGroupAffinity\u003c/code\u003e API class documentation, with versions ranging down to 3.1.0 being available.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eNodeGroupAffinity\u003c/code\u003e class inherits from \u003ccode\u003eObject\u003c/code\u003e and implements interfaces like \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe class has two constructors, a default one and another that accepts a \u003ccode\u003eNodeGroupAffinity\u003c/code\u003e instance for duplication, with \u003ccode\u003eNodeGroupUri\u003c/code\u003e as the sole property to set.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eNodeGroupUri\u003c/code\u003e property is a string representing the URI of a sole-tenant node group resource where the cluster will be created, and a full URL, partial URI, or node group name is acceptable.\u003c/p\u003e\n"]]],[],null,[]]