[
https://issues.apache.org/jira/browse/HDFS-12745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16269923#comment-16269923
]
Anu Engineer commented on HDFS-12745:
-------------------------------------
[~msingh] For this particular change do we need any more code that this
...Changes hand plucked out of your patch.
{code}
---
a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/scm/XceiverClientManager.java
+++
b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/scm/XceiverClientManager.java
@@ -142,9 +142,9 @@ public void releaseClient(XceiverClientSpi client) {
private XceiverClientSpi getClient(Pipeline pipeline)
throws IOException {
- String containerName = pipeline.getContainerName();
+ String pipelineName = pipeline.getPipelineName();
try {
- return clientCache.get(containerName,
+ return clientCache.get(pipelineName,
new Callable<XceiverClientSpi>() {
@Override
public XceiverClientSpi call() throws Exception {
diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/Ozone.proto
b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/Ozone.proto
index e2f42ccbc0d..bf788001dfa 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/Ozone.proto
+++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/Ozone.proto
@@ -38,7 +38,7 @@ message Pipeline {
optional LifeCycleState state = 4 [default = OPEN];
optional ReplicationType type = 5 [default = STAND_ALONE];
optional ReplicationFactor factor = 6 [default = ONE];
- optional string pipelineName = 7;
+ required string pipelineName = 7;
}
{code}
Shouldn't the rest of the code be more related to containerName change ? I
agree we need some test code, but most of the other change can go into the next
JIRA?
> Ozone: XceiverClientManager should cache objects based on pipeline name
> -----------------------------------------------------------------------
>
> Key: HDFS-12745
> URL: https://issues.apache.org/jira/browse/HDFS-12745
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: ozone
> Affects Versions: HDFS-7240
> Reporter: Mukul Kumar Singh
> Assignee: Mukul Kumar Singh
> Fix For: HDFS-7240
>
> Attachments: HDFS-12745-HDFS-7240.001.patch,
> HDFS-12745-HDFS-7240.002.patch, HDFS-12745-HDFS-7240.003.patch,
> HDFS-12745-HDFS-7240.004.patch, HDFS-12745-HDFS-7240.005.patch,
> HDFS-12745-HDFS-7240.006.patch, HDFS-12745-HDFS-7240.007.patch
>
>
> With just the standalone pipeline, a new pipeline was created for each and
> every container.
> This code can be optimized so that pipelines are craeted less frequently.
> Caching using pipeline names will help with Ratis clients as well.
> a) Remove Container name from Pipeline object.
> b) XceiverClientManager should cache objects based on pipeline name
> c) XceiverClient and XceiverServer should be renamed to
> XceiverClientStandAlone & XceiverServerRatis
> d) StandAlone pipeline should have notion of re-using pipeline objects.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]