package indis

Mouse Melon logoGet desktop application:
View/edit binary Protocol Buffers messages

message D2ClusterOrServiceName

XdsD2.proto:58

message D2Node

XdsD2.proto:33

Used in: D2NodeMap

message D2NodeMap

XdsD2.proto:47

message D2SymlinkNode

XdsD2.proto:40

message D2URI

XdsD2.proto:111

D2URI is a proto representation of com.linkedin.d2.balancer.properties.UriProperties. Note that a D2 UriProperties is is designed to hold all the announcements of a cluster, which is why it's represented as a map of URI to data. The UriProperties class is reused wholesale for serialization to write the data to ZK, which is why all fields are actually maps, even though these maps only ever have one key in them. It is clear from the implementation of ZooKeeperServer and ZooKeeperAnnouncer that there cannot ever be more than one URI in one ZK announcement, therefore this new proto representation does not need to share the same shortcomings and can, instead, represent things more linearly. linearly. Note that since a URI can announce to multiple partitions, this is still represented as a map to capture the weights for each partition. Here is a sample ZK announcement in JSON serialized from a UriProperties for additional clarity on the fields that are represented as maps when they do not need to be: { "weights": { "https://foo.stg.linkedin.com:18792/Toki/resources": 1.0 }, "partitionDesc": { "https://foo.stg.linkedin.com:18792/Toki/resources": { "0": { "weight": 1.0 } "1": { "weight": 2.0 } } }, "uriSpecificProperties": { "https://foo.stg.linkedin.com:18792/Toki/resources": { "com.linkedin.app.version": "0.1.76" } }, "clusterName": "Toki" } And here is what the corresponding D2URI would look like for this announcement: { "cluster_name": "Toki", "uri": "https://foo.stg.linkedin.com:18792/Toki/resources", "partition_desc": { "0": 1.0, "1": 2.0 }, "uri_specific_properties": { "com.linkedin.app.version": "0.1.76" } }

Used in: D2URIMap

message D2URIMap

XdsD2.proto:138

message Node

XdsD2.proto:53

message Stat

XdsD2.proto:8

Used in: D2Node, D2SymlinkNode, Node