This commit is contained in:
Chris Lu 2020-09-12 04:08:03 -07:00
parent ea26a98753
commit 446e476a11
8 changed files with 12 additions and 15 deletions

View file

@ -84,4 +84,3 @@ func ReadFilerSignature(grpcDialOption grpc.DialOption, filer string) (filerSign
} }
return filerSignature, nil return filerSignature, nil
} }

View file

@ -20,7 +20,6 @@ func TestIsGoodMove(t *testing.T) {
var tests = []testMoveCase{ var tests = []testMoveCase{
{ {
name: "test 100 move to spread into proper data centers", name: "test 100 move to spread into proper data centers",
replication: "100", replication: "100",
@ -132,7 +131,6 @@ func TestIsGoodMove(t *testing.T) {
targetLocation: location{"dc1", "r2", &master_pb.DataNodeInfo{Id: "dn3"}}, targetLocation: location{"dc1", "r2", &master_pb.DataNodeInfo{Id: "dn3"}},
expected: true, expected: true,
}, },
} }
for _, tt := range tests { for _, tt := range tests {

View file

@ -16,7 +16,7 @@ var(
UnsupportedCompression = fmt.Errorf("unsupported compression") UnsupportedCompression = fmt.Errorf("unsupported compression")
) )
func MaybeGzipData(input []byte) ([]byte) { func MaybeGzipData(input []byte) []byte {
if IsGzippedContent(input) { if IsGzippedContent(input) {
return input return input
} }
@ -30,7 +30,7 @@ func MaybeGzipData(input []byte) ([]byte) {
return gzipped return gzipped
} }
func MaybeDecompressData(input []byte) ([]byte) { func MaybeDecompressData(input []byte) []byte {
uncompressed, err := DecompressData(input) uncompressed, err := DecompressData(input)
if err != nil { if err != nil {
if err != UnsupportedCompression { if err != UnsupportedCompression {