Repository: incubator-zeppelin Updated Branches: refs/heads/master baab124cf -> d67413b57
ZEPPELIN-342 Ignite interpreter updated Author: agura <[email protected]> Closes #344 from agura/ZEPPELIN-342 and squashes the following commits: 361ad67 [agura] ZEPPELIN-342 Ignite interpreter updated Project: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/commit/d67413b5 Tree: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/tree/d67413b5 Diff: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/diff/d67413b5 Branch: refs/heads/master Commit: d67413b578088b11cc93a83d0211e6c9499cedf0 Parents: baab124 Author: agura <[email protected]> Authored: Thu Oct 15 18:08:35 2015 +0300 Committer: Lee moon soo <[email protected]> Committed: Mon Oct 19 14:45:54 2015 +0900 ---------------------------------------------------------------------- ignite/pom.xml | 2 +- .../zeppelin/ignite/IgniteSqlInterpreter.java | 3 +- .../src/main/resources/default-ignite-jdbc.xml | 66 ++++++++++++++++++++ .../zeppelin/ignite/IgniteInterpreterTest.java | 2 +- .../ignite/IgniteSqlInterpreterTest.java | 4 +- 5 files changed, 72 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/d67413b5/ignite/pom.xml ---------------------------------------------------------------------- diff --git a/ignite/pom.xml b/ignite/pom.xml index 91094a6..1f4bfc4 100644 --- a/ignite/pom.xml +++ b/ignite/pom.xml @@ -33,7 +33,7 @@ <url>http://zeppelin.incubator.apache.org</url> <properties> - <ignite.version>1.1.0-incubating</ignite.version> + <ignite.version>1.4.0</ignite.version> <ignite.scala.binary.version>2.10</ignite.scala.binary.version> <ignite.scala.version>2.10.4</ignite.scala.version> </properties> http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/d67413b5/ignite/src/main/java/org/apache/zeppelin/ignite/IgniteSqlInterpreter.java ---------------------------------------------------------------------- diff --git a/ignite/src/main/java/org/apache/zeppelin/ignite/IgniteSqlInterpreter.java b/ignite/src/main/java/org/apache/zeppelin/ignite/IgniteSqlInterpreter.java index 5d77e7d..f7e6330 100644 --- a/ignite/src/main/java/org/apache/zeppelin/ignite/IgniteSqlInterpreter.java +++ b/ignite/src/main/java/org/apache/zeppelin/ignite/IgniteSqlInterpreter.java @@ -62,7 +62,8 @@ public class IgniteSqlInterpreter extends Interpreter { "ignite", IgniteSqlInterpreter.class.getName(), new InterpreterPropertyBuilder() - .add(IGNITE_JDBC_URL, "jdbc:ignite://localhost:11211/", "Ignite JDBC connection URL.") + .add(IGNITE_JDBC_URL, + "jdbc:ignite:cfg://default-ignite-jdbc.xml", "Ignite JDBC connection URL.") .build()); } http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/d67413b5/ignite/src/main/resources/default-ignite-jdbc.xml ---------------------------------------------------------------------- diff --git a/ignite/src/main/resources/default-ignite-jdbc.xml b/ignite/src/main/resources/default-ignite-jdbc.xml new file mode 100644 index 0000000..96ed2de --- /dev/null +++ b/ignite/src/main/resources/default-ignite-jdbc.xml @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + 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. +--> + +<!-- + Ignite configuration with all defaults and enabled p2p deployment and enabled events. +--> +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:util="http://www.springframework.org/schema/util" + xsi:schemaLocation=" + http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans.xsd + http://www.springframework.org/schema/util + http://www.springframework.org/schema/util/spring-util.xsd"> + <bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"> + <property name="clientMode" value="true"/> + + <property name="peerClassLoadingEnabled" value="true"/> + + <property name="marshaller"> + <bean class="org.apache.ignite.marshaller.optimized.OptimizedMarshaller"> + <!-- Set to false to allow non-serializable objects in examples, default is true. --> + <property name="requireSerializable" value="false"/> + </bean> + </property> + + <!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. --> + <property name="discoverySpi"> + <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"> + <property name="ipFinder"> + <!-- + Ignite provides several options for automatic discovery that can be used + instead os static IP based discovery. For information on all options refer + to our documentation: http://apacheignite.readme.io/docs/cluster-config + --> + <!-- Uncomment static IP finder to enable static-based discovery of initial nodes. --> + <!--<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">--> + <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder"> + <property name="addresses"> + <list> + <!-- In distributed environment, replace with actual host IP address. --> + <value>127.0.0.1:47500..47509</value> + </list> + </property> + </bean> + </property> + </bean> + </property> + </bean> +</beans> http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/d67413b5/ignite/src/test/java/org/apache/zeppelin/ignite/IgniteInterpreterTest.java ---------------------------------------------------------------------- diff --git a/ignite/src/test/java/org/apache/zeppelin/ignite/IgniteInterpreterTest.java b/ignite/src/test/java/org/apache/zeppelin/ignite/IgniteInterpreterTest.java index 081dce1..f46b049 100644 --- a/ignite/src/test/java/org/apache/zeppelin/ignite/IgniteInterpreterTest.java +++ b/ignite/src/test/java/org/apache/zeppelin/ignite/IgniteInterpreterTest.java @@ -61,7 +61,7 @@ public class IgniteInterpreterTest { ignite = Ignition.start(cfg); Properties props = new Properties(); - props.setProperty(IgniteSqlInterpreter.IGNITE_JDBC_URL, "jdbc:intp://localhost:11211/person"); + props.setProperty(IgniteSqlInterpreter.IGNITE_JDBC_URL, "jdbc:ignite:cfg://[email protected]"); props.setProperty(IgniteInterpreter.IGNITE_CLIENT_MODE, "false"); props.setProperty(IgniteInterpreter.IGNITE_PEER_CLASS_LOADING_ENABLED, "false"); http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/d67413b5/ignite/src/test/java/org/apache/zeppelin/ignite/IgniteSqlInterpreterTest.java ---------------------------------------------------------------------- diff --git a/ignite/src/test/java/org/apache/zeppelin/ignite/IgniteSqlInterpreterTest.java b/ignite/src/test/java/org/apache/zeppelin/ignite/IgniteSqlInterpreterTest.java index b5eff96..3843704 100644 --- a/ignite/src/test/java/org/apache/zeppelin/ignite/IgniteSqlInterpreterTest.java +++ b/ignite/src/test/java/org/apache/zeppelin/ignite/IgniteSqlInterpreterTest.java @@ -58,14 +58,14 @@ public class IgniteSqlInterpreterTest { IgniteConfiguration cfg = new IgniteConfiguration(); cfg.setDiscoverySpi(discoSpi); + cfg.setPeerClassLoadingEnabled(true); cfg.setGridName("test"); ignite = Ignition.start(cfg); Properties props = new Properties(); - props.setProperty(IgniteSqlInterpreter.IGNITE_JDBC_URL, "jdbc:ignite://localhost:11211/person"); - props.setProperty(IgniteInterpreter.IGNITE_CLIENT_MODE, "false"); + props.setProperty(IgniteSqlInterpreter.IGNITE_JDBC_URL, "jdbc:ignite:cfg://[email protected]"); intp = new IgniteSqlInterpreter(props);
