MCPcopy
hub / github.com/dgraph-io/dgraph / newMapperBuffer

Function newMapperBuffer

dgraph/cmd/bulk/mapper.go:55–61  ·  view source on GitHub ↗
(opt *BulkOptions)

Source from the content-addressed store, hash-verified

53}
54
55func 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
63func newMapper(st *state) *mapper {
64 shards := make([]shardState, st.opt.MapShards)

Callers 2

newMapperFunction · 0.85
runMethod · 0.85

Calls 1

CheckFunction · 0.92

Tested by

no test coverage detected