YugabyteDB (2.13.0.0-b42, bfc6a6643e7399ac8a0e81d06a3ee6d6571b33ab)

Coverage Report

Created: 2022-03-09 17:30

/Users/deen/code/yugabyte-db/src/yb/master/master_ddl_service.cc
Line
Count
Source
1
// Copyright (c) YugaByte, Inc.
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
4
// in compliance with the License.  You may obtain a copy of the License at
5
//
6
// http://www.apache.org/licenses/LICENSE-2.0
7
//
8
// Unless required by applicable law or agreed to in writing, software distributed under the License
9
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
10
// or implied.  See the License for the specific language governing permissions and limitations
11
// under the License.
12
//
13
14
#include "yb/master/catalog_manager.h"
15
#include "yb/master/master_ddl.service.h"
16
#include "yb/master/master_service_base.h"
17
#include "yb/master/master_service_base-internal.h"
18
19
namespace yb {
20
namespace master {
21
22
namespace {
23
24
class MasterDdlServiceImpl : public MasterServiceBase, public MasterDdlIf {
25
 public:
26
  explicit MasterDdlServiceImpl(Master* master)
27
5.42k
      : MasterServiceBase(master), MasterDdlIf(master->metric_entity()) {}
28
29
  MASTER_SERVICE_IMPL_ON_LEADER_WITH_LOCK(
30
    CatalogManager,
31
    (AlterNamespace)
32
    (AlterTable)
33
    (BackfillIndex)
34
    (CreateNamespace)
35
    (CreateTable)
36
    (CreateTablegroup)
37
    (CreateUDType)
38
    (DeleteNamespace)
39
    (DeleteTable)
40
    (DeleteTablegroup)
41
    (DeleteUDType)
42
    (GetBackfillJobs)
43
    (GetColocatedTabletSchema)
44
    (GetNamespaceInfo)
45
    (GetTablegroupSchema)
46
    (GetTableSchema)
47
    (GetUDTypeInfo)
48
    (IsAlterTableDone)
49
    (IsCreateNamespaceDone)
50
    (IsCreateTableDone)
51
    (IsDeleteNamespaceDone)
52
    (IsDeleteTableDone)
53
    (IsTruncateTableDone)
54
    (LaunchBackfillIndexForTable)
55
    (ListNamespaces)
56
    (ListTablegroups)
57
    (ListTables)
58
    (ListUDTypes)
59
    (TruncateTable)
60
  )
61
};
62
63
} // namespace
64
65
5.42k
std::unique_ptr<rpc::ServiceIf> MakeMasterDdlService(Master* master) {
66
5.42k
  return std::make_unique<MasterDdlServiceImpl>(master);
67
5.42k
}
68
69
} // namespace master
70
} // namespace yb