You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by "Abhishek Tiwari (JIRA)" <ji...@apache.org> on 2017/07/19 07:40:03 UTC

[jira] [Created] (GOBBLIN-81) Can MapReduce Compactor be improved to guarantee which one will be preserved when doing dedup?.

Abhishek Tiwari created GOBBLIN-81:
--------------------------------------

             Summary: Can MapReduce Compactor be improved to guarantee which one will be preserved when doing dedup?.
                 Key: GOBBLIN-81
                 URL: https://issues.apache.org/jira/browse/GOBBLIN-81
             Project: Apache Gobblin
          Issue Type: Bug
            Reporter: bit1129


Hi,
I read from guide that MapReduce compactor can be used to deduplicate on all or certain fields of the records. For duplicate records, one of them will be preserved; there is no guarantee which one will be preserved.
I brief through the code of AvroKeyDedupReducer, and find the following code,
    for (AvroValue<GenericRecord> value : values) {
      this.outKey.datum(value.datum());
      numVals++;
    }
From the logic, if there are duplicating values,  the latter value will overwrite the former one, and the last one will eventually win.
I would ask, is it possible to provide a field such as timestamp to indicate which one to preserve, eg, the largest timestamp will win?

 
*Github Url* : https://github.com/linkedin/gobblin/issues/1315 
*Github Reporter* : [~bit1129] 
*Github Assignee* : *ydai1124* 
*Github Created At* : 2016-10-14T09:11:43Z 
*Github Updated At* : 2016-10-28T00:43:18Z 
h3. Comments 
----
[~bit1129] wrote on 2016-10-19T01:08:13Z : Can someone take a look at this question?Thanks! 
 
 
*Github Url* : https://github.com/linkedin/gobblin/issues/1315#issuecomment-254682987 
----
[~abti] wrote on 2016-10-21T19:18:35Z : That would need an enhancement: one way to approach it could be to specify 'comparator' field and order (asc or desc) via the config which is primitive type so that it can easily help order values if present; and hence improve upon the dedup process. 
 
 
*Github Url* : https://github.com/linkedin/gobblin/issues/1315#issuecomment-255444963



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)