[jira] [Updated] (HDDS-501) AllocateBlockResponse.keyLocation must be an optional field

2018-11-12 Thread Elek, Marton (JIRA)


 [ 
https://issues.apache.org/jira/browse/HDDS-501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Elek, Marton updated HDDS-501:
--
Fix Version/s: (was: 0.3.0)

> AllocateBlockResponse.keyLocation must be an optional field
> ---
>
> Key: HDDS-501
> URL: https://issues.apache.org/jira/browse/HDDS-501
> Project: Hadoop Distributed Data Store
>  Issue Type: Bug
>Reporter: Arpit Agarwal
>Assignee: Arpit Agarwal
>Priority: Blocker
> Fix For: 0.2.1
>
> Attachments: HDDS-501.01.patch
>
>
> keyLocation may not be initialized if allocateBlock fails in the following 
> function:
> {code:java}
> public AllocateBlockResponse allocateBlock(RpcController controller,
> AllocateBlockRequest request) throws ServiceException {
>   AllocateBlockResponse.Builder resp =
>   AllocateBlockResponse.newBuilder();
>   try {
> KeyArgs keyArgs = request.getKeyArgs();
> OmKeyArgs omKeyArgs = new OmKeyArgs.Builder()
> .setVolumeName(keyArgs.getVolumeName())
> .setBucketName(keyArgs.getBucketName())
> .setKeyName(keyArgs.getKeyName())
> .build();
> OmKeyLocationInfo newLocation = impl.allocateBlock(omKeyArgs,
> request.getClientID());
> resp.setKeyLocation(newLocation.getProtobuf());
> resp.setStatus(Status.OK);
>   } catch (IOException e) {
> resp.setStatus(exceptionToResponseStatus(e));
>   }
>   return resp.build();
> }{code}
> Hence it must be an optional field. Else the protobuf builder exception 
> suppresses the real issue.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Updated] (HDDS-501) AllocateBlockResponse.keyLocation must be an optional field

2018-09-18 Thread Arpit Agarwal (JIRA)


 [ 
https://issues.apache.org/jira/browse/HDDS-501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Arpit Agarwal updated HDDS-501:
---
  Resolution: Fixed
   Fix Version/s: 0.3.0
  0.2.1
Target Version/s:   (was: 0.2.1)
  Status: Resolved  (was: Patch Available)

Thanks [~hanishakoneru]. I've committed this.

> AllocateBlockResponse.keyLocation must be an optional field
> ---
>
> Key: HDDS-501
> URL: https://issues.apache.org/jira/browse/HDDS-501
> Project: Hadoop Distributed Data Store
>  Issue Type: Bug
>Reporter: Arpit Agarwal
>Assignee: Arpit Agarwal
>Priority: Blocker
> Fix For: 0.2.1, 0.3.0
>
> Attachments: HDDS-501.01.patch
>
>
> keyLocation may not be initialized if allocateBlock fails in the following 
> function:
> {code:java}
> public AllocateBlockResponse allocateBlock(RpcController controller,
> AllocateBlockRequest request) throws ServiceException {
>   AllocateBlockResponse.Builder resp =
>   AllocateBlockResponse.newBuilder();
>   try {
> KeyArgs keyArgs = request.getKeyArgs();
> OmKeyArgs omKeyArgs = new OmKeyArgs.Builder()
> .setVolumeName(keyArgs.getVolumeName())
> .setBucketName(keyArgs.getBucketName())
> .setKeyName(keyArgs.getKeyName())
> .build();
> OmKeyLocationInfo newLocation = impl.allocateBlock(omKeyArgs,
> request.getClientID());
> resp.setKeyLocation(newLocation.getProtobuf());
> resp.setStatus(Status.OK);
>   } catch (IOException e) {
> resp.setStatus(exceptionToResponseStatus(e));
>   }
>   return resp.build();
> }{code}
> Hence it must be an optional field. Else the protobuf builder exception 
> suppresses the real issue.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Updated] (HDDS-501) AllocateBlockResponse.keyLocation must be an optional field

2018-09-18 Thread Arpit Agarwal (JIRA)


 [ 
https://issues.apache.org/jira/browse/HDDS-501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Arpit Agarwal updated HDDS-501:
---
Attachment: HDDS-501.01.patch

> AllocateBlockResponse.keyLocation must be an optional field
> ---
>
> Key: HDDS-501
> URL: https://issues.apache.org/jira/browse/HDDS-501
> Project: Hadoop Distributed Data Store
>  Issue Type: Bug
>Reporter: Arpit Agarwal
>Priority: Blocker
> Attachments: HDDS-501.01.patch
>
>
> keyLocation may not be initialized if allocateBlock fails in the following 
> function:
> {code:java}
> public AllocateBlockResponse allocateBlock(RpcController controller,
> AllocateBlockRequest request) throws ServiceException {
>   AllocateBlockResponse.Builder resp =
>   AllocateBlockResponse.newBuilder();
>   try {
> KeyArgs keyArgs = request.getKeyArgs();
> OmKeyArgs omKeyArgs = new OmKeyArgs.Builder()
> .setVolumeName(keyArgs.getVolumeName())
> .setBucketName(keyArgs.getBucketName())
> .setKeyName(keyArgs.getKeyName())
> .build();
> OmKeyLocationInfo newLocation = impl.allocateBlock(omKeyArgs,
> request.getClientID());
> resp.setKeyLocation(newLocation.getProtobuf());
> resp.setStatus(Status.OK);
>   } catch (IOException e) {
> resp.setStatus(exceptionToResponseStatus(e));
>   }
>   return resp.build();
> }{code}
> Hence it must be an optional field. Else the protobuf builder exception 
> suppresses the real issue.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Updated] (HDDS-501) AllocateBlockResponse.keyLocation must be an optional field

2018-09-18 Thread Arpit Agarwal (JIRA)


 [ 
https://issues.apache.org/jira/browse/HDDS-501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Arpit Agarwal updated HDDS-501:
---
Assignee: Arpit Agarwal
   Fix Version/s: (was: 0.2.1)
Target Version/s: 0.2.1
  Status: Patch Available  (was: Open)

> AllocateBlockResponse.keyLocation must be an optional field
> ---
>
> Key: HDDS-501
> URL: https://issues.apache.org/jira/browse/HDDS-501
> Project: Hadoop Distributed Data Store
>  Issue Type: Bug
>Reporter: Arpit Agarwal
>Assignee: Arpit Agarwal
>Priority: Blocker
> Attachments: HDDS-501.01.patch
>
>
> keyLocation may not be initialized if allocateBlock fails in the following 
> function:
> {code:java}
> public AllocateBlockResponse allocateBlock(RpcController controller,
> AllocateBlockRequest request) throws ServiceException {
>   AllocateBlockResponse.Builder resp =
>   AllocateBlockResponse.newBuilder();
>   try {
> KeyArgs keyArgs = request.getKeyArgs();
> OmKeyArgs omKeyArgs = new OmKeyArgs.Builder()
> .setVolumeName(keyArgs.getVolumeName())
> .setBucketName(keyArgs.getBucketName())
> .setKeyName(keyArgs.getKeyName())
> .build();
> OmKeyLocationInfo newLocation = impl.allocateBlock(omKeyArgs,
> request.getClientID());
> resp.setKeyLocation(newLocation.getProtobuf());
> resp.setStatus(Status.OK);
>   } catch (IOException e) {
> resp.setStatus(exceptionToResponseStatus(e));
>   }
>   return resp.build();
> }{code}
> Hence it must be an optional field. Else the protobuf builder exception 
> suppresses the real issue.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org