(opt *BulkOptions)
| 53 | } |
| 54 | |
| 55 | func newMapperBuffer(opt *BulkOptions) *z.Buffer { |
| 56 | sz := float64(opt.MapBufSize) * 1.1 |
| 57 | tmpDir := filepath.Join(opt.TmpDir, bufferDir) |
| 58 | buf, err := z.NewBufferTmp(tmpDir, int(sz)) |
| 59 | x.Check(err) |
| 60 | return buf.WithMaxSize(2 * int(opt.MapBufSize)) |
| 61 | } |
| 62 | |
| 63 | func newMapper(st *state) *mapper { |
| 64 | shards := make([]shardState, st.opt.MapShards) |