diff --git a/cmd/masterservice/main.go b/cmd/masterservice/main.go index 7763b8dc969bd0d1c97629bce92a7e4cf35252e9..9a646f50e8e34a9a35fdc00d72e8a30496a7802a 100644 --- a/cmd/masterservice/main.go +++ b/cmd/masterservice/main.go @@ -1,3 +1,14 @@ +// Copyright (C) 2019-2020 Zilliz. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software distributed under the License +// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +// or implied. See the License for the specific language governing permissions and limitations under the License. + package main import ( diff --git a/internal/dataservice/server_test.go b/internal/dataservice/server_test.go index 1f858dc6feb162cb5f54e4a0f416d4330a691e05..a30032cbacfddb94fc91e25efd33583493cddf6b 100644 --- a/internal/dataservice/server_test.go +++ b/internal/dataservice/server_test.go @@ -172,7 +172,7 @@ func TestShowSegments(t *testing.T) { }) assert.Nil(t, err) assert.EqualValues(t, commonpb.ErrorCode_Success, resp.Status.ErrorCode) - assert.EqualValues(t, test.expected, resp.SegmentIDs) + assert.ElementsMatch(t, test.expected, resp.SegmentIDs) }) } } @@ -217,7 +217,7 @@ func TestFlush(t *testing.T) { assert.EqualValues(t, commonpb.ErrorCode_Success, resp.ErrorCode) ids, err := svr.segAllocator.GetSealedSegments(context.TODO()) assert.Nil(t, err) - assert.EqualValues(t, []UniqueID{1, 2}, ids) + assert.ElementsMatch(t, ids, []UniqueID{1, 2}) } func TestGetComponentStates(t *testing.T) { diff --git a/internal/distributed/masterservice/client/client.go b/internal/distributed/masterservice/client/client.go index 9824a26435b198cd3f654ceb7a549a8b5677271a..367214b7f21bbcb02f871dd68a7d9b60c581d379 100644 --- a/internal/distributed/masterservice/client/client.go +++ b/internal/distributed/masterservice/client/client.go @@ -1,3 +1,14 @@ +// Copyright (C) 2019-2020 Zilliz. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software distributed under the License +// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +// or implied. See the License for the specific language governing permissions and limitations under the License. + package grpcmasterserviceclient import ( diff --git a/internal/distributed/masterservice/masterservice_test.go b/internal/distributed/masterservice/masterservice_test.go index 11e60cf2af5157ebe0286df6817937beea58fbf8..46ff9305105d8ce52260a7215c172449ebde3cac 100644 --- a/internal/distributed/masterservice/masterservice_test.go +++ b/internal/distributed/masterservice/masterservice_test.go @@ -1,3 +1,14 @@ +// Copyright (C) 2019-2020 Zilliz. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software distributed under the License +// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +// or implied. See the License for the specific language governing permissions and limitations under the License. + package grpcmasterservice import ( diff --git a/internal/distributed/masterservice/param_table.go b/internal/distributed/masterservice/param_table.go index ad9df6ee94c4c5b2afed05d75f91cc505be65100..0e2e4425be31bec4dd24a1b793b2a12cfb940577 100644 --- a/internal/distributed/masterservice/param_table.go +++ b/internal/distributed/masterservice/param_table.go @@ -1,3 +1,14 @@ +// Copyright (C) 2019-2020 Zilliz. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software distributed under the License +// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +// or implied. See the License for the specific language governing permissions and limitations under the License. + package grpcmasterservice import ( diff --git a/internal/distributed/masterservice/param_table_test.go b/internal/distributed/masterservice/param_table_test.go index 4bd671206886abb1970044f11f720cbfc860d376..e71045a6a4e900380ad9c914d1e93b8e55a33b84 100644 --- a/internal/distributed/masterservice/param_table_test.go +++ b/internal/distributed/masterservice/param_table_test.go @@ -1,3 +1,14 @@ +// Copyright (C) 2019-2020 Zilliz. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software distributed under the License +// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +// or implied. See the License for the specific language governing permissions and limitations under the License. + package grpcmasterservice import ( diff --git a/internal/distributed/masterservice/server.go b/internal/distributed/masterservice/server.go index b6b20e698443ca40ae1b4f8e122d3a29cce98c73..0cae1c9b064da6fa75dea61fe60b5a710f873d9a 100644 --- a/internal/distributed/masterservice/server.go +++ b/internal/distributed/masterservice/server.go @@ -1,3 +1,14 @@ +// Copyright (C) 2019-2020 Zilliz. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software distributed under the License +// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +// or implied. See the License for the specific language governing permissions and limitations under the License. + package grpcmasterservice import ( diff --git a/internal/masterservice/field_id.go b/internal/masterservice/field_id.go index 4763d16684ced1e56cfae3ce90327a8dbd47fe07..2b7789a108446899ef9c7e0ad6eb3a18f662c02a 100644 --- a/internal/masterservice/field_id.go +++ b/internal/masterservice/field_id.go @@ -1,3 +1,14 @@ +// Copyright (C) 2019-2020 Zilliz. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software distributed under the License +// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +// or implied. See the License for the specific language governing permissions and limitations under the License. + package masterservice // system filed id: diff --git a/internal/masterservice/master_service.go b/internal/masterservice/master_service.go index 1e1ab68cab60cec019966fe11e7ef21871d833aa..adfedc5297d33552a220f28ab529f57eb13336e5 100644 --- a/internal/masterservice/master_service.go +++ b/internal/masterservice/master_service.go @@ -1,3 +1,14 @@ +// Copyright (C) 2019-2020 Zilliz. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software distributed under the License +// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +// or implied. See the License for the specific language governing permissions and limitations under the License. + package masterservice import ( diff --git a/internal/masterservice/master_service_test.go b/internal/masterservice/master_service_test.go index b5c7e70d5cb94c6c9e06c7b95c52c4ec5b04fc96..829f42fc1d11b801ef7e42d031bb561d429daf94 100644 --- a/internal/masterservice/master_service_test.go +++ b/internal/masterservice/master_service_test.go @@ -1,3 +1,14 @@ +// Copyright (C) 2019-2020 Zilliz. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software distributed under the License +// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +// or implied. See the License for the specific language governing permissions and limitations under the License. + package masterservice import ( diff --git a/internal/masterservice/meta_table.go b/internal/masterservice/meta_table.go index 6a0640e0b214d69d734f18bb1f67074c33ea11f8..777a2ccc576b8d957a12a4c6ad016ddddb35a1ec 100644 --- a/internal/masterservice/meta_table.go +++ b/internal/masterservice/meta_table.go @@ -1,3 +1,14 @@ +// Copyright (C) 2019-2020 Zilliz. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software distributed under the License +// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +// or implied. See the License for the specific language governing permissions and limitations under the License. + package masterservice import ( diff --git a/internal/masterservice/meta_table_test.go b/internal/masterservice/meta_table_test.go index 0f0b6ca806952be1e4a9e91c23ee23545ae93271..7ba50cf1b923012beeb0b326a64c6b3c5e81ef46 100644 --- a/internal/masterservice/meta_table_test.go +++ b/internal/masterservice/meta_table_test.go @@ -1,3 +1,14 @@ +// Copyright (C) 2019-2020 Zilliz. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software distributed under the License +// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +// or implied. See the License for the specific language governing permissions and limitations under the License. + package masterservice import ( diff --git a/internal/masterservice/param_table.go b/internal/masterservice/param_table.go index 50dc3f6d614ac7a2db081516a92399cc41e137e9..9c54cd751fa26bb286a97427ff3598a61126c6ab 100644 --- a/internal/masterservice/param_table.go +++ b/internal/masterservice/param_table.go @@ -1,3 +1,14 @@ +// Copyright (C) 2019-2020 Zilliz. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software distributed under the License +// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +// or implied. See the License for the specific language governing permissions and limitations under the License. + package masterservice import ( diff --git a/internal/masterservice/param_table_test.go b/internal/masterservice/param_table_test.go index bff2175f5ee65d842449d46e0a2d2f64aa68ea74..6f14db71a78a669883ab1f2ba30d3ca532b0f7cc 100644 --- a/internal/masterservice/param_table_test.go +++ b/internal/masterservice/param_table_test.go @@ -1,3 +1,14 @@ +// Copyright (C) 2019-2020 Zilliz. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software distributed under the License +// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +// or implied. See the License for the specific language governing permissions and limitations under the License. + package masterservice import ( diff --git a/internal/masterservice/task.go b/internal/masterservice/task.go index 029778ab74d1c9e4b0f388069efa67337ba4c104..3a1d75c4a6ed93b140af0b6a95d066ce07e2d205 100644 --- a/internal/masterservice/task.go +++ b/internal/masterservice/task.go @@ -1,3 +1,14 @@ +// Copyright (C) 2019-2020 Zilliz. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software distributed under the License +// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +// or implied. See the License for the specific language governing permissions and limitations under the License. + package masterservice import ( diff --git a/internal/masterservice/timestamp_test.go b/internal/masterservice/timestamp_test.go index ae0a3e808423466177c5a5a879cc7027d99552d8..aeb485977b87cad6bef86e089b3a1cbf3b2d61d1 100644 --- a/internal/masterservice/timestamp_test.go +++ b/internal/masterservice/timestamp_test.go @@ -1,3 +1,14 @@ +// Copyright (C) 2019-2020 Zilliz. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software distributed under the License +// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +// or implied. See the License for the specific language governing permissions and limitations under the License. + package masterservice import ( diff --git a/internal/masterservice/util.go b/internal/masterservice/util.go index 99617b34e22a05f61346df83880d002431901822..57c61466f5c165fdc84417c2a4a5dbe2e53c8f62 100644 --- a/internal/masterservice/util.go +++ b/internal/masterservice/util.go @@ -1,3 +1,14 @@ +// Copyright (C) 2019-2020 Zilliz. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software distributed under the License +// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +// or implied. See the License for the specific language governing permissions and limitations under the License. + package masterservice import ( diff --git a/internal/masterservice/util_test.go b/internal/masterservice/util_test.go index 914d4466c072a69c827de49df2008e558ab4de13..af9aff4f2065b927b9572bebd176aa3bb451e9a4 100644 --- a/internal/masterservice/util_test.go +++ b/internal/masterservice/util_test.go @@ -1,3 +1,14 @@ +// Copyright (C) 2019-2020 Zilliz. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software distributed under the License +// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +// or implied. See the License for the specific language governing permissions and limitations under the License. + package masterservice import (