[jira] [Updated] (HDDS-4054) Remove duplicate judgments in allocateBlockInKey

2020-07-31 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot updated HDDS-4054:
-
Labels: pull-request-available  (was: )

> Remove duplicate judgments in allocateBlockInKey
> 
>
> Key: HDDS-4054
> URL: https://issues.apache.org/jira/browse/HDDS-4054
> Project: Hadoop Distributed Data Store
>  Issue Type: Improvement
>Reporter: mingchao zhao
>Priority: Major
>  Labels: pull-request-available
>
> In HDDS-1666 we have [changed the size of the key 
> size|https://github.com/apache/hadoop/pull/943/files#diff-2d061b57a9838854d07da9e0eca64f31R439].
>  So this size must be >0.
> {code:java}
> final long size = args.getDataSize() > 0 ?
>  args.getDataSize() : scmBlockSize;
> {code}
> We [pass this size when we call 
> allocateBlockInKey|https://github.com/apache/hadoop/pull/943/files#diff-2d061b57a9838854d07da9e0eca64f31R480].
>  The key must be greater than 0, so the "if (size > 0){}" in 
> allocateBlockInKey is redundant and should be removed.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Updated] (HDDS-4054) Remove duplicate judgments in allocateBlockInKey

2020-07-31 Thread mingchao zhao (Jira)


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

mingchao zhao updated HDDS-4054:

Issue Type: Improvement  (was: Bug)

> Remove duplicate judgments in allocateBlockInKey
> 
>
> Key: HDDS-4054
> URL: https://issues.apache.org/jira/browse/HDDS-4054
> Project: Hadoop Distributed Data Store
>  Issue Type: Improvement
>Reporter: mingchao zhao
>Priority: Major
>
> In HDDS-1666 we have [changed the size of the key 
> size|https://github.com/apache/hadoop/pull/943/files#diff-2d061b57a9838854d07da9e0eca64f31R439].
>  So this size must be >0.
> {code:java}
> final long size = args.getDataSize() > 0 ?
>  args.getDataSize() : scmBlockSize;
> {code}
> We [pass this size when we call 
> allocateBlockInKey|https://github.com/apache/hadoop/pull/943/files#diff-2d061b57a9838854d07da9e0eca64f31R480].
>  The key must be greater than 0, so the "if (size > 0){}" in 
> allocateBlockInKey is redundant and should be removed.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Updated] (HDDS-4054) Remove duplicate judgments in allocateBlockInKey

2020-07-31 Thread mingchao zhao (Jira)


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

mingchao zhao updated HDDS-4054:

Description: 
In HDDS-1666 we have [changed the size of the key 
size|https://github.com/apache/hadoop/pull/943/files#diff-2d061b57a9838854d07da9e0eca64f31R439].
 So this size must be >0.
{code:java}
final long size = args.getDataSize() > 0 ?
 args.getDataSize() : scmBlockSize;
{code}
We [pass this size when we call 
allocateBlockInKey|https://github.com/apache/hadoop/pull/943/files#diff-2d061b57a9838854d07da9e0eca64f31R480].
 The key must be greater than 0, so the "if (size > 0){}" in allocateBlockInKey 
is redundant and should be removed.

  was:
In HDDS-1666 we have [changed the size of the key 
size|https://github.com/apache/hadoop-ozone/blob/a95b0b8580ae2b3d093505efd85eeb31117467e2/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java#L438].
 So this size must be >0.
{code:java}
final long size = args.getDataSize() > 0 ?
 args.getDataSize() : scmBlockSize;
{code}
We [pass this size when we call 
allocateBlockInKey|#diff-2d061b57a9838854d07da9e0eca64f31R480]]. The key must 
be greater than 0, so the "if (size > 0){}" in allocateBlockInKey is redundant 
and should be removed.


> Remove duplicate judgments in allocateBlockInKey
> 
>
> Key: HDDS-4054
> URL: https://issues.apache.org/jira/browse/HDDS-4054
> Project: Hadoop Distributed Data Store
>  Issue Type: Bug
>Reporter: mingchao zhao
>Priority: Major
>
> In HDDS-1666 we have [changed the size of the key 
> size|https://github.com/apache/hadoop/pull/943/files#diff-2d061b57a9838854d07da9e0eca64f31R439].
>  So this size must be >0.
> {code:java}
> final long size = args.getDataSize() > 0 ?
>  args.getDataSize() : scmBlockSize;
> {code}
> We [pass this size when we call 
> allocateBlockInKey|https://github.com/apache/hadoop/pull/943/files#diff-2d061b57a9838854d07da9e0eca64f31R480].
>  The key must be greater than 0, so the "if (size > 0){}" in 
> allocateBlockInKey is redundant and should be removed.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Updated] (HDDS-4054) Remove duplicate judgments in allocateBlockInKey

2020-07-31 Thread mingchao zhao (Jira)


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

mingchao zhao updated HDDS-4054:

Description: 
In HDDS-1666 we have [changed the size of the key 
size|https://github.com/apache/hadoop-ozone/blob/a95b0b8580ae2b3d093505efd85eeb31117467e2/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java#L438].
 So this size must be >0.
{code:java}
final long size = args.getDataSize() > 0 ?
 args.getDataSize() : scmBlockSize;
{code}
We [pass this size when we call 
allocateBlockInKey|#diff-2d061b57a9838854d07da9e0eca64f31R480]]. The key must 
be greater than 0, so the "if (size > 0){}" in allocateBlockInKey is redundant 
and should be removed.

  was:
In HDDS-1666 we have [changed the size of the key 
size|https://github.com/apache/hadoop-ozone/blob/a95b0b8580ae2b3d093505efd85eeb31117467e2/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java#L438].
 So this size must be >0.
{code:java}
//代码占位符
final long size = args.getDataSize() > 0 ?
 args.getDataSize() : scmBlockSize;
{code}
We [pass this size when we call 
allocateBlockInKey|[https://github.com/apache/hadoop/pull/943/files#diff-2d061b57a9838854d07da9e0eca64f31R480]].
 The key must be greater than 0, so the "if (size > 0){}" in allocateBlockInKey 
is redundant and should be removed.


> Remove duplicate judgments in allocateBlockInKey
> 
>
> Key: HDDS-4054
> URL: https://issues.apache.org/jira/browse/HDDS-4054
> Project: Hadoop Distributed Data Store
>  Issue Type: Bug
>Reporter: mingchao zhao
>Priority: Major
>
> In HDDS-1666 we have [changed the size of the key 
> size|https://github.com/apache/hadoop-ozone/blob/a95b0b8580ae2b3d093505efd85eeb31117467e2/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java#L438].
>  So this size must be >0.
> {code:java}
> final long size = args.getDataSize() > 0 ?
>  args.getDataSize() : scmBlockSize;
> {code}
> We [pass this size when we call 
> allocateBlockInKey|#diff-2d061b57a9838854d07da9e0eca64f31R480]]. The key must 
> be greater than 0, so the "if (size > 0){}" in allocateBlockInKey is 
> redundant and should be removed.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Updated] (HDDS-4054) Remove duplicate judgments in allocateBlockInKey

2020-07-31 Thread mingchao zhao (Jira)


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

mingchao zhao updated HDDS-4054:

Description: 
In HDDS-1666 we have [changed the size of the key 
size|https://github.com/apache/hadoop-ozone/blob/a95b0b8580ae2b3d093505efd85eeb31117467e2/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java#L438].
 So this size must be >0.
{code:java}
//代码占位符
final long size = args.getDataSize() > 0 ?
 args.getDataSize() : scmBlockSize;
{code}
We [pass this size when we call 
allocateBlockInKey|[https://github.com/apache/hadoop/pull/943/files#diff-2d061b57a9838854d07da9e0eca64f31R480]].
 The key must be greater than 0, so the "if (size > 0){}" in allocateBlockInKey 
is redundant and should be removed.

  was:
In HDDS-1666 we have [changed the size of the key 
size|https://github.com/apache/hadoop-ozone/blob/a95b0b8580ae2b3d093505efd85eeb31117467e2/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java#L438].
 So this size must be >0.
{code:java}
//代码占位符
final long size = args.getDataSize() > 0 ?
 args.getDataSize() : scmBlockSize;
{code}
We pass this size when you call allocateBlockInKey. The key must be greater 
than 0, so the "if (size > 0){}" in allocateBlockInKey is redundant and should 
be removed.


> Remove duplicate judgments in allocateBlockInKey
> 
>
> Key: HDDS-4054
> URL: https://issues.apache.org/jira/browse/HDDS-4054
> Project: Hadoop Distributed Data Store
>  Issue Type: Bug
>Reporter: mingchao zhao
>Priority: Major
>
> In HDDS-1666 we have [changed the size of the key 
> size|https://github.com/apache/hadoop-ozone/blob/a95b0b8580ae2b3d093505efd85eeb31117467e2/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java#L438].
>  So this size must be >0.
> {code:java}
> //代码占位符
> final long size = args.getDataSize() > 0 ?
>  args.getDataSize() : scmBlockSize;
> {code}
> We [pass this size when we call 
> allocateBlockInKey|[https://github.com/apache/hadoop/pull/943/files#diff-2d061b57a9838854d07da9e0eca64f31R480]].
>  The key must be greater than 0, so the "if (size > 0){}" in 
> allocateBlockInKey is redundant and should be removed.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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