crunch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Wills (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CRUNCH-368) TupleWritable.Comparator
Date Sun, 30 Mar 2014 12:31:31 GMT

    [ https://issues.apache.org/jira/browse/CRUNCH-368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13954661#comment-13954661
] 

Josh Wills commented on CRUNCH-368:
-----------------------------------

@Chao-- the only line I don't quite get is this one, in the new Comparator impl:

if (written1 != written2) {
  return written1 - written2;
}

is it necessarily the case that we should prefer the shorter written value in the case that
both of the fields are non-null? That doesn't seem obvious to me.

> TupleWritable.Comparator
> ------------------------
>
>                 Key: CRUNCH-368
>                 URL: https://issues.apache.org/jira/browse/CRUNCH-368
>             Project: Crunch
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.10.0, 0.8.3
>            Reporter: Chao Shi
>            Assignee: Chao Shi
>         Attachments: crunch-368 benchmark.pdf, crunch-368.patch, gen_data.py
>
>
> This patch should improve comparison performance on TupleWritables. It saves the deserialization
overhead. It is particularly useful when the input tuple are large, e.g. contains long strings.
> Please note that this changes the binary format of TupleWritable. It adds a var-int indicating
size of field after each type code. This is a limitation of the writable system. We do not
know the size of each field until fully desalinizing it. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message