Skip to content

Commit

Permalink
Revert "Check that closing a file after writing actually succeeds"
Browse files Browse the repository at this point in the history
This reverts commit 19e9639.
  • Loading branch information
colinmarc committed Feb 5, 2022
1 parent 19e9639 commit 65f4516
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
3 changes: 0 additions & 3 deletions file_writer.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package hdfs

import (
"errors"
"io"
"os"
"time"
Expand Down Expand Up @@ -240,8 +239,6 @@ func (f *FileWriter) Close() error {
err := f.client.namenode.Execute("complete", completeReq, completeResp)
if err != nil {
return &os.PathError{"create", f.name, err}
} else if !completeResp.GetResult() {
return &os.PathError{"create", f.name, errors.New("failed to close file")}
}

return nil
Expand Down
2 changes: 1 addition & 1 deletion hadoopconf/hadoopconf.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func (conf HadoopConf) Namenodes() []string {
}

keys := make([]string, 0, len(nns))
for k := range nns {
for k, _ := range nns {
keys = append(keys, k)
}

Expand Down
2 changes: 1 addition & 1 deletion internal/transfer/block_write_stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ Acks:
// Once we've seen an error, just keep reading packets off the channel (but
// not off the socket) until the writing thread figures it out. If we don't,
// the upstream thread could deadlock waiting for the channel to have space.
for range s.packets {
for _ = range s.packets {
}
}

Expand Down

0 comments on commit 65f4516

Please sign in to comment.