diff options
| author | Paul Buetow <pbuetow@mimecast.com> | 2024-02-26 10:45:54 +0200 |
|---|---|---|
| committer | Paul Buetow <pbuetow@mimecast.com> | 2024-02-26 10:45:54 +0200 |
| commit | c8265ec16e086c988868d8cc3b7bd854d213be90 (patch) | |
| tree | 1ff51310dc2e001cf8aaf71c763023bba9f6656e /internal/mapr/globalgroupset.go | |
| parent | a3e10757a52fa47a0608afd88986162ca5eb22cc (diff) | |
only rename .csv.tmp to .csv when the final result was written
Diffstat (limited to 'internal/mapr/globalgroupset.go')
| -rw-r--r-- | internal/mapr/globalgroupset.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/mapr/globalgroupset.go b/internal/mapr/globalgroupset.go index 2d7f10b..2b12898 100644 --- a/internal/mapr/globalgroupset.go +++ b/internal/mapr/globalgroupset.go @@ -79,10 +79,10 @@ func (g *GlobalGroupSet) SwapOut() *GroupSet { } // WriteResult writes the result of a mapreduce aggregation to an outfile. -func (g *GlobalGroupSet) WriteResult(query *Query) error { +func (g *GlobalGroupSet) WriteResult(query *Query, finalResult bool) error { g.semaphore <- struct{}{} defer func() { <-g.semaphore }() - return g.GroupSet.WriteResult(query) + return g.GroupSet.WriteResult(query, finalResult) } // Result returns the result of the mapreduce aggregation as a string. |
