ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject ignite git commit: WC-633 Web Console: Added support to view baseline with ADMIN_VIEW permissions.
Date Thu, 02 Aug 2018 09:56:42 GMT
Repository: ignite
Updated Branches:
  refs/heads/wc-633 [created] 6f28066a8


WC-633 Web Console: Added support to view baseline with ADMIN_VIEW permissions.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/6f28066a
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/6f28066a
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/6f28066a

Branch: refs/heads/wc-633
Commit: 6f28066a858f8191b9c07fafa04fc957c5b41f76
Parents: 5fc18e6
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Thu Aug 2 16:56:37 2018 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Thu Aug 2 16:56:37 2018 +0700

----------------------------------------------------------------------
 .../visor/baseline/VisorBaselineTask.java       |  2 +-
 .../visor/baseline/VisorBaselineViewTask.java   | 73 ++++++++++++++++++++
 2 files changed, 74 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/6f28066a/modules/core/src/main/java/org/apache/ignite/internal/visor/baseline/VisorBaselineTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/baseline/VisorBaselineTask.java
b/modules/core/src/main/java/org/apache/ignite/internal/visor/baseline/VisorBaselineTask.java
index 721b4b3..3c00452 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/baseline/VisorBaselineTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/baseline/VisorBaselineTask.java
@@ -34,7 +34,7 @@ import org.apache.ignite.internal.visor.VisorOneNodeTask;
 import org.jetbrains.annotations.Nullable;
 
 /**
- * Task that will collect baseline topology information.
+ * Task that will collect information about baseline topology and can change its state.
  */
 @GridInternal
 public class VisorBaselineTask extends VisorOneNodeTask<VisorBaselineTaskArg, VisorBaselineTaskResult>
{

http://git-wip-us.apache.org/repos/asf/ignite/blob/6f28066a/modules/core/src/main/java/org/apache/ignite/internal/visor/baseline/VisorBaselineViewTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/baseline/VisorBaselineViewTask.java
b/modules/core/src/main/java/org/apache/ignite/internal/visor/baseline/VisorBaselineViewTask.java
new file mode 100644
index 0000000..472b907
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/baseline/VisorBaselineViewTask.java
@@ -0,0 +1,73 @@
+/*
+ * 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.visor.baseline;
+
+import org.apache.ignite.IgniteException;
+import org.apache.ignite.internal.cluster.IgniteClusterEx;
+import org.apache.ignite.internal.processors.task.GridInternal;
+import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.internal.visor.VisorJob;
+import org.apache.ignite.internal.visor.VisorOneNodeTask;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * Task that will collect information about baseline topology.
+ */
+@GridInternal
+public class VisorBaselineViewTask extends VisorOneNodeTask<Void, VisorBaselineTaskResult>
{
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** {@inheritDoc} */
+    @Override protected VisorBaselineViewJob job(Void arg) {
+        return new VisorBaselineViewJob(arg, debug);
+    }
+
+    /**
+     * Job that will collect baseline topology information.
+     */
+    private static class VisorBaselineViewJob extends VisorJob<Void, VisorBaselineTaskResult>
{
+        /** */
+        private static final long serialVersionUID = 0L;
+
+        /**
+         * @param arg Formal job argument.
+         * @param debug Debug flag.
+         */
+        private VisorBaselineViewJob(Void arg, boolean debug) {
+            super(arg, debug);
+        }
+
+        /** {@inheritDoc} */
+        @Override protected VisorBaselineTaskResult run(@Nullable Void arg) throws IgniteException
{
+            IgniteClusterEx cluster = ignite.cluster();
+
+            return new VisorBaselineTaskResult(
+                ignite.cluster().active(),
+                cluster.topologyVersion(),
+                cluster.currentBaselineTopology(),
+                cluster.forServers().nodes()
+            );
+        }
+
+        /** {@inheritDoc} */
+        @Override public String toString() {
+            return S.toString(VisorBaselineViewJob.class, this);
+        }
+    }
+}


Mime
View raw message