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

Function less

dgraph/cmd/bulk/mapper.go:127–132  ·  view source on GitHub ↗
(lhs, rhs MapEntry)

Source from the content-addressed store, hash-verified

125}
126
127func less(lhs, rhs MapEntry) bool {
128 if keyCmp := bytes.Compare(lhs.Key(), rhs.Key()); keyCmp != 0 {
129 return keyCmp < 0
130 }
131 return lhs.Uid() < rhs.Uid()
132}
133
134func (m *mapper) openOutputFile(shardIdx int) (*os.File, error) {
135 fileNum := atomic.AddUint32(&m.mapFileId, 1)

Callers 2

toListMethod · 0.70
writeMapEntriesToFileMethod · 0.70

Calls 3

CompareMethod · 0.80
KeyMethod · 0.45
UidMethod · 0.45

Tested by

no test coverage detected