[
https://issues.apache.org/jira/browse/HAMA-39?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12627390#action_12627390
]
Edward J. Yoon commented on HAMA-39:
------------------------------------
Hmm, BTW, mapreduce throws an IOException as describe below.
{code}
public void map(IntWritable key, DenseVector value,
OutputCollector<IntWritable, DenseVector> output,
Reporter reporter) throws IOException {
Vector v1 = MATRIX_B.getRow(key.get());
{code}
IOException is better.
/**
* Gets the vector of row
*
* @param row the row index of the matrix
* @return the vector of row
* @throws IOException
*/
public Vector getRow(int row) throws IOException;
> Defining exception policies
> ----------------------------
>
> Key: HAMA-39
> URL: https://issues.apache.org/jira/browse/HAMA-39
> Project: Hama
> Issue Type: Improvement
> Components: interface
> Reporter: Edward J. Yoon
> Assignee: Suh Changhee
> Fix For: 0.1.0
>
>
> Each operations should have a throws clause.
> ----
> In class AbstractMatrix, the exception will be catch to call only LOG.error.
> I would like to discuss a bit more on this issue that how the system
> should do when an exception is thrown.
> But I don't think only logging an error is not enough.
> 1. re-throw the exception. This needs changes of the interface,
> probably we could have the new ComputationException class, or
> something.
> 2. throw a runtime expection, and of course JVM will die here.
> Regards,
> Chanwit
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.