AMashenkov commented on code in PR #2602:
URL: https://github.com/apache/ignite-3/pull/2602#discussion_r1334291515


##########
modules/system-view/src/main/java/org/apache/ignite/internal/systemview/SystemViewManagerImpl.java:
##########
@@ -0,0 +1,163 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.ignite.internal.systemview;
+
+import static org.apache.ignite.internal.util.IgniteUtils.inBusyLock;
+import static org.apache.ignite.lang.IgniteStringFormatter.format;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.atomic.AtomicBoolean;
+import org.apache.ignite.internal.catalog.CatalogCommand;
+import org.apache.ignite.internal.catalog.CatalogManager;
+import org.apache.ignite.internal.catalog.commands.ColumnParams;
+import org.apache.ignite.internal.catalog.commands.CreateSystemViewCommand;
+import org.apache.ignite.internal.cluster.management.NodeAttributesProvider;
+import org.apache.ignite.internal.schema.NativeTypeSpec;
+import org.apache.ignite.internal.util.IgniteSpinBusyLock;
+
+/**
+ * SQL system views manager implementation.
+ */
+public class SystemViewManagerImpl implements SystemViewManager, 
NodeAttributesProvider {
+    public static final String NODE_ATTRIBUTES_KEY = "sql-system-views";
+
+    public static final String NODE_ATTRIBUTES_LIST_SEPARATOR = ",";
+
+    private final CatalogManager catalogManager;
+
+    private final Map<String, String> nodeAttributes = new HashMap<>();
+
+    /** Collection of system views provided by components. */
+    private final Map<String, SystemView<?>> views = new LinkedHashMap<>();
+
+    /** Busy lock to stop synchronously. */
+    private final IgniteSpinBusyLock busyLock = new IgniteSpinBusyLock();
+
+    /** Prevents attempts to register a new system view after the component 
has started. */
+    private final AtomicBoolean startGuard = new AtomicBoolean();
+
+    /** Prevents double stopping of the component. */
+    private final AtomicBoolean stopGuard = new AtomicBoolean();
+
+    /** Future which is completed when system views are registered in the 
catalog. */
+    private final CompletableFuture<Void> schemaChangesFuture = new 
CompletableFuture<>();

Review Comment:
   ```suggestion
       private final CompletableFuture<Void> viewsRegistrationFuture = new 
CompletableFuture<>();
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to