Get desktop application:
View/edit binary Protocol Buffers messages
Used in:
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:
The version of this announcement. When coming from ZK, this will be the node's mzxid.
The time at which this announcement was last updated. When coming from ZK this will be the node's mtime.
The name of the cluster this announcement belongs to. This is inferred from the original "clusterName" field.
The URI for this announcement, i.e. the host, port and context path that requests should be sent to.
The partitions and their corresponding weight for this announcement. This is inferred from the original "partitionDesc" and "weights" fields. If "partitionDesc" is present in the original ZK node, it is always used regardless of "weights". Otherwise, "weights" is assumed to be for partition 0, as specified in UriProperties.
Additional metadata for this announcement. This is inferred from the original "uriSpecificProperties" field.
The tracing ID for this announcement, which should be unique to this announcement. For Kafka announcements, this comes from the announcing server (which sets a UUID for each announcement) and for Zookeeper, this will be the full path to the d2URI. eg: /d2/uris/FooCluster/lor1-app000-xxxxx
Used in:
, ,The zxid of the change that caused this znode to be created.
The zxid of the change that last modified this znode.
The time in milliseconds from epoch when this znode was created.
The time in milliseconds from epoch when this znode was last modified.
The number of changes to the data of this znode.
The number of changes to the children of this znode.
The number of changes to the ACL of this znode.
The session id of the owner of this znode if the znode is an ephemeral node. If it is not an ephemeral node, it will be zero.
The length of the data field of this znode.
The number of children of this znode.
The zxid of the change that last modified this node's children.