You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Chris Douglas (JIRA)" <ji...@apache.org> on 2008/09/10 23:48:44 UTC

[jira] Created: (HADOOP-4151) Add a memcmp-compatible interface for key types

Add a memcmp-compatible interface for key types
-----------------------------------------------

                 Key: HADOOP-4151
                 URL: https://issues.apache.org/jira/browse/HADOOP-4151
             Project: Hadoop Core
          Issue Type: Improvement
            Reporter: Chris Douglas
            Assignee: Chris Douglas
             Fix For: 0.19.0
         Attachments: 4151-0.patch

Sometimes it's beneficial to treat types (like BytesWritable and Text) as byte arrays, agnostic to their type. Adding an interface to tag key types as amenable to this treatment can permit optimizations and reuse for that subset of types in tools and libraries.

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


[jira] Updated: (HADOOP-4151) Add a memcmp-compatible interface for key types

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

Chris Douglas updated HADOOP-4151:
----------------------------------

    Attachment:     (was: 4151-1.patch)

> Add a memcmp-compatible interface for key types
> -----------------------------------------------
>
>                 Key: HADOOP-4151
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4151
>             Project: Hadoop Core
>          Issue Type: Improvement
>            Reporter: Chris Douglas
>            Assignee: Chris Douglas
>            Priority: Minor
>             Fix For: 0.19.0
>
>         Attachments: 4151-0.patch, 4151-1.patch
>
>
> Sometimes it's beneficial to treat types (like BytesWritable and Text) as byte arrays, agnostic to their type. Adding an interface to tag key types as amenable to this treatment can permit optimizations and reuse for that subset of types in tools and libraries.

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


[jira] Updated: (HADOOP-4151) Add a memcmp-compatible interface for key types

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

Chris Douglas updated HADOOP-4151:
----------------------------------

    Attachment:     (was: 4151-3.patch)

> Add a memcmp-compatible interface for key types
> -----------------------------------------------
>
>                 Key: HADOOP-4151
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4151
>             Project: Hadoop Core
>          Issue Type: Improvement
>            Reporter: Chris Douglas
>            Assignee: Chris Douglas
>            Priority: Minor
>             Fix For: 0.19.0
>
>         Attachments: 4151-0.patch, 4151-1.patch, 4151-2.patch, 4151-3.patch
>
>
> Sometimes it's beneficial to treat types (like BytesWritable and Text) as byte arrays, agnostic to their type. Adding an interface to tag key types as amenable to this treatment can permit optimizations and reuse for that subset of types in tools and libraries.

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


[jira] Commented: (HADOOP-4151) Add a memcmp-compatible interface for key types

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-4151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12629994#action_12629994 ] 

Doug Cutting commented on HADOOP-4151:
--------------------------------------

Since it doesn't implement Comparable, perhaps it should instead be called Byteable or somesuch?

> Add a memcmp-compatible interface for key types
> -----------------------------------------------
>
>                 Key: HADOOP-4151
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4151
>             Project: Hadoop Core
>          Issue Type: Improvement
>            Reporter: Chris Douglas
>            Assignee: Chris Douglas
>            Priority: Minor
>             Fix For: 0.19.0
>
>         Attachments: 4151-0.patch
>
>
> Sometimes it's beneficial to treat types (like BytesWritable and Text) as byte arrays, agnostic to their type. Adding an interface to tag key types as amenable to this treatment can permit optimizations and reuse for that subset of types in tools and libraries.

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


[jira] Commented: (HADOOP-4151) Add a memcmp-compatible interface for key types

Posted by "Chris Douglas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-4151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12630480#action_12630480 ] 

Chris Douglas commented on HADOOP-4151:
---------------------------------------

The findbugs warnings complain about Text and BytesWritable implementing equals, but not hashCode. Both implementations do a type check before calling the superclass equals, which doesn't violate the incompatibility findbugs is warning about, and remains backwards-compatible. There are at least four ways to address the warnings, ordered as I'd prefer:
# Remove equals(Object) from both, so MemComparable::equals is used and text_inst.equals(bytesW_inst) can return true
# Add a hashCode to both that calls super.hashCode
# Ignore the findbugs warnings
# Remove equals(Object) from both but include a type check in MemComparable::equals

Thoughts? The test failure is not related to this patch.

> Add a memcmp-compatible interface for key types
> -----------------------------------------------
>
>                 Key: HADOOP-4151
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4151
>             Project: Hadoop Core
>          Issue Type: Improvement
>            Reporter: Chris Douglas
>            Assignee: Chris Douglas
>            Priority: Minor
>             Fix For: 0.19.0
>
>         Attachments: 4151-0.patch, 4151-1.patch, 4151-2.patch
>
>
> Sometimes it's beneficial to treat types (like BytesWritable and Text) as byte arrays, agnostic to their type. Adding an interface to tag key types as amenable to this treatment can permit optimizations and reuse for that subset of types in tools and libraries.

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


[jira] Updated: (HADOOP-4151) Add a memcmp-compatible interface for key types

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

Chris Douglas updated HADOOP-4151:
----------------------------------

    Attachment: 4151-0.patch

Added a MemComparable interface, added it to Text and BytesWritable, changed BytesWritable to conform to it, and updated core and unit tests.

> Add a memcmp-compatible interface for key types
> -----------------------------------------------
>
>                 Key: HADOOP-4151
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4151
>             Project: Hadoop Core
>          Issue Type: Improvement
>            Reporter: Chris Douglas
>            Assignee: Chris Douglas
>             Fix For: 0.19.0
>
>         Attachments: 4151-0.patch
>
>
> Sometimes it's beneficial to treat types (like BytesWritable and Text) as byte arrays, agnostic to their type. Adding an interface to tag key types as amenable to this treatment can permit optimizations and reuse for that subset of types in tools and libraries.

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


[jira] Updated: (HADOOP-4151) Add a memcmp-compatible interface for key types

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

Chris Douglas updated HADOOP-4151:
----------------------------------

    Attachment: 4151-4.patch

BinaryComparable is probably clearer. Sorry about the bin/hadoop change; that belongs with HADOOP-3019 (which is missing it *oops*). Updated patch

> Add a memcmp-compatible interface for key types
> -----------------------------------------------
>
>                 Key: HADOOP-4151
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4151
>             Project: Hadoop Core
>          Issue Type: Improvement
>            Reporter: Chris Douglas
>            Assignee: Chris Douglas
>            Priority: Minor
>             Fix For: 0.19.0
>
>         Attachments: 4151-0.patch, 4151-1.patch, 4151-2.patch, 4151-3.patch, 4151-4.patch
>
>
> Sometimes it's beneficial to treat types (like BytesWritable and Text) as byte arrays, agnostic to their type. Adding an interface to tag key types as amenable to this treatment can permit optimizations and reuse for that subset of types in tools and libraries.

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


[jira] Updated: (HADOOP-4151) Add a memcmp-compatible interface for key types

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

Chris Douglas updated HADOOP-4151:
----------------------------------

    Status: Patch Available  (was: Open)

> Add a memcmp-compatible interface for key types
> -----------------------------------------------
>
>                 Key: HADOOP-4151
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4151
>             Project: Hadoop Core
>          Issue Type: Improvement
>            Reporter: Chris Douglas
>            Assignee: Chris Douglas
>            Priority: Minor
>             Fix For: 0.19.0
>
>         Attachments: 4151-0.patch, 4151-1.patch, 4151-2.patch, 4151-3.patch
>
>
> Sometimes it's beneficial to treat types (like BytesWritable and Text) as byte arrays, agnostic to their type. Adding an interface to tag key types as amenable to this treatment can permit optimizations and reuse for that subset of types in tools and libraries.

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


[jira] Commented: (HADOOP-4151) Add a memcmp-compatible interface for key types

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-4151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12630078#action_12630078 ] 

Hadoop QA commented on HADOOP-4151:
-----------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12389877/4151-2.patch
  against trunk revision 693705.

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 15 new or modified tests.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    -1 findbugs.  The patch appears to introduce 2 new Findbugs warnings.

    -1 core tests.  The patch failed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3238/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3238/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3238/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3238/console

This message is automatically generated.

> Add a memcmp-compatible interface for key types
> -----------------------------------------------
>
>                 Key: HADOOP-4151
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4151
>             Project: Hadoop Core
>          Issue Type: Improvement
>            Reporter: Chris Douglas
>            Assignee: Chris Douglas
>            Priority: Minor
>             Fix For: 0.19.0
>
>         Attachments: 4151-0.patch, 4151-1.patch, 4151-2.patch
>
>
> Sometimes it's beneficial to treat types (like BytesWritable and Text) as byte arrays, agnostic to their type. Adding an interface to tag key types as amenable to this treatment can permit optimizations and reuse for that subset of types in tools and libraries.

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


[jira] Updated: (HADOOP-4151) Add a memcmp-compatible interface for key types

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

Chris Douglas updated HADOOP-4151:
----------------------------------

    Hadoop Flags: [Incompatible change]

> Add a memcmp-compatible interface for key types
> -----------------------------------------------
>
>                 Key: HADOOP-4151
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4151
>             Project: Hadoop Core
>          Issue Type: Improvement
>            Reporter: Chris Douglas
>            Assignee: Chris Douglas
>            Priority: Minor
>             Fix For: 0.19.0
>
>         Attachments: 4151-0.patch, 4151-1.patch, 4151-2.patch
>
>
> Sometimes it's beneficial to treat types (like BytesWritable and Text) as byte arrays, agnostic to their type. Adding an interface to tag key types as amenable to this treatment can permit optimizations and reuse for that subset of types in tools and libraries.

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


[jira] Updated: (HADOOP-4151) Add a memcmp-compatible interface for key types

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

Chris Douglas updated HADOOP-4151:
----------------------------------

    Attachment: 4151-3.patch

Wrong version of MemComparable, which left out {{compareTo(byte[], int, int)}}; updating patch.

> Add a memcmp-compatible interface for key types
> -----------------------------------------------
>
>                 Key: HADOOP-4151
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4151
>             Project: Hadoop Core
>          Issue Type: Improvement
>            Reporter: Chris Douglas
>            Assignee: Chris Douglas
>            Priority: Minor
>             Fix For: 0.19.0
>
>         Attachments: 4151-0.patch, 4151-1.patch, 4151-2.patch, 4151-3.patch
>
>
> Sometimes it's beneficial to treat types (like BytesWritable and Text) as byte arrays, agnostic to their type. Adding an interface to tag key types as amenable to this treatment can permit optimizations and reuse for that subset of types in tools and libraries.

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


[jira] Commented: (HADOOP-4151) Add a memcmp-compatible interface for key types

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-4151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631179#action_12631179 ] 

Doug Cutting commented on HADOOP-4151:
--------------------------------------

This looks good to me, although I'd prefer a name like BinaryComparable.  Also, I think the change to bin/hadoop is from another issue?

> Add a memcmp-compatible interface for key types
> -----------------------------------------------
>
>                 Key: HADOOP-4151
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4151
>             Project: Hadoop Core
>          Issue Type: Improvement
>            Reporter: Chris Douglas
>            Assignee: Chris Douglas
>            Priority: Minor
>             Fix For: 0.19.0
>
>         Attachments: 4151-0.patch, 4151-1.patch, 4151-2.patch, 4151-3.patch
>
>
> Sometimes it's beneficial to treat types (like BytesWritable and Text) as byte arrays, agnostic to their type. Adding an interface to tag key types as amenable to this treatment can permit optimizations and reuse for that subset of types in tools and libraries.

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


[jira] Updated: (HADOOP-4151) Add a memcmp-compatible interface for key types

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

Chris Douglas updated HADOOP-4151:
----------------------------------

    Attachment: 4151-1.patch

*nod* I thought about making it extend Comparable- because the type does imply that the instance can be ordered and permuted relative to these bytes- but that would force each implementor to write a (likely redundant) compare(T).

What would you think of making it an abstract class, like:
{code}
public abstract class MemComparable implements Comparable<MemComparable> {
  public abstract int getLength();
  public abstract byte[] getBytes();
  public int compareTo(MemComparable other) {
    if (this == other)
      return 0;
    return WritableComparator.compareBytes(getBytes(), 0, getLength(),
             other.getBytes(), 0, other.getLength());
  }
}
{code}

> Add a memcmp-compatible interface for key types
> -----------------------------------------------
>
>                 Key: HADOOP-4151
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4151
>             Project: Hadoop Core
>          Issue Type: Improvement
>            Reporter: Chris Douglas
>            Assignee: Chris Douglas
>            Priority: Minor
>             Fix For: 0.19.0
>
>         Attachments: 4151-0.patch, 4151-1.patch
>
>
> Sometimes it's beneficial to treat types (like BytesWritable and Text) as byte arrays, agnostic to their type. Adding an interface to tag key types as amenable to this treatment can permit optimizations and reuse for that subset of types in tools and libraries.

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


[jira] Commented: (HADOOP-4151) Add a memcmp-compatible interface for key types

Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-4151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631185#action_12631185 ] 

Tsz Wo (Nicholas), SZE commented on HADOOP-4151:
------------------------------------------------

I think you accidentally changed bin/hadoop.

> Add a memcmp-compatible interface for key types
> -----------------------------------------------
>
>                 Key: HADOOP-4151
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4151
>             Project: Hadoop Core
>          Issue Type: Improvement
>            Reporter: Chris Douglas
>            Assignee: Chris Douglas
>            Priority: Minor
>             Fix For: 0.19.0
>
>         Attachments: 4151-0.patch, 4151-1.patch, 4151-2.patch, 4151-3.patch, 4151-4.patch
>
>
> Sometimes it's beneficial to treat types (like BytesWritable and Text) as byte arrays, agnostic to their type. Adding an interface to tag key types as amenable to this treatment can permit optimizations and reuse for that subset of types in tools and libraries.

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


[jira] Updated: (HADOOP-4151) Add a memcmp-compatible interface for key types

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

Chris Douglas updated HADOOP-4151:
----------------------------------

    Attachment: 4151-1.patch

> Add a memcmp-compatible interface for key types
> -----------------------------------------------
>
>                 Key: HADOOP-4151
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4151
>             Project: Hadoop Core
>          Issue Type: Improvement
>            Reporter: Chris Douglas
>            Assignee: Chris Douglas
>            Priority: Minor
>             Fix For: 0.19.0
>
>         Attachments: 4151-0.patch, 4151-1.patch
>
>
> Sometimes it's beneficial to treat types (like BytesWritable and Text) as byte arrays, agnostic to their type. Adding an interface to tag key types as amenable to this treatment can permit optimizations and reuse for that subset of types in tools and libraries.

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


[jira] Commented: (HADOOP-4151) Add a memcmp-compatible interface for key types

Posted by "Tsz Wo (Nicholas), SZE (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-4151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631186#action_12631186 ] 

Tsz Wo (Nicholas), SZE commented on HADOOP-4151:
------------------------------------------------

> I think you accidentally changed bin/hadoop.

Not in the new patch anymore.

> Add a memcmp-compatible interface for key types
> -----------------------------------------------
>
>                 Key: HADOOP-4151
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4151
>             Project: Hadoop Core
>          Issue Type: Improvement
>            Reporter: Chris Douglas
>            Assignee: Chris Douglas
>            Priority: Minor
>             Fix For: 0.19.0
>
>         Attachments: 4151-0.patch, 4151-1.patch, 4151-2.patch, 4151-3.patch, 4151-4.patch
>
>
> Sometimes it's beneficial to treat types (like BytesWritable and Text) as byte arrays, agnostic to their type. Adding an interface to tag key types as amenable to this treatment can permit optimizations and reuse for that subset of types in tools and libraries.

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


[jira] Updated: (HADOOP-4151) Add a memcmp-compatible interface for key types

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

Chris Douglas updated HADOOP-4151:
----------------------------------

    Attachment: 4151-2.patch

Added equals, hashCode, javadoc

> Add a memcmp-compatible interface for key types
> -----------------------------------------------
>
>                 Key: HADOOP-4151
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4151
>             Project: Hadoop Core
>          Issue Type: Improvement
>            Reporter: Chris Douglas
>            Assignee: Chris Douglas
>            Priority: Minor
>             Fix For: 0.19.0
>
>         Attachments: 4151-0.patch, 4151-1.patch, 4151-2.patch
>
>
> Sometimes it's beneficial to treat types (like BytesWritable and Text) as byte arrays, agnostic to their type. Adding an interface to tag key types as amenable to this treatment can permit optimizations and reuse for that subset of types in tools and libraries.

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


[jira] Updated: (HADOOP-4151) Add a memcmp-compatible interface for key types

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

Robert Chansler updated HADOOP-4151:
------------------------------------

    Component/s: mapred

> Add a memcmp-compatible interface for key types
> -----------------------------------------------
>
>                 Key: HADOOP-4151
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4151
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: mapred
>            Reporter: Chris Douglas
>            Assignee: Chris Douglas
>            Priority: Minor
>             Fix For: 0.19.0
>
>         Attachments: 4151-0.patch, 4151-1.patch, 4151-2.patch, 4151-3.patch, 4151-4.patch
>
>
> Sometimes it's beneficial to treat types (like BytesWritable and Text) as byte arrays, agnostic to their type. Adding an interface to tag key types as amenable to this treatment can permit optimizations and reuse for that subset of types in tools and libraries.

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


[jira] Commented: (HADOOP-4151) Add a memcmp-compatible interface for key types

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

Hudson commented on HADOOP-4151:
--------------------------------

Integrated in Hadoop-trunk #605 (See [http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/605/])

> Add a memcmp-compatible interface for key types
> -----------------------------------------------
>
>                 Key: HADOOP-4151
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4151
>             Project: Hadoop Core
>          Issue Type: Improvement
>            Reporter: Chris Douglas
>            Assignee: Chris Douglas
>            Priority: Minor
>             Fix For: 0.19.0
>
>         Attachments: 4151-0.patch, 4151-1.patch, 4151-2.patch, 4151-3.patch, 4151-4.patch
>
>
> Sometimes it's beneficial to treat types (like BytesWritable and Text) as byte arrays, agnostic to their type. Adding an interface to tag key types as amenable to this treatment can permit optimizations and reuse for that subset of types in tools and libraries.

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


[jira] Updated: (HADOOP-4151) Add a memcmp-compatible interface for key types

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

Chris Douglas updated HADOOP-4151:
----------------------------------

    Attachment: 4151-3.patch

Added hashCode to Text and BytesWritable.

{noformat}
     [exec] +1 overall.  

     [exec]     +1 @author.  The patch does not contain any @author tags.

     [exec]     +1 tests included.  The patch appears to include 15 new or modified tests.

     [exec]     +1 javadoc.  The javadoc tool did not generate any warning messages.

     [exec]     +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

     [exec]     +1 findbugs.  The patch does not introduce any new Findbugs warnings.
{noformat}

> Add a memcmp-compatible interface for key types
> -----------------------------------------------
>
>                 Key: HADOOP-4151
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4151
>             Project: Hadoop Core
>          Issue Type: Improvement
>            Reporter: Chris Douglas
>            Assignee: Chris Douglas
>            Priority: Minor
>             Fix For: 0.19.0
>
>         Attachments: 4151-0.patch, 4151-1.patch, 4151-2.patch, 4151-3.patch
>
>
> Sometimes it's beneficial to treat types (like BytesWritable and Text) as byte arrays, agnostic to their type. Adding an interface to tag key types as amenable to this treatment can permit optimizations and reuse for that subset of types in tools and libraries.

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


[jira] Updated: (HADOOP-4151) Add a memcmp-compatible interface for key types

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

Chris Douglas updated HADOOP-4151:
----------------------------------

    Priority: Minor  (was: Major)

> Add a memcmp-compatible interface for key types
> -----------------------------------------------
>
>                 Key: HADOOP-4151
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4151
>             Project: Hadoop Core
>          Issue Type: Improvement
>            Reporter: Chris Douglas
>            Assignee: Chris Douglas
>            Priority: Minor
>             Fix For: 0.19.0
>
>         Attachments: 4151-0.patch
>
>
> Sometimes it's beneficial to treat types (like BytesWritable and Text) as byte arrays, agnostic to their type. Adding an interface to tag key types as amenable to this treatment can permit optimizations and reuse for that subset of types in tools and libraries.

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


[jira] Updated: (HADOOP-4151) Add a memcmp-compatible interface for key types

Posted by "Owen O'Malley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-4151?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Owen O'Malley updated HADOOP-4151:
----------------------------------

      Resolution: Fixed
    Hadoop Flags: [Reviewed]  (was: [Incompatible change])
          Status: Resolved  (was: Patch Available)

I just committed this. Thanks, Chris!

> Add a memcmp-compatible interface for key types
> -----------------------------------------------
>
>                 Key: HADOOP-4151
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4151
>             Project: Hadoop Core
>          Issue Type: Improvement
>            Reporter: Chris Douglas
>            Assignee: Chris Douglas
>            Priority: Minor
>             Fix For: 0.19.0
>
>         Attachments: 4151-0.patch, 4151-1.patch, 4151-2.patch, 4151-3.patch, 4151-4.patch
>
>
> Sometimes it's beneficial to treat types (like BytesWritable and Text) as byte arrays, agnostic to their type. Adding an interface to tag key types as amenable to this treatment can permit optimizations and reuse for that subset of types in tools and libraries.

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


[jira] Updated: (HADOOP-4151) Add a memcmp-compatible interface for key types

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

Chris Douglas updated HADOOP-4151:
----------------------------------

    Status: Patch Available  (was: Open)

> Add a memcmp-compatible interface for key types
> -----------------------------------------------
>
>                 Key: HADOOP-4151
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4151
>             Project: Hadoop Core
>          Issue Type: Improvement
>            Reporter: Chris Douglas
>            Assignee: Chris Douglas
>            Priority: Minor
>             Fix For: 0.19.0
>
>         Attachments: 4151-0.patch
>
>
> Sometimes it's beneficial to treat types (like BytesWritable and Text) as byte arrays, agnostic to their type. Adding an interface to tag key types as amenable to this treatment can permit optimizations and reuse for that subset of types in tools and libraries.

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


[jira] Commented: (HADOOP-4151) Add a memcmp-compatible interface for key types

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-4151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631527#action_12631527 ] 

Hadoop QA commented on HADOOP-4151:
-----------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12390144/4151-4.patch
  against trunk revision 696002.

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 15 new or modified tests.

    -1 patch.  The patch command could not apply the patch.

Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3275/console

This message is automatically generated.

> Add a memcmp-compatible interface for key types
> -----------------------------------------------
>
>                 Key: HADOOP-4151
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4151
>             Project: Hadoop Core
>          Issue Type: Improvement
>            Reporter: Chris Douglas
>            Assignee: Chris Douglas
>            Priority: Minor
>             Fix For: 0.19.0
>
>         Attachments: 4151-0.patch, 4151-1.patch, 4151-2.patch, 4151-3.patch, 4151-4.patch
>
>
> Sometimes it's beneficial to treat types (like BytesWritable and Text) as byte arrays, agnostic to their type. Adding an interface to tag key types as amenable to this treatment can permit optimizations and reuse for that subset of types in tools and libraries.

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


[jira] Updated: (HADOOP-4151) Add a memcmp-compatible interface for key types

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

Chris Douglas updated HADOOP-4151:
----------------------------------

    Status: Open  (was: Patch Available)

> Add a memcmp-compatible interface for key types
> -----------------------------------------------
>
>                 Key: HADOOP-4151
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4151
>             Project: Hadoop Core
>          Issue Type: Improvement
>            Reporter: Chris Douglas
>            Assignee: Chris Douglas
>            Priority: Minor
>             Fix For: 0.19.0
>
>         Attachments: 4151-0.patch, 4151-1.patch, 4151-2.patch, 4151-3.patch
>
>
> Sometimes it's beneficial to treat types (like BytesWritable and Text) as byte arrays, agnostic to their type. Adding an interface to tag key types as amenable to this treatment can permit optimizations and reuse for that subset of types in tools and libraries.

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