ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yzhda...@apache.org
Subject [6/9] incubator-ignite git commit: # IGNITE-235: Done.
Date Thu, 12 Feb 2015 20:34:14 GMT
# IGNITE-235: Done.


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

Branch: refs/heads/ignite-189
Commit: eb7b1702cfa954b8b80fca5af8b3db8d83167ea3
Parents: f38677a
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Thu Feb 12 18:15:58 2015 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Thu Feb 12 18:15:58 2015 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/events/EventType.java     |  45 +------
 .../org/apache/ignite/events/LicenseEvent.java  | 116 -------------------
 .../visor/event/VisorGridLicenseEvent.java      |  74 ------------
 .../node/VisorNodeEventsCollectorTask.java      |   5 -
 .../internal/visor/util/VisorTaskUtils.java     |   9 --
 .../optimized/optimized-classnames.properties   |   2 +-
 .../scala/org/apache/ignite/visor/visor.scala   |   4 -
 7 files changed, 2 insertions(+), 253 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/eb7b1702/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 d1246d9..2e88d15 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
@@ -36,7 +36,6 @@ import java.util.*;
  * <li>{@link #EVTS_DISCOVERY_ALL}</li>
  * <li>{@link #EVTS_JOB_EXECUTION}</li>
  * <li>{@link #EVTS_TASK_EXECUTION}</li>
- * <li>{@link #EVTS_LICENSE}</li>
  * <li>{@link #EVTS_CACHE}</li>
  * <li>{@link #EVTS_CACHE_PRELOAD}</li>
  * <li>{@link #EVTS_CACHE_QUERY}</li>
@@ -620,35 +619,7 @@ public interface EventType {
      */
     public static final int EVT_CACHE_QUERY_OBJECT_READ = 97;
 
-    /**
-     * Built-in event type: license violation detected.
-     * <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 LicenseEvent
-     */
-    public static final int EVT_LIC_VIOLATION = 108;
 
-    /**
-     * Built-in event type: license violation cleared.
-     * <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 LicenseEvent
-     */
-    public static final int EVT_LIC_CLEARED = 109;
-
-    /**
-     * Built-in event type: license violation grace period is expired.
-     * <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 LicenseEvent
-     */
-    public static final int EVT_LIC_GRACE_EXPIRED = 110;
 
     /**
      * Built-in event type: authentication succeed.
@@ -880,18 +851,7 @@ public interface EventType {
      */
     public static final int EVT_AUTHORIZATION_FAILED = 129;
 
-    /**
-     * All license 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 license events.
-     *
-     * @see LicenseEvent
-     */
-    public static final int[] EVTS_LICENSE = {
-        EVT_LIC_CLEARED,
-        EVT_LIC_VIOLATION,
-        EVT_LIC_GRACE_EXPIRED
-    };
+
 
     /**
      * All checkpoint events. This array can be directly passed into
@@ -938,9 +898,6 @@ public interface EventType {
         EVT_TASK_DEPLOY_FAILED,
         EVT_TASK_DEPLOYED,
         EVT_TASK_UNDEPLOYED,
-        EVT_LIC_CLEARED,
-        EVT_LIC_VIOLATION,
-        EVT_LIC_GRACE_EXPIRED,
         EVT_CACHE_PRELOAD_STARTED,
         EVT_CACHE_PRELOAD_STOPPED
     };

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/eb7b1702/modules/core/src/main/java/org/apache/ignite/events/LicenseEvent.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/events/LicenseEvent.java b/modules/core/src/main/java/org/apache/ignite/events/LicenseEvent.java
deleted file mode 100644
index a37b743..0000000
--- a/modules/core/src/main/java/org/apache/ignite/events/LicenseEvent.java
+++ /dev/null
@@ -1,116 +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 java.util.*;
-
-/**
- * Grid license 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_LIC_CLEARED
- * @see EventType#EVT_LIC_GRACE_EXPIRED
- * @see EventType#EVT_LIC_VIOLATION
- */
-public class LicenseEvent extends EventAdapter {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /** License ID. */
-    private UUID licId;
-
-    /**
-     * No-arg constructor.
-     */
-    public LicenseEvent() {
-        // No-op.
-    }
-
-    /**
-     * Creates license event with given parameters.
-     *
-     * @param node Node.
-     * @param msg Optional message.
-     * @param type Event type.
-     */
-    public LicenseEvent(ClusterNode node, String msg, int type) {
-        super(node, msg, type);
-    }
-
-    /** {@inheritDoc} */
-    @Override public String shortDisplay() {
-        return name() + ": licId8=" + U.id8(licId) + ", msg=" + message();
-    }
-
-    /**
-     * Gets license ID.
-     *
-     * @return License ID.
-     */
-    public UUID licenseId() {
-        return licId;
-    }
-
-    /**
-     * Sets license ID.
-     *
-     * @param licId License ID to set.
-     */
-    public void licenseId(UUID licId) {
-        this.licId = licId;
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(LicenseEvent.class, this,
-            "nodeId8", U.id8(node().id()),
-            "msg", message(),
-            "type", name(),
-            "tstamp", timestamp());
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/eb7b1702/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridLicenseEvent.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridLicenseEvent.java
b/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridLicenseEvent.java
deleted file mode 100644
index 6d33bee..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridLicenseEvent.java
+++ /dev/null
@@ -1,74 +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.internal.visor.event;
-
-import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.lang.*;
-import org.jetbrains.annotations.*;
-
-import java.util.*;
-
-/**
- * Lightweight counterpart for {@link org.apache.ignite.events.LicenseEvent}.
- */
-public class VisorGridLicenseEvent extends VisorGridEvent {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /** License ID. */
-    private final UUID licenseId;
-
-    /**
-     * Create event with given parameters.
-     *
-     * @param typeId Event type.
-     * @param id Event id.
-     * @param name Event name.
-     * @param nid Event node ID.
-     * @param timestamp Event timestamp.
-     * @param message Event message.
-     * @param shortDisplay Shortened version of {@code toString()} result.
-     * @param licenseId License ID.
-     */
-    public VisorGridLicenseEvent(
-        int typeId,
-        IgniteUuid id,
-        String name,
-        UUID nid,
-        long timestamp,
-        @Nullable String message,
-        String shortDisplay,
-        UUID licenseId
-    ) {
-        super(typeId, id, name, nid, timestamp, message, shortDisplay);
-
-        this.licenseId = licenseId;
-    }
-
-    /**
-     * @return License ID.
-     */
-    public UUID licenseId() {
-        return licenseId;
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(VisorGridLicenseEvent.class, this);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/eb7b1702/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 e67ac97..c054c31 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
@@ -310,11 +310,6 @@ public class VisorNodeEventsCollectorTask extends VisorMultiNodeTask<VisorNodeEv
 
                     res.add(new VisorGridDeploymentEvent(tid, id, name, nid, t, msg, shortDisplay,
de.alias()));
                 }
-                else if (e instanceof LicenseEvent) {
-                    LicenseEvent le = (LicenseEvent)e;
-
-                    res.add(new VisorGridLicenseEvent(tid, id, name, nid, t, msg, shortDisplay,
le.licenseId()));
-                }
                 else if (e instanceof DiscoveryEvent) {
                     DiscoveryEvent de = (DiscoveryEvent)e;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/eb7b1702/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 35b8c03..945be88 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,10 +87,6 @@ public class VisorTaskUtils {
         EVT_CLASS_DEPLOY_FAILED,
         EVT_TASK_DEPLOY_FAILED,
 
-        EVT_LIC_CLEARED,
-        EVT_LIC_VIOLATION,
-        EVT_LIC_GRACE_EXPIRED,
-
         EVT_AUTHORIZATION_FAILED,
         EVT_AUTHENTICATION_FAILED,
 
@@ -423,11 +419,6 @@ public class VisorTaskUtils {
 
                 res.add(new VisorGridDeploymentEvent(tid, id, name, nid, t, msg, shortDisplay,
de.alias()));
             }
-            else if (e instanceof LicenseEvent) {
-                LicenseEvent le = (LicenseEvent)e;
-
-                res.add(new VisorGridLicenseEvent(tid, id, name, nid, t, msg, shortDisplay,
le.licenseId()));
-            }
             else if (e instanceof AuthorizationEvent) {
                 AuthorizationEvent ae = (AuthorizationEvent)e;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/eb7b1702/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 e64bb77..4ff4f55 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,7 @@ org.apache.ignite.events.DiscoveryEvent
 org.apache.ignite.events.EventAdapter
 org.apache.ignite.events.IgniteFsEvent
 org.apache.ignite.events.JobEvent
-org.apache.ignite.events.LicenseEvent
+org.gridgain.grid.events.LicenseEvent
 org.apache.ignite.events.SecureSessionEvent
 org.apache.ignite.events.SwapSpaceEvent
 org.apache.ignite.events.TaskEvent

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/eb7b1702/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
index ebd9fef..739d292 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/visor.scala
@@ -2404,10 +2404,6 @@ object visor extends VisorTag {
                 EVT_TASK_DEPLOYED,
                 EVT_TASK_UNDEPLOYED,
 
-                EVT_LIC_CLEARED,
-                EVT_LIC_VIOLATION,
-                EVT_LIC_GRACE_EXPIRED,
-
                 EVT_CACHE_PRELOAD_STARTED,
                 EVT_CACHE_PRELOAD_STOPPED,
                 EVT_CLASS_DEPLOY_FAILED


Mime
View raw message