hy00nc commented on a change in pull request #258: [NEMO-429] SWPP TEAM 21 code
smell fix
URL: https://github.com/apache/incubator-nemo/pull/258#discussion_r352971924
##########
File path:
runtime/executor/src/main/java/org/apache/nemo/runtime/executor/data/block/Block.java
##########
@@ -120,12 +118,13 @@
* If another element is written after this method is called, a new
non-committed partition should be created
* for the element even if a partition with the same key is committed
already.
*
- * @throws BlockWriteException for any error occurred while trying to commit
partitions.
+ * @throws org.apache.nemo.common.exception.BlockWriteException for any
error occurred
Review comment:
For the methods that have no `throws` anymore, could you remove the lines
for `@throws` in the comments?
Yet we still need the explanation so maybe we could add something like this:
For
```
/**
* Commits this block to prevent further write.
*
* @return the size of each partition if the data in the block is
serialized.
* @throws BlockWriteException for any error occurred while trying to
commit a block.
* (This exception will be thrown to the
scheduler
* through {@link
org.apache.nemo.runtime.executor.Executor} and
* have to be handled by the scheduler with
fault tolerance mechanism.)
*/
```
may be changed to:
```
/**
* Commits this block to prevent further write.
* Classes that implement this interface may throw {@link
BlockWriteException}
* for any error occurred while trying to commit a block.
* (This exception will be thrown to the scheduler through {@link
org.apache.nemo.runtime.executor.Executor}
* and have to be handled by the scheduler with fault tolerance mechanism.)
*
* @return the size of each partition if the data in the block is
serialized.
*/
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services