ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [03/12] incubator-ignite git commit: # IGNITE-191: Finished GG and Ignite product splitting.
Date Thu, 12 Feb 2015 12:41:40 GMT
# IGNITE-191: Finished GG and Ignite product splitting.


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

Branch: refs/heads/sprint-1
Commit: e8c1d7c0f7a840bb2229e3d50cdf5106837a7d21
Parents: bb03c6e
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Thu Feb 12 11:04:01 2015 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Thu Feb 12 11:04:01 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/internal/GridProperties.java  |  4 +-
 .../apache/ignite/internal/IgniteKernal.java    |  3 +-
 .../ignite/internal/IgniteVersionUtils.java     | 78 ++++++++++++++++++++
 .../impl/GridRouterCommandLineStartup.java      |  3 +-
 .../version/GridVersionCommandHandler.java      |  2 +-
 .../ipc/shmem/IpcSharedMemoryNativeLoader.java  |  2 +-
 .../startup/cmdline/CommandLineStartup.java     |  3 +-
 .../product/GridProductVersionSelfTest.java     |  2 +-
 .../processors/hadoop/GridHadoopSetup.java      |  2 +-
 .../scala/org/apache/ignite/scalar/scalar.scala |  3 +-
 .../ignite/visor/commands/VisorConsole.scala    |  3 +-
 .../scala/org/apache/ignite/visor/visor.scala   |  3 +-
 12 files changed, 92 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e8c1d7c0/modules/core/src/main/java/org/apache/ignite/internal/GridProperties.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridProperties.java b/modules/core/src/main/java/org/apache/ignite/internal/GridProperties.java
index 6f11e9b..9b58360 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridProperties.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridProperties.java
@@ -17,8 +17,6 @@
 
 package org.apache.ignite.internal;
 
-import org.apache.ignite.internal.product.*;
-
 import java.io.*;
 import java.util.*;
 
@@ -46,7 +44,7 @@ public class GridProperties {
      * @param throwExc Flag indicating whether to throw an exception or not.
      */
     private static void readProperties(String path, boolean throwExc) {
-        try (InputStream is = IgniteProduct.class.getClassLoader().getResourceAsStream(path))
{
+        try (InputStream is = IgniteVersionUtils.class.getClassLoader().getResourceAsStream(path))
{
             if (is == null) {
                 if (throwExc)
                     throw new RuntimeException("Failed to find properties file: " + path);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e8c1d7c0/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index 58975f9..44bf72a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@ -61,7 +61,6 @@ import org.apache.ignite.internal.processors.session.*;
 import org.apache.ignite.internal.processors.streamer.*;
 import org.apache.ignite.internal.processors.task.*;
 import org.apache.ignite.internal.processors.timeout.*;
-import org.apache.ignite.internal.product.*;
 import org.apache.ignite.internal.util.*;
 import org.apache.ignite.internal.util.future.*;
 import org.apache.ignite.internal.util.lang.*;
@@ -92,7 +91,7 @@ import java.util.concurrent.atomic.*;
 
 import static org.apache.ignite.IgniteSystemProperties.*;
 import static org.apache.ignite.internal.GridKernalState.*;
-import static org.apache.ignite.internal.product.IgniteProduct.*;
+import static org.apache.ignite.internal.IgniteVersionUtils.*;
 import static org.apache.ignite.internal.IgniteComponentType.*;
 import static org.apache.ignite.internal.IgniteNodeAttributes.*;
 import static org.apache.ignite.internal.util.nodestart.IgniteNodeStartUtils.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e8c1d7c0/modules/core/src/main/java/org/apache/ignite/internal/IgniteVersionUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteVersionUtils.java
b/modules/core/src/main/java/org/apache/ignite/internal/IgniteVersionUtils.java
new file mode 100644
index 0000000..51668b6
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteVersionUtils.java
@@ -0,0 +1,78 @@
+/*
+ * 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;
+
+import org.apache.ignite.lang.*;
+
+import java.text.*;
+import java.util.*;
+
+/**
+ * Ignite version utils.
+ */
+public class IgniteVersionUtils {
+    /** Ignite version in String form. */
+    public static final String VER_STR;
+
+    /** Ignite version. */
+    public static final IgniteProductVersion VER;
+
+    /** Formatted build date. */
+    public static final String BUILD_TSTAMP_STR;
+
+    /** Build timestamp in seconds. */
+    public static final long BUILD_TSTAMP;
+
+    /** Revision hash. */
+    public static final String REV_HASH_STR;
+
+    /** Release date. */
+    public static final String RELEASE_DATE_STR;
+
+    /** Compound version. */
+    public static final String ACK_VER_STR;
+
+    /** Copyright blurb. */
+    public static final String COPYRIGHT = "2015 Copyright(C) Apache Software Foundation";
+
+    /**
+     * Static initializer.
+     */
+    static {
+        VER_STR = GridProperties.get("ignite.version");
+
+        BUILD_TSTAMP = Long.valueOf(GridProperties.get("ignite.build"));
+        BUILD_TSTAMP_STR = new SimpleDateFormat("yyyyMMdd").format(new Date(BUILD_TSTAMP
* 1000));
+
+        REV_HASH_STR = GridProperties.get("ignite.revision");
+        RELEASE_DATE_STR = GridProperties.get("ignite.rel.date");
+
+        String rev = REV_HASH_STR.length() > 8 ? REV_HASH_STR.substring(0, 8) : REV_HASH_STR;
+
+        ACK_VER_STR = VER_STR + '#' + BUILD_TSTAMP_STR + "-sha1:" + rev;
+
+        VER = IgniteProductVersion.fromString(VER_STR + '-' + BUILD_TSTAMP + '-' + REV_HASH_STR);
+    }
+
+    /**
+     * Private constructor.
+     */
+    private IgniteVersionUtils() {
+        // No-op.
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e8c1d7c0/modules/core/src/main/java/org/apache/ignite/internal/client/router/impl/GridRouterCommandLineStartup.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/client/router/impl/GridRouterCommandLineStartup.java
b/modules/core/src/main/java/org/apache/ignite/internal/client/router/impl/GridRouterCommandLineStartup.java
index 592249a..cf02528 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/client/router/impl/GridRouterCommandLineStartup.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/client/router/impl/GridRouterCommandLineStartup.java
@@ -20,7 +20,6 @@ package org.apache.ignite.internal.client.router.impl;
 import org.apache.ignite.*;
 import org.apache.ignite.internal.client.router.*;
 import org.apache.ignite.internal.processors.spring.*;
-import org.apache.ignite.internal.product.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
@@ -30,7 +29,7 @@ import java.net.*;
 import java.util.*;
 import java.util.logging.*;
 
-import static org.apache.ignite.internal.product.IgniteProduct.*;
+import static org.apache.ignite.internal.IgniteVersionUtils.*;
 import static org.apache.ignite.internal.IgniteComponentType.*;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e8c1d7c0/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/version/GridVersionCommandHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/version/GridVersionCommandHandler.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/version/GridVersionCommandHandler.java
index cbed107..c66de86 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/version/GridVersionCommandHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/version/GridVersionCommandHandler.java
@@ -26,7 +26,7 @@ import org.apache.ignite.internal.util.typedef.internal.*;
 
 import java.util.*;
 
-import static org.apache.ignite.internal.product.IgniteProduct.*;
+import static org.apache.ignite.internal.IgniteVersionUtils.*;
 import static org.apache.ignite.internal.processors.rest.GridRestCommand.*;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e8c1d7c0/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryNativeLoader.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryNativeLoader.java
b/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryNativeLoader.java
index ee327d2..ef9f46a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryNativeLoader.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/ipc/shmem/IpcSharedMemoryNativeLoader.java
@@ -26,7 +26,7 @@ import java.nio.channels.*;
 import java.security.*;
 import java.util.*;
 
-import static org.apache.ignite.internal.product.IgniteProduct.*;
+import static org.apache.ignite.internal.IgniteVersionUtils.*;
 
 /**
  * Shared memory native loader.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e8c1d7c0/modules/core/src/main/java/org/apache/ignite/startup/cmdline/CommandLineStartup.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/startup/cmdline/CommandLineStartup.java
b/modules/core/src/main/java/org/apache/ignite/startup/cmdline/CommandLineStartup.java
index b056b88..5189cfd 100644
--- a/modules/core/src/main/java/org/apache/ignite/startup/cmdline/CommandLineStartup.java
+++ b/modules/core/src/main/java/org/apache/ignite/startup/cmdline/CommandLineStartup.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.startup.cmdline;
 
 import org.apache.ignite.*;
-import org.apache.ignite.internal.product.*;
 import org.apache.ignite.internal.util.*;
 import org.apache.ignite.internal.util.lang.*;
 import org.apache.ignite.internal.util.typedef.*;
@@ -38,7 +37,7 @@ import java.util.concurrent.*;
 
 import static org.apache.ignite.IgniteState.*;
 import static org.apache.ignite.IgniteSystemProperties.*;
-import static org.apache.ignite.internal.product.IgniteProduct.*;
+import static org.apache.ignite.internal.IgniteVersionUtils.*;
 
 /**
  * This class defines command-line Ignite startup. This startup can be used to start Ignite

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e8c1d7c0/modules/core/src/test/java/org/apache/ignite/internal/product/GridProductVersionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/product/GridProductVersionSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/product/GridProductVersionSelfTest.java
index c1f5109..02f1878 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/product/GridProductVersionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/product/GridProductVersionSelfTest.java
@@ -20,7 +20,7 @@ package org.apache.ignite.internal.product;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.testframework.junits.common.*;
 
-import static org.apache.ignite.internal.product.IgniteProduct.*;
+import static org.apache.ignite.internal.IgniteVersionUtils.*;
 import static org.junit.Assert.*;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e8c1d7c0/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/GridHadoopSetup.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/GridHadoopSetup.java
b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/GridHadoopSetup.java
index 36028bf..fc3dadc 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/GridHadoopSetup.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/GridHadoopSetup.java
@@ -26,7 +26,7 @@ import java.nio.file.*;
 import java.text.*;
 import java.util.*;
 
-import static org.apache.ignite.internal.product.IgniteProduct.*;
+import static org.apache.ignite.internal.IgniteVersionUtils.*;
 
 /**
  * Setup tool to configure Hadoop client.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e8c1d7c0/modules/scalar/src/main/scala/org/apache/ignite/scalar/scalar.scala
----------------------------------------------------------------------
diff --git a/modules/scalar/src/main/scala/org/apache/ignite/scalar/scalar.scala b/modules/scalar/src/main/scala/org/apache/ignite/scalar/scalar.scala
index 12bb9b8..37755e9 100644
--- a/modules/scalar/src/main/scala/org/apache/ignite/scalar/scalar.scala
+++ b/modules/scalar/src/main/scala/org/apache/ignite/scalar/scalar.scala
@@ -21,7 +21,8 @@ import org.apache.ignite.cache.GridCache
 import org.apache.ignite.cache.query.{CacheQuerySqlField, CacheQueryTextField}
 import org.apache.ignite.cluster.ClusterNode
 import org.apache.ignite.configuration.IgniteConfiguration
-import org.apache.ignite.internal.product.IgniteProduct._
+import org.apache.ignite.internal.IgniteVersionUtils
+import IgniteVersionUtils._
 import org.apache.ignite.{Ignite, IgniteDataLoader, IgniteState, Ignition}
 import org.jetbrains.annotations.Nullable
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e8c1d7c0/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/VisorConsole.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/VisorConsole.scala
b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/VisorConsole.scala
index 70fc21e..75ac8e3 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/VisorConsole.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/VisorConsole.scala
@@ -23,7 +23,8 @@ import java.text.SimpleDateFormat
 import java.util
 import javax.swing.ImageIcon
 
-import org.apache.ignite.internal.product.IgniteProduct._
+import org.apache.ignite.internal.IgniteVersionUtils
+import IgniteVersionUtils._
 import org.apache.ignite.internal.util.IgniteUtils
 import org.apache.ignite.internal.util.scala.impl
 import org.apache.ignite.startup.cmdline.AboutDialog

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e8c1d7c0/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 30a11d8..d30720c 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
@@ -32,7 +32,8 @@ import org.apache.ignite.internal.IgniteComponentType._
 import org.apache.ignite.internal.IgniteNodeAttributes._
 import org.apache.ignite.internal.cluster.ClusterGroupEmptyCheckedException
 import org.apache.ignite.internal.processors.spring.IgniteSpringProcessor
-import org.apache.ignite.internal.product.IgniteProduct._
+import org.apache.ignite.internal.{IgniteVersionUtils, IgniteEx}
+import IgniteVersionUtils._
 import org.apache.ignite.internal.util.lang.{GridFunc => F}
 import org.apache.ignite.internal.util.typedef._
 import org.apache.ignite.internal.util.{GridConfigurationFinder, IgniteUtils}


Mime
View raw message