You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Shashikant Banerjee (Jira)" <ji...@apache.org> on 2020/04/14 14:56:00 UTC
[jira] [Updated] (HDDS-3387) Fix
ContainerOperationClient#createContainer
[ https://issues.apache.org/jira/browse/HDDS-3387?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shashikant Banerjee updated HDDS-3387:
--------------------------------------
Description:
In the following snippet of code , it seems to acquire the xceiverclient instance twice and but release once. It should be acquired only once.
{code:java}
@Override
public ContainerWithPipeline createContainer(HddsProtos.ReplicationType type,
HddsProtos.ReplicationFactor factor, String owner) throws IOException {
XceiverClientSpi client = null;
try {
// allocate container on SCM.
ContainerWithPipeline containerWithPipeline =
storageContainerLocationClient.allocateContainer(type, factor,
owner);
Pipeline pipeline = containerWithPipeline.getPipeline();
client = xceiverClientManager.acquireClient(pipeline);
// connect to pipeline leader and allocate container on leader datanode.
client = xceiverClientManager.acquireClient(pipeline);
createContainer(client,
{code}
was:
In the following snippet of code , it seems to acquire the xcieverclient instance twice and but release once. It should be acquired only once.
{code:java}
@Override
public ContainerWithPipeline createContainer(HddsProtos.ReplicationType type,
HddsProtos.ReplicationFactor factor, String owner) throws IOException {
XceiverClientSpi client = null;
try {
// allocate container on SCM.
ContainerWithPipeline containerWithPipeline =
storageContainerLocationClient.allocateContainer(type, factor,
owner);
Pipeline pipeline = containerWithPipeline.getPipeline();
client = xceiverClientManager.acquireClient(pipeline);
// connect to pipeline leader and allocate container on leader datanode.
client = xceiverClientManager.acquireClient(pipeline);
createContainer(client,
{code}
> Fix ContainerOperationClient#createContainer
> --------------------------------------------
>
> Key: HDDS-3387
> URL: https://issues.apache.org/jira/browse/HDDS-3387
> Project: Hadoop Distributed Data Store
> Issue Type: Bug
> Affects Versions: 0.6.0
> Reporter: Shashikant Banerjee
> Assignee: Sadanand Shenoy
> Priority: Major
> Fix For: 0.6.0
>
>
> In the following snippet of code , it seems to acquire the xceiverclient instance twice and but release once. It should be acquired only once.
> {code:java}
> @Override
> public ContainerWithPipeline createContainer(HddsProtos.ReplicationType type,
> HddsProtos.ReplicationFactor factor, String owner) throws IOException {
> XceiverClientSpi client = null;
> try {
> // allocate container on SCM.
> ContainerWithPipeline containerWithPipeline =
> storageContainerLocationClient.allocateContainer(type, factor,
> owner);
> Pipeline pipeline = containerWithPipeline.getPipeline();
> client = xceiverClientManager.acquireClient(pipeline);
> // connect to pipeline leader and allocate container on leader datanode.
> client = xceiverClientManager.acquireClient(pipeline);
> createContainer(client,
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org