You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Jesse Yates (JIRA)" <ji...@apache.org> on 2010/12/22 20:27:01 UTC

[jira] Created: (HBASE-3387) Pair does not deep check arrays for equality.

Pair does not deep check arrays for equality. 
----------------------------------------------

                 Key: HBASE-3387
                 URL: https://issues.apache.org/jira/browse/HBASE-3387
             Project: HBase
          Issue Type: Bug
          Components: util
    Affects Versions: 0.90.1
         Environment: Any (discovered in Ubuntu 10.10 using TRUNK). 
            Reporter: Jesse Yates
            Priority: Minor
             Fix For: 0.90.1


Pair does not deep check arrays for equality. It merely does x.equals(y) for the sent Object. However, with any type of array this is merely going to compare the array pointers, rather than the underlying data structure.

It requires a rewriting of the private equals method in Pair to check for elements being an array, then checking the underlying elements.

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


[jira] [Assigned] (HBASE-3387) Pair does not deep check arrays for equality.

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

stack reassigned HBASE-3387:
----------------------------

    Assignee: Jesse Yates
    
> Pair does not deep check arrays for equality. 
> ----------------------------------------------
>
>                 Key: HBASE-3387
>                 URL: https://issues.apache.org/jira/browse/HBASE-3387
>             Project: HBase
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 0.90.1
>         Environment: Any (discovered in Ubuntu 10.10 using TRUNK). 
>            Reporter: Jesse Yates
>            Assignee: Jesse Yates
>         Attachments: HBASE-3387-revert.patch, HBASE-3387.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Pair does not deep check arrays for equality. It merely does x.equals(y) for the sent Object. However, with any type of array this is merely going to compare the array pointers, rather than the underlying data structure.
> It requires a rewriting of the private equals method in Pair to check for elements being an array, then checking the underlying elements.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HBASE-3387) Pair does not deep check arrays for equality.

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

Jesse Yates updated HBASE-3387:
-------------------------------

    Attachment:     (was: HBASE-3387.patch)

> Pair does not deep check arrays for equality. 
> ----------------------------------------------
>
>                 Key: HBASE-3387
>                 URL: https://issues.apache.org/jira/browse/HBASE-3387
>             Project: HBase
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 0.90.1
>         Environment: Any (discovered in Ubuntu 10.10 using TRUNK). 
>            Reporter: Jesse Yates
>            Priority: Minor
>             Fix For: 0.90.1
>
>         Attachments: HBASE-3387.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Pair does not deep check arrays for equality. It merely does x.equals(y) for the sent Object. However, with any type of array this is merely going to compare the array pointers, rather than the underlying data structure.
> It requires a rewriting of the private equals method in Pair to check for elements being an array, then checking the underlying elements.

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


[jira] Updated: (HBASE-3387) Pair does not deep check arrays for equality.

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

Jesse Yates updated HBASE-3387:
-------------------------------

    Attachment: HBASE-3387.patch

Updated patch based on stack's comment's for || vs. && and (hopefully) license. 

Sorry about the late update - hotel internet was crapping out :-(

> Pair does not deep check arrays for equality. 
> ----------------------------------------------
>
>                 Key: HBASE-3387
>                 URL: https://issues.apache.org/jira/browse/HBASE-3387
>             Project: HBase
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 0.90.1
>         Environment: Any (discovered in Ubuntu 10.10 using TRUNK). 
>            Reporter: Jesse Yates
>            Priority: Minor
>             Fix For: 0.90.1
>
>         Attachments: HBASE-3387.patch, HBASE-3387.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Pair does not deep check arrays for equality. It merely does x.equals(y) for the sent Object. However, with any type of array this is merely going to compare the array pointers, rather than the underlying data structure.
> It requires a rewriting of the private equals method in Pair to check for elements being an array, then checking the underlying elements.

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


[jira] Commented: (HBASE-3387) Pair does not deep check arrays for equality.

Posted by "Nicolas Spiegelberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12982861#action_12982861 ] 

Nicolas Spiegelberg commented on HBASE-3387:
--------------------------------------------

Although the hasCode contract was the original issue that I noticed, a deeper issue that this is a fundamental violation of equivalence relationships (http://en.wikipedia.org/wiki/Equivalence_relation ).  In particular, overriding Java functionality for one special class is making Java's equality operations non-symmetric.  For example:

byte[] a = {0,1,2}, b = {0,1,2};
System.out.println( a.equals(b) );  // false
Pair<byte[], byte[]> pa = Pair.newPair(a,a); pb = Pair.newPair(b,b);
System.out.println(pa.equals(pb); // true
System.out.println(pa.getFirst().equals(pb.getFirst()) && pa.getSecond().equals(pb.getSecond())); // false

The current equals override makes it such that a == c && b == d is not symmetric with (a,b) == (c,d). 

I understand your problem with needing a deep comparison.  However, I think if you want deep comparisons, you need to take another action other than overriding a contracted Java API.  Example ideas:

1. Use org.apache.hadoop.hbase.util.Bytes.ByteArrayComparator for your collection's comparator or hand-roll your own.
2. Create a DeepEqual template class that utilizes java.util.Arrays.deepEquals & deepHashCode.  Then create a Pair<DeepEqual<T>, DeepEqual<T>>

However, the Pair class must be refactored to restore its equivalence relations.  The Pair/Tuple class is a well-known idiom and should act the same here as it does in C++, Python , and other languages.

> Pair does not deep check arrays for equality. 
> ----------------------------------------------
>
>                 Key: HBASE-3387
>                 URL: https://issues.apache.org/jira/browse/HBASE-3387
>             Project: HBase
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 0.90.1
>         Environment: Any (discovered in Ubuntu 10.10 using TRUNK). 
>            Reporter: Jesse Yates
>            Priority: Minor
>             Fix For: 0.90.1, 0.92.0
>
>         Attachments: HBASE-3387.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Pair does not deep check arrays for equality. It merely does x.equals(y) for the sent Object. However, with any type of array this is merely going to compare the array pointers, rather than the underlying data structure.
> It requires a rewriting of the private equals method in Pair to check for elements being an array, then checking the underlying elements.

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


[jira] Updated: (HBASE-3387) Pair does not deep check arrays for equality.

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

stack updated HBASE-3387:
-------------------------

       Resolution: Fixed
    Fix Version/s: 0.92.0
     Hadoop Flags: [Reviewed]
           Status: Resolved  (was: Patch Available)

Committed to TRUNK.  Thanks for the patch Jesse.  Will leave it in 0.90.1 bucket so it gets committed there too.

> Pair does not deep check arrays for equality. 
> ----------------------------------------------
>
>                 Key: HBASE-3387
>                 URL: https://issues.apache.org/jira/browse/HBASE-3387
>             Project: HBase
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 0.90.1
>         Environment: Any (discovered in Ubuntu 10.10 using TRUNK). 
>            Reporter: Jesse Yates
>            Priority: Minor
>             Fix For: 0.90.1, 0.92.0
>
>         Attachments: HBASE-3387.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Pair does not deep check arrays for equality. It merely does x.equals(y) for the sent Object. However, with any type of array this is merely going to compare the array pointers, rather than the underlying data structure.
> It requires a rewriting of the private equals method in Pair to check for elements being an array, then checking the underlying elements.

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


[jira] Updated: (HBASE-3387) Pair does not deep check arrays for equality.

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

Jesse Yates updated HBASE-3387:
-------------------------------

    Release Note: Pair now does a deep equals on arrays, rather than a shallow, pointer compare.
          Status: Patch Available  (was: Open)

> Pair does not deep check arrays for equality. 
> ----------------------------------------------
>
>                 Key: HBASE-3387
>                 URL: https://issues.apache.org/jira/browse/HBASE-3387
>             Project: HBase
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 0.90.1
>         Environment: Any (discovered in Ubuntu 10.10 using TRUNK). 
>            Reporter: Jesse Yates
>            Priority: Minor
>             Fix For: 0.90.1
>
>         Attachments: HBASE-3387.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Pair does not deep check arrays for equality. It merely does x.equals(y) for the sent Object. However, with any type of array this is merely going to compare the array pointers, rather than the underlying data structure.
> It requires a rewriting of the private equals method in Pair to check for elements being an array, then checking the underlying elements.

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


[jira] Updated: (HBASE-3387) Pair does not deep check arrays for equality.

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

Jesse Yates updated HBASE-3387:
-------------------------------

    Attachment: HBASE-3387.patch

Fix (and tests) for the issue. Does deep check on an array, if it is an array.

> Pair does not deep check arrays for equality. 
> ----------------------------------------------
>
>                 Key: HBASE-3387
>                 URL: https://issues.apache.org/jira/browse/HBASE-3387
>             Project: HBase
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 0.90.1
>         Environment: Any (discovered in Ubuntu 10.10 using TRUNK). 
>            Reporter: Jesse Yates
>            Priority: Minor
>             Fix For: 0.90.1
>
>         Attachments: HBASE-3387.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Pair does not deep check arrays for equality. It merely does x.equals(y) for the sent Object. However, with any type of array this is merely going to compare the array pointers, rather than the underlying data structure.
> It requires a rewriting of the private equals method in Pair to check for elements being an array, then checking the underlying elements.

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


[jira] Commented: (HBASE-3387) Pair does not deep check arrays for equality.

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12974357#action_12974357 ] 

stack commented on HBASE-3387:
------------------------------

Patch looks good Jesse.  Thanks for making it.   Minor comments are that you changed a bunch of formatting -- 90% of it is improvement over what was there previous -- but you messed up the license formatting on the top of the file.  Also, minor stylistic comment is that you wrote the equals with a load of indentation when you could have done without by doing the 'other' test first.  For example:

If instead of a #133 that looks like this:

{code}
+    if (x != null && y != null) {
{code}

.. you instead did:

{code}
if (x == null || y == null) return false;
{code}

... you'd save an indent and IMO the code is easier to read?

What you think?  If you'd like to fix the above, go for it... otherwise, i'll fix the license myself and commit as is.

Thanks.

> Pair does not deep check arrays for equality. 
> ----------------------------------------------
>
>                 Key: HBASE-3387
>                 URL: https://issues.apache.org/jira/browse/HBASE-3387
>             Project: HBase
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 0.90.1
>         Environment: Any (discovered in Ubuntu 10.10 using TRUNK). 
>            Reporter: Jesse Yates
>            Priority: Minor
>             Fix For: 0.90.1
>
>         Attachments: HBASE-3387.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Pair does not deep check arrays for equality. It merely does x.equals(y) for the sent Object. However, with any type of array this is merely going to compare the array pointers, rather than the underlying data structure.
> It requires a rewriting of the private equals method in Pair to check for elements being an array, then checking the underlying elements.

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


[jira] Commented: (HBASE-3387) Pair does not deep check arrays for equality.

Posted by "Jesse Yates (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12983178#action_12983178 ] 

Jesse Yates commented on HBASE-3387:
------------------------------------

Yeah, I got it- up by this afternoon.

Does it make any sense to add in a DeepCheck class (as discussed above) or should I just keep something like that application side?

> Pair does not deep check arrays for equality. 
> ----------------------------------------------
>
>                 Key: HBASE-3387
>                 URL: https://issues.apache.org/jira/browse/HBASE-3387
>             Project: HBase
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 0.90.1
>         Environment: Any (discovered in Ubuntu 10.10 using TRUNK). 
>            Reporter: Jesse Yates
>             Fix For: 0.90.1, 0.92.0
>
>         Attachments: HBASE-3387.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Pair does not deep check arrays for equality. It merely does x.equals(y) for the sent Object. However, with any type of array this is merely going to compare the array pointers, rather than the underlying data structure.
> It requires a rewriting of the private equals method in Pair to check for elements being an array, then checking the underlying elements.

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


[jira] Updated: (HBASE-3387) Pair does not deep check arrays for equality.

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

Jesse Yates updated HBASE-3387:
-------------------------------

    Attachment: HBASE-3387.patch

Sorry about the non-working patch - turns out it was b/c git diff (at least in my setup) appends a/ and b/ to the directories of the original and new versions. This means that the patch will necessarily fail. Went back through, edited by hand and double checked that it works this time. Sorry again!

> Pair does not deep check arrays for equality. 
> ----------------------------------------------
>
>                 Key: HBASE-3387
>                 URL: https://issues.apache.org/jira/browse/HBASE-3387
>             Project: HBase
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 0.90.1
>         Environment: Any (discovered in Ubuntu 10.10 using TRUNK). 
>            Reporter: Jesse Yates
>            Priority: Minor
>             Fix For: 0.90.1
>
>         Attachments: HBASE-3387.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Pair does not deep check arrays for equality. It merely does x.equals(y) for the sent Object. However, with any type of array this is merely going to compare the array pointers, rather than the underlying data structure.
> It requires a rewriting of the private equals method in Pair to check for elements being an array, then checking the underlying elements.

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


[jira] Commented: (HBASE-3387) Pair does not deep check arrays for equality.

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12974383#action_12974383 ] 

stack commented on HBASE-3387:
------------------------------

Your formatting improvements were near all moving the file closer to the hbase 'standard' format so they are all good.  The only mess was the way it did license at head of the file.  Fix if you can.  Don't worry if you can't.  If'll fix on commit.  Thanks.

> Pair does not deep check arrays for equality. 
> ----------------------------------------------
>
>                 Key: HBASE-3387
>                 URL: https://issues.apache.org/jira/browse/HBASE-3387
>             Project: HBase
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 0.90.1
>         Environment: Any (discovered in Ubuntu 10.10 using TRUNK). 
>            Reporter: Jesse Yates
>            Priority: Minor
>             Fix For: 0.90.1
>
>         Attachments: HBASE-3387.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Pair does not deep check arrays for equality. It merely does x.equals(y) for the sent Object. However, with any type of array this is merely going to compare the array pointers, rather than the underlying data structure.
> It requires a rewriting of the private equals method in Pair to check for elements being an array, then checking the underlying elements.

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


[jira] Commented: (HBASE-3387) Pair does not deep check arrays for equality.

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12975634#action_12975634 ] 

stack commented on HBASE-3387:
------------------------------

@Jesse When I try to apply this patch I get this:

{code}
stack:trunk Stack$ patch -p1 < HBASE-3387.patch 
patching file src/main/java/org/apache/hadoop/hbase/util/Pair.java
patch: **** malformed patch at line 34:   * @param <T1>
{code}

Does it apply for you?

> Pair does not deep check arrays for equality. 
> ----------------------------------------------
>
>                 Key: HBASE-3387
>                 URL: https://issues.apache.org/jira/browse/HBASE-3387
>             Project: HBase
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 0.90.1
>         Environment: Any (discovered in Ubuntu 10.10 using TRUNK). 
>            Reporter: Jesse Yates
>            Priority: Minor
>             Fix For: 0.90.1
>
>         Attachments: HBASE-3387.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Pair does not deep check arrays for equality. It merely does x.equals(y) for the sent Object. However, with any type of array this is merely going to compare the array pointers, rather than the underlying data structure.
> It requires a rewriting of the private equals method in Pair to check for elements being an array, then checking the underlying elements.

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


[jira] Commented: (HBASE-3387) Pair does not deep check arrays for equality.

Posted by "Jesse Yates (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12974373#action_12974373 ] 

Jesse Yates commented on HBASE-3387:
------------------------------------

Stack, I see what you are saying about the && vs ||. I think the original way involves and extra line (was shooting or concise), but I prefer your way; I'll switch it up.

Sorry about the reformatting- old eclipse autoformat habits die hard- though I was using trying to use the hbase std format. Do you want me to switch it back to the old version or just keep it?

> Pair does not deep check arrays for equality. 
> ----------------------------------------------
>
>                 Key: HBASE-3387
>                 URL: https://issues.apache.org/jira/browse/HBASE-3387
>             Project: HBase
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 0.90.1
>         Environment: Any (discovered in Ubuntu 10.10 using TRUNK). 
>            Reporter: Jesse Yates
>            Priority: Minor
>             Fix For: 0.90.1
>
>         Attachments: HBASE-3387.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Pair does not deep check arrays for equality. It merely does x.equals(y) for the sent Object. However, with any type of array this is merely going to compare the array pointers, rather than the underlying data structure.
> It requires a rewriting of the private equals method in Pair to check for elements being an array, then checking the underlying elements.

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


[jira] Commented: (HBASE-3387) Pair does not deep check arrays for equality.

Posted by "Jesse Yates (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12982671#action_12982671 ] 

Jesse Yates commented on HBASE-3387:
------------------------------------

This was introduced to correct behavior in software on my side (e.g. non-HBase core) that for all intents and purposes should have worked, but didn't because of the previous definition of Pair.equals().

As far as the equals/hashCode issue, we could also overwrite the hashCode in Pair to ensure that the equals and hashCode methods work out to the same equality.

This change was made because they underlying arrays really should check the underlying types in Pairs, to check if they really would be the same thing. If we fix the hashCode method, then I think we end up with a system that is really more flexible than just comparing the pointer addresses.

. Is there somewhere in HBase where this breaks the current model and I just missed it?

> Pair does not deep check arrays for equality. 
> ----------------------------------------------
>
>                 Key: HBASE-3387
>                 URL: https://issues.apache.org/jira/browse/HBASE-3387
>             Project: HBase
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 0.90.1
>         Environment: Any (discovered in Ubuntu 10.10 using TRUNK). 
>            Reporter: Jesse Yates
>            Priority: Minor
>             Fix For: 0.90.1, 0.92.0
>
>         Attachments: HBASE-3387.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Pair does not deep check arrays for equality. It merely does x.equals(y) for the sent Object. However, with any type of array this is merely going to compare the array pointers, rather than the underlying data structure.
> It requires a rewriting of the private equals method in Pair to check for elements being an array, then checking the underlying elements.

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


[jira] Commented: (HBASE-3387) Pair does not deep check arrays for equality.

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12983959#action_12983959 ] 

stack commented on HBASE-3387:
------------------------------

I just applied your revert patch to trunk and 0.90 branch Jesse.  Thanks for providing it Jesse.   Thanks Nicolas for catching this.  I should have.

> Pair does not deep check arrays for equality. 
> ----------------------------------------------
>
>                 Key: HBASE-3387
>                 URL: https://issues.apache.org/jira/browse/HBASE-3387
>             Project: HBase
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 0.90.1
>         Environment: Any (discovered in Ubuntu 10.10 using TRUNK). 
>            Reporter: Jesse Yates
>             Fix For: 0.90.1, 0.92.0
>
>         Attachments: HBASE-3387-revert.patch, HBASE-3387.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Pair does not deep check arrays for equality. It merely does x.equals(y) for the sent Object. However, with any type of array this is merely going to compare the array pointers, rather than the underlying data structure.
> It requires a rewriting of the private equals method in Pair to check for elements being an array, then checking the underlying elements.

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


[jira] Updated: (HBASE-3387) Pair does not deep check arrays for equality.

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

stack updated HBASE-3387:
-------------------------

    Priority: Major  (was: Minor)

Upping priority some.

> Pair does not deep check arrays for equality. 
> ----------------------------------------------
>
>                 Key: HBASE-3387
>                 URL: https://issues.apache.org/jira/browse/HBASE-3387
>             Project: HBase
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 0.90.1
>         Environment: Any (discovered in Ubuntu 10.10 using TRUNK). 
>            Reporter: Jesse Yates
>             Fix For: 0.90.1, 0.92.0
>
>         Attachments: HBASE-3387.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Pair does not deep check arrays for equality. It merely does x.equals(y) for the sent Object. However, with any type of array this is merely going to compare the array pointers, rather than the underlying data structure.
> It requires a rewriting of the private equals method in Pair to check for elements being an array, then checking the underlying elements.

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


[jira] Commented: (HBASE-3387) Pair does not deep check arrays for equality.

Posted by "Nicolas Spiegelberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12982489#action_12982489 ] 

Nicolas Spiegelberg commented on HBASE-3387:
--------------------------------------------

This JIRA patch is a big consistency problem and should be reverted!  http://www.ibm.com/developerworks/java/library/j-jtp05273.html  

Basically, java containers assume a.equals(b) == false if a.hashcode() != b.hashcode().  Furthermore,

byte[] a = {0,1,2}, b = {0,1,2};
false == a.equals(b)
true == Pair.newPair(a,a).equals(Pair.newPair(b,b))

Was this patch introduced to fix any bug in the existing subsystem?

> Pair does not deep check arrays for equality. 
> ----------------------------------------------
>
>                 Key: HBASE-3387
>                 URL: https://issues.apache.org/jira/browse/HBASE-3387
>             Project: HBase
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 0.90.1
>         Environment: Any (discovered in Ubuntu 10.10 using TRUNK). 
>            Reporter: Jesse Yates
>            Priority: Minor
>             Fix For: 0.90.1, 0.92.0
>
>         Attachments: HBASE-3387.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Pair does not deep check arrays for equality. It merely does x.equals(y) for the sent Object. However, with any type of array this is merely going to compare the array pointers, rather than the underlying data structure.
> It requires a rewriting of the private equals method in Pair to check for elements being an array, then checking the underlying elements.

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


[jira] Updated: (HBASE-3387) Pair does not deep check arrays for equality.

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

stack updated HBASE-3387:
-------------------------

    Fix Version/s:     (was: 0.90.1)
                       (was: 0.92.0)

Moving out of 0.90.1.

> Pair does not deep check arrays for equality. 
> ----------------------------------------------
>
>                 Key: HBASE-3387
>                 URL: https://issues.apache.org/jira/browse/HBASE-3387
>             Project: HBase
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 0.90.1
>         Environment: Any (discovered in Ubuntu 10.10 using TRUNK). 
>            Reporter: Jesse Yates
>         Attachments: HBASE-3387-revert.patch, HBASE-3387.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Pair does not deep check arrays for equality. It merely does x.equals(y) for the sent Object. However, with any type of array this is merely going to compare the array pointers, rather than the underlying data structure.
> It requires a rewriting of the private equals method in Pair to check for elements being an array, then checking the underlying elements.

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


[jira] Reopened: (HBASE-3387) Pair does not deep check arrays for equality.

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

stack reopened HBASE-3387:
--------------------------


Reopening to commit 0.90.1

> Pair does not deep check arrays for equality. 
> ----------------------------------------------
>
>                 Key: HBASE-3387
>                 URL: https://issues.apache.org/jira/browse/HBASE-3387
>             Project: HBase
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 0.90.1
>         Environment: Any (discovered in Ubuntu 10.10 using TRUNK). 
>            Reporter: Jesse Yates
>            Priority: Minor
>             Fix For: 0.90.1, 0.92.0
>
>         Attachments: HBASE-3387.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Pair does not deep check arrays for equality. It merely does x.equals(y) for the sent Object. However, with any type of array this is merely going to compare the array pointers, rather than the underlying data structure.
> It requires a rewriting of the private equals method in Pair to check for elements being an array, then checking the underlying elements.

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


[jira] Resolved: (HBASE-3387) Pair does not deep check arrays for equality.

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

stack resolved HBASE-3387.
--------------------------

    Resolution: Fixed

Committed to branch after tagging RC2

> Pair does not deep check arrays for equality. 
> ----------------------------------------------
>
>                 Key: HBASE-3387
>                 URL: https://issues.apache.org/jira/browse/HBASE-3387
>             Project: HBase
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 0.90.1
>         Environment: Any (discovered in Ubuntu 10.10 using TRUNK). 
>            Reporter: Jesse Yates
>            Priority: Minor
>             Fix For: 0.90.1, 0.92.0
>
>         Attachments: HBASE-3387.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Pair does not deep check arrays for equality. It merely does x.equals(y) for the sent Object. However, with any type of array this is merely going to compare the array pointers, rather than the underlying data structure.
> It requires a rewriting of the private equals method in Pair to check for elements being an array, then checking the underlying elements.

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


[jira] Updated: (HBASE-3387) Pair does not deep check arrays for equality.

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

Jesse Yates updated HBASE-3387:
-------------------------------

    Attachment:     (was: HBASE-3387.patch)

> Pair does not deep check arrays for equality. 
> ----------------------------------------------
>
>                 Key: HBASE-3387
>                 URL: https://issues.apache.org/jira/browse/HBASE-3387
>             Project: HBase
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 0.90.1
>         Environment: Any (discovered in Ubuntu 10.10 using TRUNK). 
>            Reporter: Jesse Yates
>            Priority: Minor
>             Fix For: 0.90.1
>
>         Attachments: HBASE-3387.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Pair does not deep check arrays for equality. It merely does x.equals(y) for the sent Object. However, with any type of array this is merely going to compare the array pointers, rather than the underlying data structure.
> It requires a rewriting of the private equals method in Pair to check for elements being an array, then checking the underlying elements.

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


[jira] Updated: (HBASE-3387) Pair does not deep check arrays for equality.

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

Jesse Yates updated HBASE-3387:
-------------------------------

    Attachment: HBASE-3387-revert.patch

Revert patch for HBASE-3387 issue to roll back the changes as per discussion.

> Pair does not deep check arrays for equality. 
> ----------------------------------------------
>
>                 Key: HBASE-3387
>                 URL: https://issues.apache.org/jira/browse/HBASE-3387
>             Project: HBase
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 0.90.1
>         Environment: Any (discovered in Ubuntu 10.10 using TRUNK). 
>            Reporter: Jesse Yates
>             Fix For: 0.90.1, 0.92.0
>
>         Attachments: HBASE-3387-revert.patch, HBASE-3387.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Pair does not deep check arrays for equality. It merely does x.equals(y) for the sent Object. However, with any type of array this is merely going to compare the array pointers, rather than the underlying data structure.
> It requires a rewriting of the private equals method in Pair to check for elements being an array, then checking the underlying elements.

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


[jira] Commented: (HBASE-3387) Pair does not deep check arrays for equality.

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12984006#action_12984006 ] 

Hudson commented on HBASE-3387:
-------------------------------

Integrated in HBase-TRUNK #1714 (See [https://hudson.apache.org/hudson/job/HBase-TRUNK/1714/])
    HBASE-3387 Pair does not deep check arrays for equality -- REVERTED


> Pair does not deep check arrays for equality. 
> ----------------------------------------------
>
>                 Key: HBASE-3387
>                 URL: https://issues.apache.org/jira/browse/HBASE-3387
>             Project: HBase
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 0.90.1
>         Environment: Any (discovered in Ubuntu 10.10 using TRUNK). 
>            Reporter: Jesse Yates
>             Fix For: 0.90.1, 0.92.0
>
>         Attachments: HBASE-3387-revert.patch, HBASE-3387.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Pair does not deep check arrays for equality. It merely does x.equals(y) for the sent Object. However, with any type of array this is merely going to compare the array pointers, rather than the underlying data structure.
> It requires a rewriting of the private equals method in Pair to check for elements being an array, then checking the underlying elements.

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


[jira] Commented: (HBASE-3387) Pair does not deep check arrays for equality.

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12983034#action_12983034 ] 

stack commented on HBASE-3387:
------------------------------

Thanks for catching this Nicolas.  Jesse you want to have a go at it?  Otherwise I will.

> Pair does not deep check arrays for equality. 
> ----------------------------------------------
>
>                 Key: HBASE-3387
>                 URL: https://issues.apache.org/jira/browse/HBASE-3387
>             Project: HBase
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 0.90.1
>         Environment: Any (discovered in Ubuntu 10.10 using TRUNK). 
>            Reporter: Jesse Yates
>            Priority: Minor
>             Fix For: 0.90.1, 0.92.0
>
>         Attachments: HBASE-3387.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Pair does not deep check arrays for equality. It merely does x.equals(y) for the sent Object. However, with any type of array this is merely going to compare the array pointers, rather than the underlying data structure.
> It requires a rewriting of the private equals method in Pair to check for elements being an array, then checking the underlying elements.

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


[jira] Commented: (HBASE-3387) Pair does not deep check arrays for equality.

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12975706#action_12975706 ] 

Hudson commented on HBASE-3387:
-------------------------------

Integrated in HBase-TRUNK #1699 (See [https://hudson.apache.org/hudson/job/HBase-TRUNK/1699/])
    HBASE-3387 Pair does not deep check arrays for equality


> Pair does not deep check arrays for equality. 
> ----------------------------------------------
>
>                 Key: HBASE-3387
>                 URL: https://issues.apache.org/jira/browse/HBASE-3387
>             Project: HBase
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 0.90.1
>         Environment: Any (discovered in Ubuntu 10.10 using TRUNK). 
>            Reporter: Jesse Yates
>            Priority: Minor
>             Fix For: 0.90.1, 0.92.0
>
>         Attachments: HBASE-3387.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Pair does not deep check arrays for equality. It merely does x.equals(y) for the sent Object. However, with any type of array this is merely going to compare the array pointers, rather than the underlying data structure.
> It requires a rewriting of the private equals method in Pair to check for elements being an array, then checking the underlying elements.

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


[jira] Commented: (HBASE-3387) Pair does not deep check arrays for equality.

Posted by "Ed Kohlwey (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-3387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12982775#action_12982775 ] 

Ed Kohlwey commented on HBASE-3387:
-----------------------------------

@Nicolas Spiegelberg
Is the issue just that the hashCode contract isn't kept here? I'd suggest that thats a separate bug (missing hashCode), but not an issue such that the patch needs to be reverted.

> Pair does not deep check arrays for equality. 
> ----------------------------------------------
>
>                 Key: HBASE-3387
>                 URL: https://issues.apache.org/jira/browse/HBASE-3387
>             Project: HBase
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 0.90.1
>         Environment: Any (discovered in Ubuntu 10.10 using TRUNK). 
>            Reporter: Jesse Yates
>            Priority: Minor
>             Fix For: 0.90.1, 0.92.0
>
>         Attachments: HBASE-3387.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Pair does not deep check arrays for equality. It merely does x.equals(y) for the sent Object. However, with any type of array this is merely going to compare the array pointers, rather than the underlying data structure.
> It requires a rewriting of the private equals method in Pair to check for elements being an array, then checking the underlying elements.

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