ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject [1/2] ignite git commit: IGNITE-3238 Javadoc Warning due to cassandra libs usage
Date Fri, 10 Jun 2016 09:18:28 GMT
Repository: ignite
Updated Branches:
  refs/heads/master 51a25fa84 -> be5b3458a


IGNITE-3238 Javadoc Warning due to cassandra libs usage


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

Branch: refs/heads/master
Commit: 17020cc81edbb6a75b45f35bdbb28c70c951a667
Parents: 7761e5f
Author: Igor <irudyak@gmail.com>
Authored: Fri Jun 10 02:38:41 2016 +0300
Committer: Anton Vinogradov <av@apache.org>
Committed: Fri Jun 10 12:15:48 2016 +0300

----------------------------------------------------------------------
 modules/cassandra/pom.xml                       |   2 +-
 .../cassandra/bean/CassandraLifeCycleBean.java  | 149 -------------------
 .../ignite/tests/utils/CassandraHelper.java     |   2 +-
 .../tests/utils/CassandraLifeCycleBean.java     | 149 +++++++++++++++++++
 4 files changed, 151 insertions(+), 151 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/17020cc8/modules/cassandra/pom.xml
----------------------------------------------------------------------
diff --git a/modules/cassandra/pom.xml b/modules/cassandra/pom.xml
index 7f9f876..e8e46b4 100644
--- a/modules/cassandra/pom.xml
+++ b/modules/cassandra/pom.xml
@@ -164,7 +164,7 @@
             <groupId>org.apache.cassandra</groupId>
             <artifactId>cassandra-all</artifactId>
             <version>${cassandra-all.version}</version>
-            <scope>provided</scope>
+            <scope>test</scope>
             <exclusions>
                 <exclusion>
                     <artifactId>log4j-over-slf4j</artifactId>

http://git-wip-us.apache.org/repos/asf/ignite/blob/17020cc8/modules/cassandra/src/main/java/org/apache/ignite/cache/store/cassandra/bean/CassandraLifeCycleBean.java
----------------------------------------------------------------------
diff --git a/modules/cassandra/src/main/java/org/apache/ignite/cache/store/cassandra/bean/CassandraLifeCycleBean.java
b/modules/cassandra/src/main/java/org/apache/ignite/cache/store/cassandra/bean/CassandraLifeCycleBean.java
deleted file mode 100644
index 11f8145..0000000
--- a/modules/cassandra/src/main/java/org/apache/ignite/cache/store/cassandra/bean/CassandraLifeCycleBean.java
+++ /dev/null
@@ -1,149 +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.cache.store.cassandra.bean;
-
-import org.apache.cassandra.service.CassandraDaemon;
-import org.apache.ignite.IgniteLogger;
-import org.apache.ignite.lifecycle.LifecycleBean;
-import org.apache.ignite.lifecycle.LifecycleEventType;
-import org.apache.ignite.resources.LoggerResource;
-
-/**
- * Implementation of {@link LifecycleBean} to start embedded Cassandra instance on Ignite
cluster startup
- */
-public class CassandraLifeCycleBean implements LifecycleBean {
-    /** System property specifying Cassandra jmx port */
-    private static final String CASSANDRA_JMX_PORT_PROP = "cassandra.jmx.local.port";
-
-    /** System property specifying Cassandra YAML config file */
-    private static final String CASSANDRA_CONFIG_PROP = "cassandra.config";
-
-    /** Prefix for file path syntax */
-    private static final String FILE_PREFIX = "file:///";
-
-    /** Auto-injected logger instance. */
-    @LoggerResource
-    private IgniteLogger log;
-
-    /** Instance of embedded Cassandra database */
-    private CassandraDaemon embeddedCassandraDaemon;
-
-    /** JMX port for embedded Cassandra instance */
-    private String jmxPort;
-
-    /** YAML config file for embedded Cassandra */
-    private String cassandraCfgFile;
-
-    /**
-     * Returns JMX port for embedded Cassandra
-     * @return JMX port
-     */
-    public String getJmxPort() {
-        return jmxPort;
-    }
-
-    /**
-     * Setter for embedded Cassandra JMX port
-     * @param jmxPort embedded Cassandra JMX port
-     */
-    public void setJmxPort(String jmxPort) {
-        this.jmxPort = jmxPort;
-    }
-
-    /**
-     * Returns embedded Cassandra YAML config file
-     * @return YAML config file
-     */
-    public String getCassandraConfigFile() {
-        return cassandraCfgFile;
-    }
-
-    /**
-     * Setter for embedded Cassandra YAML config file
-     * @param cassandraCfgFile YAML config file
-     */
-    public void setCassandraConfigFile(String cassandraCfgFile) {
-        this.cassandraCfgFile = cassandraCfgFile;
-    }
-
-    /** {@inheritDoc} */
-    @Override public void onLifecycleEvent(LifecycleEventType evt) {
-        if (evt == LifecycleEventType.BEFORE_NODE_START)
-            startEmbeddedCassandra();
-        else if (evt == LifecycleEventType.BEFORE_NODE_STOP)
-            stopEmbeddedCassandra();
-    }
-
-    /**
-     * Starts embedded Cassandra instance
-     */
-    private void startEmbeddedCassandra() {
-        if (log != null) {
-            log.info("-------------------------------");
-            log.info("| Starting embedded Cassandra |");
-            log.info("-------------------------------");
-        }
-
-        try {
-            if (jmxPort != null)
-                System.setProperty(CASSANDRA_JMX_PORT_PROP, jmxPort);
-
-            if (cassandraCfgFile != null)
-                System.setProperty(CASSANDRA_CONFIG_PROP, FILE_PREFIX + cassandraCfgFile);
-
-            embeddedCassandraDaemon = new CassandraDaemon(true);
-            embeddedCassandraDaemon.init(null);
-            embeddedCassandraDaemon.start();
-        }
-        catch (Exception e) {
-            throw new RuntimeException("Failed to start embedded Cassandra", e);
-        }
-
-        if (log != null) {
-            log.info("------------------------------");
-            log.info("| Embedded Cassandra started |");
-            log.info("------------------------------");
-        }
-    }
-
-    /**
-     * Stops embedded Cassandra instance
-     */
-    private void stopEmbeddedCassandra() {
-        if (log != null) {
-            log.info("-------------------------------");
-            log.info("| Stopping embedded Cassandra |");
-            log.info("-------------------------------");
-        }
-
-        if (embeddedCassandraDaemon != null) {
-            try {
-                embeddedCassandraDaemon.deactivate();
-            }
-            catch (Throwable e) {
-                throw new RuntimeException("Failed to stop embedded Cassandra", e);
-            }
-        }
-
-        if (log != null) {
-            log.info("------------------------------");
-            log.info("| Embedded Cassandra stopped |");
-            log.info("------------------------------");
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/17020cc8/modules/cassandra/src/test/java/org/apache/ignite/tests/utils/CassandraHelper.java
----------------------------------------------------------------------
diff --git a/modules/cassandra/src/test/java/org/apache/ignite/tests/utils/CassandraHelper.java
b/modules/cassandra/src/test/java/org/apache/ignite/tests/utils/CassandraHelper.java
index d1ef1bd..970be84 100644
--- a/modules/cassandra/src/test/java/org/apache/ignite/tests/utils/CassandraHelper.java
+++ b/modules/cassandra/src/test/java/org/apache/ignite/tests/utils/CassandraHelper.java
@@ -29,7 +29,7 @@ import java.net.URL;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.ResourceBundle;
-import org.apache.ignite.cache.store.cassandra.bean.CassandraLifeCycleBean;
+
 import org.apache.ignite.cache.store.cassandra.datasource.DataSource;
 import org.apache.ignite.cache.store.cassandra.session.pool.SessionPool;
 import org.apache.ignite.internal.util.typedef.internal.U;

http://git-wip-us.apache.org/repos/asf/ignite/blob/17020cc8/modules/cassandra/src/test/java/org/apache/ignite/tests/utils/CassandraLifeCycleBean.java
----------------------------------------------------------------------
diff --git a/modules/cassandra/src/test/java/org/apache/ignite/tests/utils/CassandraLifeCycleBean.java
b/modules/cassandra/src/test/java/org/apache/ignite/tests/utils/CassandraLifeCycleBean.java
new file mode 100644
index 0000000..d70d71e
--- /dev/null
+++ b/modules/cassandra/src/test/java/org/apache/ignite/tests/utils/CassandraLifeCycleBean.java
@@ -0,0 +1,149 @@
+/*
+ * 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.tests.utils;
+
+import org.apache.cassandra.service.CassandraDaemon;
+import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.lifecycle.LifecycleBean;
+import org.apache.ignite.lifecycle.LifecycleEventType;
+import org.apache.ignite.resources.LoggerResource;
+
+/**
+ * Implementation of {@link LifecycleBean} to start embedded Cassandra instance on Ignite
cluster startup
+ */
+public class CassandraLifeCycleBean implements LifecycleBean {
+    /** System property specifying Cassandra jmx port */
+    private static final String CASSANDRA_JMX_PORT_PROP = "cassandra.jmx.local.port";
+
+    /** System property specifying Cassandra YAML config file */
+    private static final String CASSANDRA_CONFIG_PROP = "cassandra.config";
+
+    /** Prefix for file path syntax */
+    private static final String FILE_PREFIX = "file:///";
+
+    /** Auto-injected logger instance. */
+    @LoggerResource
+    private IgniteLogger log;
+
+    /** Instance of embedded Cassandra database */
+    private CassandraDaemon embeddedCassandraDaemon;
+
+    /** JMX port for embedded Cassandra instance */
+    private String jmxPort;
+
+    /** YAML config file for embedded Cassandra */
+    private String cassandraCfgFile;
+
+    /**
+     * Returns JMX port for embedded Cassandra
+     * @return JMX port
+     */
+    public String getJmxPort() {
+        return jmxPort;
+    }
+
+    /**
+     * Setter for embedded Cassandra JMX port
+     * @param jmxPort embedded Cassandra JMX port
+     */
+    public void setJmxPort(String jmxPort) {
+        this.jmxPort = jmxPort;
+    }
+
+    /**
+     * Returns embedded Cassandra YAML config file
+     * @return YAML config file
+     */
+    public String getCassandraConfigFile() {
+        return cassandraCfgFile;
+    }
+
+    /**
+     * Setter for embedded Cassandra YAML config file
+     * @param cassandraCfgFile YAML config file
+     */
+    public void setCassandraConfigFile(String cassandraCfgFile) {
+        this.cassandraCfgFile = cassandraCfgFile;
+    }
+
+    /** {@inheritDoc} */
+    @Override public void onLifecycleEvent(LifecycleEventType evt) {
+        if (evt == LifecycleEventType.BEFORE_NODE_START)
+            startEmbeddedCassandra();
+        else if (evt == LifecycleEventType.BEFORE_NODE_STOP)
+            stopEmbeddedCassandra();
+    }
+
+    /**
+     * Starts embedded Cassandra instance
+     */
+    private void startEmbeddedCassandra() {
+        if (log != null) {
+            log.info("-------------------------------");
+            log.info("| Starting embedded Cassandra |");
+            log.info("-------------------------------");
+        }
+
+        try {
+            if (jmxPort != null)
+                System.setProperty(CASSANDRA_JMX_PORT_PROP, jmxPort);
+
+            if (cassandraCfgFile != null)
+                System.setProperty(CASSANDRA_CONFIG_PROP, FILE_PREFIX + cassandraCfgFile);
+
+            embeddedCassandraDaemon = new CassandraDaemon(true);
+            embeddedCassandraDaemon.init(null);
+            embeddedCassandraDaemon.start();
+        }
+        catch (Exception e) {
+            throw new RuntimeException("Failed to start embedded Cassandra", e);
+        }
+
+        if (log != null) {
+            log.info("------------------------------");
+            log.info("| Embedded Cassandra started |");
+            log.info("------------------------------");
+        }
+    }
+
+    /**
+     * Stops embedded Cassandra instance
+     */
+    private void stopEmbeddedCassandra() {
+        if (log != null) {
+            log.info("-------------------------------");
+            log.info("| Stopping embedded Cassandra |");
+            log.info("-------------------------------");
+        }
+
+        if (embeddedCassandraDaemon != null) {
+            try {
+                embeddedCassandraDaemon.deactivate();
+            }
+            catch (Throwable e) {
+                throw new RuntimeException("Failed to stop embedded Cassandra", e);
+            }
+        }
+
+        if (log != null) {
+            log.info("------------------------------");
+            log.info("| Embedded Cassandra stopped |");
+            log.info("------------------------------");
+        }
+    }
+}


Mime
View raw message