You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mahout.apache.org by "Robert Burrell Donkin (JIRA)" <ji...@apache.org> on 2009/06/15 11:01:07 UTC

[jira] Created: (MAHOUT-134) [PATCH] Cluster decode error handling

[PATCH] Cluster decode error handling
-------------------------------------

                 Key: MAHOUT-134
                 URL: https://issues.apache.org/jira/browse/MAHOUT-134
             Project: Mahout
          Issue Type: Improvement
    Affects Versions: 0.2
            Reporter: Robert Burrell Donkin


ATM the javadocs are unclear as to whether null is an acceptable return value and callers do not null check the return value. However, the implementation may return null in or throw other runtime exceptions when the format is not correct. This makes it hard to diagnose when there's a problem with the format.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (MAHOUT-134) [PATCH] Cluster decode error handling

Posted by "Isabel Drost (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAHOUT-134?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Isabel Drost updated MAHOUT-134:
--------------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

Committed to revision 816588.

> [PATCH] Cluster decode error handling
> -------------------------------------
>
>                 Key: MAHOUT-134
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-134
>             Project: Mahout
>          Issue Type: Improvement
>    Affects Versions: 0.2
>            Reporter: Robert Burrell Donkin
>            Assignee: Isabel Drost
>             Fix For: 0.2
>
>         Attachments: MAHOUT-134.patch, mahout-cluster-format-error.patch, mahout-cluster-format-error.patch
>
>
> ATM the javadocs are unclear as to whether null is an acceptable return value and callers do not null check the return value. However, the implementation may return null in or throw other runtime exceptions when the format is not correct. This makes it hard to diagnose when there's a problem with the format.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (MAHOUT-134) [PATCH] Cluster decode error handling

Posted by "Isabel Drost (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAHOUT-134?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Isabel Drost updated MAHOUT-134:
--------------------------------

    Attachment: MAHOUT-134.patch

Adjusted patch to current trunk version.

> [PATCH] Cluster decode error handling
> -------------------------------------
>
>                 Key: MAHOUT-134
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-134
>             Project: Mahout
>          Issue Type: Improvement
>    Affects Versions: 0.2
>            Reporter: Robert Burrell Donkin
>             Fix For: 0.2
>
>         Attachments: MAHOUT-134.patch, mahout-cluster-format-error.patch, mahout-cluster-format-error.patch
>
>
> ATM the javadocs are unclear as to whether null is an acceptable return value and callers do not null check the return value. However, the implementation may return null in or throw other runtime exceptions when the format is not correct. This makes it hard to diagnose when there's a problem with the format.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (MAHOUT-134) [PATCH] Cluster decode error handling

Posted by "Robert Burrell Donkin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAHOUT-134?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Burrell Donkin updated MAHOUT-134:
-----------------------------------------

    Attachment: mahout-cluster-format-error.patch

This patch insists that the implementation returns not null. When the format is unknown an IllegalArgumentException will be thrown. If the caller can recover from a badly formatted cluster this exception can be caught. Otherwise, it provides reasonable diagnostic information.

> [PATCH] Cluster decode error handling
> -------------------------------------
>
>                 Key: MAHOUT-134
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-134
>             Project: Mahout
>          Issue Type: Improvement
>    Affects Versions: 0.2
>            Reporter: Robert Burrell Donkin
>         Attachments: mahout-cluster-format-error.patch
>
>
> ATM the javadocs are unclear as to whether null is an acceptable return value and callers do not null check the return value. However, the implementation may return null in or throw other runtime exceptions when the format is not correct. This makes it hard to diagnose when there's a problem with the format.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (MAHOUT-134) [PATCH] Cluster decode error handling

Posted by "Isabel Drost (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAHOUT-134?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Isabel Drost updated MAHOUT-134:
--------------------------------

    Assignee: Isabel Drost
      Status: Patch Available  (was: Reopened)

See last attachment. Committing on Friday if noone objects.

> [PATCH] Cluster decode error handling
> -------------------------------------
>
>                 Key: MAHOUT-134
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-134
>             Project: Mahout
>          Issue Type: Improvement
>    Affects Versions: 0.2
>            Reporter: Robert Burrell Donkin
>            Assignee: Isabel Drost
>             Fix For: 0.2
>
>         Attachments: MAHOUT-134.patch, mahout-cluster-format-error.patch, mahout-cluster-format-error.patch
>
>
> ATM the javadocs are unclear as to whether null is an acceptable return value and callers do not null check the return value. However, the implementation may return null in or throw other runtime exceptions when the format is not correct. This makes it hard to diagnose when there's a problem with the format.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (MAHOUT-134) [PATCH] Cluster decode error handling

Posted by "Robert Burrell Donkin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAHOUT-134?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Burrell Donkin reopened MAHOUT-134:
------------------------------------------


Index: core/src/main/java/org/apache/mahout/clustering/kmeans/Cluster.java
===================================================================
--- core/src/main/java/org/apache/mahout/clustering/kmeans/Cluster.java	(revision 784487)
+++ core/src/main/java/org/apache/mahout/clustering/kmeans/Cluster.java	(working copy)
@@ -84,7 +84,7 @@
    * @return a new Canopy
    */
   public static Cluster decodeCluster(String formattedString) {
-    int beginIndex = formattedString.indexOf('[');
+    int beginIndex = formattedString.indexOf('{');
     String id = formattedString.substring(0, beginIndex);
     String center = formattedString.substring(beginIndex);
     char firstChar = id.charAt(0);

in https://issues.apache.org/jira/secure/attachment/12410711/MAHOUT-65c.patch reverted a bounds check

> [PATCH] Cluster decode error handling
> -------------------------------------
>
>                 Key: MAHOUT-134
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-134
>             Project: Mahout
>          Issue Type: Improvement
>    Affects Versions: 0.2
>            Reporter: Robert Burrell Donkin
>             Fix For: 0.2
>
>         Attachments: mahout-cluster-format-error.patch, mahout-cluster-format-error.patch
>
>
> ATM the javadocs are unclear as to whether null is an acceptable return value and callers do not null check the return value. However, the implementation may return null in or throw other runtime exceptions when the format is not correct. This makes it hard to diagnose when there's a problem with the format.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (MAHOUT-134) [PATCH] Cluster decode error handling

Posted by "Grant Ingersoll (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAHOUT-134?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Grant Ingersoll resolved MAHOUT-134.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 0.2

Committed revision 785197.

> [PATCH] Cluster decode error handling
> -------------------------------------
>
>                 Key: MAHOUT-134
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-134
>             Project: Mahout
>          Issue Type: Improvement
>    Affects Versions: 0.2
>            Reporter: Robert Burrell Donkin
>             Fix For: 0.2
>
>         Attachments: mahout-cluster-format-error.patch
>
>
> ATM the javadocs are unclear as to whether null is an acceptable return value and callers do not null check the return value. However, the implementation may return null in or throw other runtime exceptions when the format is not correct. This makes it hard to diagnose when there's a problem with the format.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (MAHOUT-134) [PATCH] Cluster decode error handling

Posted by "Robert Burrell Donkin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAHOUT-134?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Burrell Donkin updated MAHOUT-134:
-----------------------------------------

    Attachment: mahout-cluster-format-error.patch

This patch combines the https://issues.apache.org/jira/secure/attachment/12410711/MAHOUT-65c.patch change with the additional error checks.

> [PATCH] Cluster decode error handling
> -------------------------------------
>
>                 Key: MAHOUT-134
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-134
>             Project: Mahout
>          Issue Type: Improvement
>    Affects Versions: 0.2
>            Reporter: Robert Burrell Donkin
>             Fix For: 0.2
>
>         Attachments: mahout-cluster-format-error.patch, mahout-cluster-format-error.patch
>
>
> ATM the javadocs are unclear as to whether null is an acceptable return value and callers do not null check the return value. However, the implementation may return null in or throw other runtime exceptions when the format is not correct. This makes it hard to diagnose when there's a problem with the format.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.