Skip to content

Commit 10dcb3a

Browse files
authored
修复hdfs删除目录慢的问题 (#1309)
* 修复hdfs删除目录慢的问题 * 修复hdfs删除目录慢的问题
1 parent 2f23992 commit 10dcb3a

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ require (
9696
github.com/gogo/protobuf v1.3.2 // indirect
9797
github.com/golang/glog v1.0.0 // indirect
9898
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
99-
github.com/golang/protobuf v1.5.2 // indirect
99+
github.com/golang/protobuf v1.5.3 // indirect
100100
github.com/golang/snappy v0.0.3 // indirect
101101
github.com/google/flatbuffers v1.12.1 // indirect
102102
github.com/google/go-cmp v0.5.6 // indirect

go.sum

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,9 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD
405405
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
406406
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
407407
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
408-
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
409408
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
409+
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
410+
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
410411
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
411412
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
412413
github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA=

pkg/fs/client/ufs/hdfs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ func (fs *hdfsFileSystem) Rmdir(name string) error {
250250
log.Tracef("hdfs rmdir: name[%s]", name)
251251
fs.Lock()
252252
defer fs.Unlock()
253-
return fs.client.Remove(fs.GetPath(name))
253+
return fs.client.RemoveAll(fs.GetPath(name))
254254
}
255255

256256
func (fs *hdfsFileSystem) Unlink(name string) error {

0 commit comments

Comments
 (0)