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
HDDS-9343. Shift sortDatanodes logic to OM #5391
Conversation
...p-hdds/framework/src/main/java/org/apache/hadoop/hdds/scm/client/ScmBlockLocationClient.java
Outdated
Show resolved
Hide resolved
...ds/framework/src/main/java/org/apache/hadoop/hdds/scm/protocol/ScmBlockLocationProtocol.java
Outdated
Show resolved
Hide resolved
...p-hdds/framework/src/main/java/org/apache/hadoop/hdds/scm/client/ScmBlockLocationClient.java
Outdated
Show resolved
Hide resolved
...p-hdds/framework/src/main/java/org/apache/hadoop/hdds/scm/client/ScmBlockLocationClient.java
Outdated
Show resolved
Hide resolved
0c27ca9
to
e2334d0
Compare
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.
LGTM. Thanks @tanvipenumudy for the patch.
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.
@tanvipenumudy Thanks for working over this, have few question over solution,
SCM and OM may be over different node or access for SCM deployed path may not be accessible by OM, So IMO, just passing filename may not be enough.
Also,
Please check how user update the conf and places the network topology file? can same be done at OM to simplify the solution?
This is a valid point! The current ideation is to utilize this file for generating the I believe this can be solved using two different approaches:
|
...-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMBlockProtocolServer.java
Outdated
Show resolved
Hide resolved
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.
We should serve the topology itself in the API using a schema. If the HDFS schema is well known we can continue using that with an explanation for how the client can parse the topology in the file.
The goal here is that the admin only needs to configure the topology with the SCM once and if any clients OM or others would like to fetch the topology for that SCM they can fetch it. The question that then comes up is, is the topology scheme as defined the file passed to SCM good enough to serve directly or should SCM serialize the topology some other way. |
Summarizing the discussion points with @ChenSammi:
|
…pology schema to OM
00fc8b6
to
df4c96d
Compare
I can approve and run the CI here once you this error is looked into https://github.com/tanvipenumudy/ozone/actions/runs/7252248660/job/19756622066 |
hadoop-hdds/interface-server/src/main/proto/ScmServerProtocol.proto
Outdated
Show resolved
Hide resolved
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
Outdated
Show resolved
Hide resolved
@tanvipenumudy , I would like to see the data first to make sure there is no major performance impact with this approach. There is no need to create a benchmark for this, a unit test with a 1000 nodes topology tree can get the data. |
I conducted benchmarking of OM fetching the network topology tree information from SCM using an integration test (MiniOzoneCluster). However, local limitations prevented me from spinning up more than 50 nodes at a time. On an average, fetching the network topology tree information for 50 nodes took approximately 0.02 to 0.03 seconds. Even in a worst-case scenario, where we extrapolate to 1000 nodes, the estimated time would be 0.6 seconds (0.03 * 20), still less than a second for the refresh duration frequency of every one hour (default). |
Thank you for the review @ChenSammi. |
@@ -1673,6 +1698,18 @@ public void start() throws IOException { | |||
|
|||
keyManager.start(configuration); | |||
|
|||
try { |
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.
Minor nit: This can be fixed in a new PR, since KeyManager
is dependent on scmTopologyClient
, maybe we should start the client before the KeyManager
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.
Noted, thank you for the review @kerneltime!
Ticket tracking this task: HDDS-10512.
The change looks good to me overall. Few follow up work post merge should be
|
This is breaking https://github.com/apache/ozone/actions/runs/8179843819/job/22366707752 |
(cherry picked from commit 140c5de) Change-Id: I2bf25ac0879b497639e0f69e3ef3d65e43c7c359
(cherry picked from commit a145dd5) Change-Id: I5ddc6d2c69d5eeb6386d0038e3166b8b951acdd8
What changes were proposed in this pull request?
Following HDDS-8300, the key metadata API within OM sorts datanodes allowing clients to optimize data I/O on the basis of locality, yet this currently involves OM making additional calls to SCM for sorting datanodes accounting for over 80% of getKeyInfo latency, reducing peak pure read ops/sec.
Motivation behind this change:
The current patch does the following:
InnerNode
) to OM.NetworkTopology
calculation and sorting logic toKeyManagerImpl
.What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-9343
How was this patch tested?