github.com/btwiuse/jiri@v0.0.0-20191125065820-53353bcfef54/simplemr/util.go (about)

     1  // Copyright 2015 The Vanadium Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package simplemr
     6  
     7  type Identity struct{}
     8  
     9  func (i *Identity) Map(mr *MR, key string, val interface{}) error {
    10  	mr.MapOut(key, val)
    11  	return nil
    12  }
    13  
    14  func (i *Identity) Reduce(mr *MR, key string, values []interface{}) error {
    15  	mr.ReduceOut(key, values...)
    16  	return nil
    17  }