-
Notifications
You must be signed in to change notification settings - Fork 2
HDDS-10000. UD-635. Added datacenter info to datanodes, buckets and containers #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Pipeline and container filtering based on datacenter binding.
| * @return Builder for PipelineRequestInformation | ||
| */ | ||
| public Builder setDatacenters(Set<String> datacenters) { | ||
| this.datacenters = datacenters; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would've made a copy of the set here.
| This setting maps each DataNode to its data center using a comma-separated list of | ||
| hostname:ratis_port=*dc_name* pairs. It enables Ozone to associate DataNodes with specific data centers, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| This setting maps each DataNode to its data center using a comma-separated list of | |
| hostname:ratis_port=*dc_name* pairs. It enables Ozone to associate DataNodes with specific data centers, | |
| This property defines a mapping that associates each DataNode with its corresponding data center. The mapping is specified as a comma-separated list of pairs in the format `hostname:ratis_port=dc_name`. By establishing this association, Ozone can identify which data center a DataNode belongs to, enabling more efficient storage management and data placement across data centers. |
| List<AllocatedBlock> allocateBlock(long size, int numBlocks, | ||
| ReplicationConfig replicationConfig, String owner, | ||
| ExcludeList excludeList, String clientMachine) throws IOException; | ||
| ExcludeList excludeList, String clientMachine, String datacenters) throws IOException; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mark it Nullable
| ReplicationConfig replicationConfig, | ||
| String owner, ExcludeList excludeList, | ||
| String clientMachine | ||
| String clientMachine, String datacenters |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mark it Nullable
| AllocatedBlock allocateBlock(long size, ReplicationConfig replicationConfig, | ||
| String owner, | ||
| ExcludeList excludeList) throws IOException, TimeoutException; | ||
| ExcludeList excludeList, String datacenters) throws IOException, TimeoutException; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mark it Nullable
| public AllocatedBlock allocateBlock(final long size, | ||
| ReplicationConfig replicationConfig, | ||
| String owner, ExcludeList excludeList) | ||
| String owner, ExcludeList excludeList, String datacenters) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mark it Nullable
|
|
||
| public ContainerInfo getContainer(final long size, | ||
| ReplicationConfig repConfig, String owner, ExcludeList excludeList) | ||
| ReplicationConfig repConfig, String owner, ExcludeList excludeList, String datacenters) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mark as Nullable
| */ | ||
| ContainerInfo getContainer(long size, T repConfig, | ||
| String owner, ExcludeList excludeList) | ||
| String owner, ExcludeList excludeList, String datacenters) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mark as Nullable
| optional hadoop.hdds.ECReplicationConfig ecReplicationConfig = 8; | ||
|
|
||
| optional string client = 9; | ||
| optional string datacenters = 10; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why pass it as a string and not as repeatable?
| } | ||
|
|
||
| if (datacenters != null && !datacenters.isEmpty()) { | ||
| bb.addMetadata(OzoneConsts.DATACENTERS, datacenters); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the value should be basically validated
| <tag>SCM</tag> | ||
| <description> | ||
| This setting maps each DataNode to its data center using a comma-separated list of | ||
| hostname:ratis_port=*dc_name* pairs. It enables Ozone to associate DataNodes with specific data centers, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ratis port is different each time. It's not feasible to keep it in settings
Pipeline and container filtering based on datacenter binding.