From 83647e8503a1d498ae6d3829996a5b3afac1deab Mon Sep 17 00:00:00 2001 From: neza2017 Date: Mon, 19 Apr 2021 11:12:56 +0800 Subject: [PATCH] Add copyright in master service module Signed-off-by: neza2017 --- cmd/masterservice/main.go | 11 +++++++++++ internal/dataservice/server_test.go | 4 ++-- internal/distributed/masterservice/client/client.go | 11 +++++++++++ .../distributed/masterservice/masterservice_test.go | 11 +++++++++++ internal/distributed/masterservice/param_table.go | 11 +++++++++++ .../distributed/masterservice/param_table_test.go | 11 +++++++++++ internal/distributed/masterservice/server.go | 11 +++++++++++ internal/masterservice/field_id.go | 11 +++++++++++ internal/masterservice/master_service.go | 11 +++++++++++ internal/masterservice/master_service_test.go | 11 +++++++++++ internal/masterservice/meta_table.go | 11 +++++++++++ internal/masterservice/meta_table_test.go | 11 +++++++++++ internal/masterservice/param_table.go | 11 +++++++++++ internal/masterservice/param_table_test.go | 11 +++++++++++ internal/masterservice/task.go | 11 +++++++++++ internal/masterservice/timestamp_test.go | 11 +++++++++++ internal/masterservice/util.go | 11 +++++++++++ internal/masterservice/util_test.go | 11 +++++++++++ 18 files changed, 189 insertions(+), 2 deletions(-) diff --git a/cmd/masterservice/main.go b/cmd/masterservice/main.go index 7763b8dc9..9a646f50e 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 1f858dc6f..a30032cba 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 9824a2643..367214b7f 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 11e60cf2a..46ff93051 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 ad9df6ee9..0e2e4425b 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 4bd671206..e71045a6a 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 b6b20e698..0cae1c9b0 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 4763d1668..2b7789a10 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 1e1ab68ca..adfedc529 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 b5c7e70d5..829f42fc1 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 6a0640e0b..777a2ccc5 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 0f0b6ca80..7ba50cf1b 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 50dc3f6d6..9c54cd751 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 bff2175f5..6f14db71a 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 029778ab7..3a1d75c4a 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 ae0a3e808..aeb485977 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 99617b34e..57c61466f 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 914d4466c..af9aff4f2 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 ( -- GitLab