ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [33/50] [abbrv] incubator-ignite git commit: #ignite-189: move SecureSessionEvent to enterprise.
Date Fri, 13 Feb 2015 16:26:00 GMT
#ignite-189: move SecureSessionEvent to enterprise.


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

Branch: refs/heads/sprint-1
Commit: 0ca50cd39b31d215e6a0bfc6a8cac40ebd7b295b
Parents: d92bc16
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Fri Feb 13 12:33:55 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Fri Feb 13 12:33:55 2015 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/events/EventType.java     |  40 -----
 .../ignite/events/SecureSessionEvent.java       | 154 -------------------
 .../node/VisorNodeEventsCollectorTask.java      |   9 +-
 .../internal/visor/util/VisorTaskUtils.java     |  10 +-
 .../optimized/optimized-classnames.properties   |   1 -
 .../commands/events/VisorEventsCommand.scala    |   2 -
 6 files changed, 2 insertions(+), 214 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ca50cd3/modules/core/src/main/java/org/apache/ignite/events/EventType.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/events/EventType.java b/modules/core/src/main/java/org/apache/ignite/events/EventType.java
index 46be623..8669c95 100644
--- a/modules/core/src/main/java/org/apache/ignite/events/EventType.java
+++ b/modules/core/src/main/java/org/apache/ignite/events/EventType.java
@@ -40,8 +40,6 @@ import java.util.*;
  * <li>{@link #EVTS_CACHE_PRELOAD}</li>
  * <li>{@link #EVTS_CACHE_QUERY}</li>
  * <li>{@link #EVTS_SWAPSPACE}</li>
- * <li>{@link #EVTS_AUTHENTICATION}</li>
- * <li>{@link #EVTS_SECURE_SESSION}</li>
  * </ul>
  * <p>
  * NOTE: all types in range <b>from 1 to 1000 are reserved</b> for
@@ -620,32 +618,6 @@ public interface EventType {
     public static final int EVT_CACHE_QUERY_OBJECT_READ = 97;
 
     /**
-     * Built-in event type: secure session validation succeed.
-     * <p>
-     * Secure session validation succeed. This event is triggered every time
-     * a validation of secure session procedure finished without exception.
-     * <p>
-     * NOTE: all types in range <b>from 1 to 1000 are reserved</b> for
-     * internal Ignite events and should not be used by user-defined events.
-     *
-     * @see SecureSessionEvent
-     */
-    public static final int EVT_SECURE_SESSION_VALIDATION_SUCCEEDED = 113;
-
-    /**
-     * Built-in event type: secure session validation failed.
-     * <br>
-     * Secure session validation failed. This means that  there was some error event
-     * during secure session validation procedure and validation was not succeed.
-     * <p>
-     * NOTE: all types in range <b>from 1 to 1000 are reserved</b> for
-     * internal Ignite events and should not be used by user-defined events.
-     *
-     * @see SecureSessionEvent
-     */
-    public static final int EVT_SECURE_SESSION_VALIDATION_FAILED = 114;
-
-    /**
      * Built-in event type: Visor detects that some events were evicted from events buffer
since last poll.
      * <p>
      * NOTE: all types in range <b>from 1 to 1000 are reserved</b> for
@@ -1018,18 +990,6 @@ public interface EventType {
     };
 
     /**
-     * All secure session events. This array can be directly passed into
-     * {@link org.apache.ignite.IgniteEvents#localListen(org.apache.ignite.lang.IgnitePredicate,
int...)} method to
-     * subscribe to all GGFS events.
-     *
-     * @see IgniteFsEvent
-     */
-    public static final int[] EVTS_SECURE_SESSION = {
-        EVT_SECURE_SESSION_VALIDATION_SUCCEEDED,
-        EVT_SECURE_SESSION_VALIDATION_FAILED
-    };
-
-    /**
      * All GGFS events. This array can be directly passed into
      * {@link org.apache.ignite.IgniteEvents#localListen(org.apache.ignite.lang.IgnitePredicate,
int...)} method to
      * subscribe to all cloud events.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ca50cd3/modules/core/src/main/java/org/apache/ignite/events/SecureSessionEvent.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/events/SecureSessionEvent.java b/modules/core/src/main/java/org/apache/ignite/events/SecureSessionEvent.java
deleted file mode 100644
index 44aa8f2..0000000
--- a/modules/core/src/main/java/org/apache/ignite/events/SecureSessionEvent.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * 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.events;
-
-import org.apache.ignite.cluster.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.plugin.security.*;
-
-import java.util.*;
-
-/**
- * Grid secure session validation event.
- * <p>
- * Grid events are used for notification about what happens within the grid. Note that by
- * design Ignite keeps all events generated on the local node locally and it provides
- * APIs for performing a distributed queries across multiple nodes:
- * <ul>
- *      <li>
- *          {@link org.apache.ignite.IgniteEvents#remoteQuery(org.apache.ignite.lang.IgnitePredicate,
long, int...)} -
- *          asynchronously querying events occurred on the nodes specified, including remote
nodes.
- *      </li>
- *      <li>
- *          {@link org.apache.ignite.IgniteEvents#localQuery(org.apache.ignite.lang.IgnitePredicate,
int...)} -
- *          querying only local events stored on this local node.
- *      </li>
- *      <li>
- *          {@link org.apache.ignite.IgniteEvents#localListen(org.apache.ignite.lang.IgnitePredicate,
int...)} -
- *          listening to local grid events (events from remote nodes not included).
- *      </li>
- * </ul>
- * User can also wait for events using method {@link org.apache.ignite.IgniteEvents#waitForLocal(org.apache.ignite.lang.IgnitePredicate,
int...)}.
- * <h1 class="header">Events and Performance</h1>
- * Note that by default all events in Ignite are enabled and therefore generated and stored
- * by whatever event storage SPI is configured. Ignite can and often does generate thousands
events per seconds
- * under the load and therefore it creates a significant additional load on the system. If
these events are
- * not needed by the application this load is unnecessary and leads to significant performance
degradation.
- * <p>
- * It is <b>highly recommended</b> to enable only those events that your application
logic requires
- * by using {@link org.apache.ignite.configuration.IgniteConfiguration#getIncludeEventTypes()}
method in Ignite configuration. Note that certain
- * events are required for Ignite's internal operations and such events will still be generated
but not stored by
- * event storage SPI if they are disabled in Ignite configuration.
- * @see EventType#EVT_SECURE_SESSION_VALIDATION_FAILED
- * @see EventType#EVT_SECURE_SESSION_VALIDATION_SUCCEEDED
- */
-public class SecureSessionEvent extends EventAdapter {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /**  Subject type. */
-    private GridSecuritySubjectType subjType;
-
-    /** Subject ID. */
-    private UUID subjId;
-
-    /** {@inheritDoc} */
-    @Override public String shortDisplay() {
-        return name() + ": subjType=" + subjType;
-    }
-
-    /**
-     * No-arg constructor.
-     */
-    public SecureSessionEvent() {
-        // No-op.
-    }
-
-    /**
-     * Creates secure session event with given parameters.
-     *
-     * @param node Node.
-     * @param msg Optional message.
-     * @param type Event type.
-     */
-    public SecureSessionEvent(ClusterNode node, String msg, int type) {
-        super(node, msg, type);
-    }
-
-    /**
-     * Creates secure session event with given parameters.
-     *
-     * @param node Node.
-     * @param msg Optional message.
-     * @param type Event type.
-     * @param subjType Subject type.
-     * @param subjId Subject ID.
-     */
-    public SecureSessionEvent(ClusterNode node, String msg, int type, GridSecuritySubjectType
subjType,
-        UUID subjId) {
-        super(node, msg, type);
-
-        this.subjType = subjType;
-        this.subjId = subjId;
-    }
-
-    /**
-     * Gets subject type that triggered the event.
-     *
-     * @return Subject type that triggered the event.
-     */
-    public GridSecuritySubjectType subjectType() {
-        return subjType;
-    }
-
-    /**
-     * Gets subject ID that triggered the event.
-     *
-     * @return Subject ID that triggered the event.
-     */
-    public UUID subjectId() {
-        return subjId;
-    }
-
-    /**
-     * Sets subject type that triggered the event.
-     *
-     * @param subjType Subject type to set.
-     */
-    public void subjectType(GridSecuritySubjectType subjType) {
-        this.subjType = subjType;
-    }
-
-    /**
-     * Sets subject ID that triggered the event.
-     *
-     * @param subjId Subject ID to set.
-     */
-    public void subjectId(UUID subjId) {
-        this.subjId = subjId;
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(SecureSessionEvent.class, this,
-            "nodeId8", U.id8(node().id()),
-            "msg", message(),
-            "type", name(),
-            "tstamp", timestamp());
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ca50cd3/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeEventsCollectorTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeEventsCollectorTask.java
b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeEventsCollectorTask.java
index a53bf73..0a54f9d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeEventsCollectorTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeEventsCollectorTask.java
@@ -117,8 +117,7 @@ public class VisorNodeEventsCollectorTask extends VisorMultiNodeTask<VisorNodeEv
         public static VisorNodeEventsCollectorTaskArg createTasksArg(@Nullable Long timeArg,
@Nullable String taskName,
             @Nullable IgniteUuid taskSessionId) {
             return new VisorNodeEventsCollectorTaskArg(null,
-                VisorTaskUtils.concat(EVTS_JOB_EXECUTION, EVTS_TASK_EXECUTION, EVTS_AUTHORIZATION,
-                    EVTS_SECURE_SESSION),
+                VisorTaskUtils.concat(EVTS_JOB_EXECUTION, EVTS_TASK_EXECUTION, EVTS_AUTHORIZATION),
                 timeArg, taskName, taskSessionId);
         }
 
@@ -326,12 +325,6 @@ public class VisorNodeEventsCollectorTask extends VisorMultiNodeTask<VisorNodeEv
                     res.add(new VisorGridAuthorizationEvent(tid, id, name, nid, t, msg, shortDisplay,
ae.operation(),
                         ae.subject()));
                 }
-                else if (e instanceof SecureSessionEvent) {
-                    SecureSessionEvent se = (SecureSessionEvent) e;
-
-                    res.add(new VisorGridSecuritySessionEvent(tid, id, name, nid, t, msg,
shortDisplay, se.subjectType(),
-                        se.subjectId()));
-                }
                 else
                     res.add(new VisorGridEvent(tid, id, name, nid, t, msg, shortDisplay));
             }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ca50cd3/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
b/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
index d6add2a..dedee7f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java
@@ -87,9 +87,7 @@ public class VisorTaskUtils {
         EVT_CLASS_DEPLOY_FAILED,
         EVT_TASK_DEPLOY_FAILED,
 
-        EVT_AUTHORIZATION_FAILED,
-
-        EVT_SECURE_SESSION_VALIDATION_FAILED
+        EVT_AUTHORIZATION_FAILED
     };
 
     /** Only non task event types that Visor should collect. */
@@ -424,12 +422,6 @@ public class VisorTaskUtils {
                 res.add(new VisorGridAuthorizationEvent(tid, id, name, nid, t, msg, shortDisplay,
ae.operation(),
                     ae.subject()));
             }
-            else if (e instanceof SecureSessionEvent) {
-                SecureSessionEvent se = (SecureSessionEvent)e;
-
-                res.add(new VisorGridSecuritySessionEvent(tid, id, name, nid, t, msg, shortDisplay,
se.subjectType(),
-                    se.subjectId()));
-            }
         }
 
         return res;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ca50cd3/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/optimized-classnames.properties
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/optimized-classnames.properties
b/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/optimized-classnames.properties
index 6d6f8be..101020f 100644
--- a/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/optimized-classnames.properties
+++ b/modules/core/src/main/java/org/apache/ignite/marshaller/optimized/optimized-classnames.properties
@@ -142,7 +142,6 @@ org.apache.ignite.events.EventAdapter
 org.apache.ignite.events.IgniteFsEvent
 org.apache.ignite.events.JobEvent
 org.gridgain.grid.events.LicenseEvent
-org.apache.ignite.events.SecureSessionEvent
 org.apache.ignite.events.SwapSpaceEvent
 org.apache.ignite.events.TaskEvent
 org.apache.ignite.ignitefs.IgniteFsConcurrentModificationException

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ca50cd3/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/events/VisorEventsCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/events/VisorEventsCommand.scala
b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/events/VisorEventsCommand.scala
index a3afd48..d88711a 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/events/VisorEventsCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/events/VisorEventsCommand.scala
@@ -166,7 +166,6 @@ class VisorEventsCommand {
                 case "sw" => arr ++= EVTS_SWAPSPACE.toList
                 case "di" => arr ++= EVTS_DISCOVERY.toList
                 case "az" => arr ++= EVTS_AUTHORIZATION.toList
-                case "se" => arr ++= EVTS_SECURE_SESSION.toList
                 case t => throw new IllegalArgumentException("Unknown event type: " +
t)
             }
 
@@ -192,7 +191,6 @@ class VisorEventsCommand {
             case t if EVTS_SWAPSPACE.contains(t) => "sw"
             case t if EVTS_CACHE_PRELOAD.contains(t) => "cp"
             case t if EVTS_AUTHORIZATION.contains(t) => "az"
-            case t if EVTS_SECURE_SESSION.contains(t) => "se"
         }
     }
 


Mime
View raw message