IGNITE-389 - WIP
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/b38cf38d Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/b38cf38d Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/b38cf38d Branch: refs/heads/ignite-389 Commit: b38cf38dc8abd6b59d547acf8476cbb01f0a9477 Parents: 896b426 Author: Alexey Goncharuk <agoncha...@gridgain.com> Authored: Fri May 15 12:45:29 2015 -0700 Committer: Alexey Goncharuk <agoncha...@gridgain.com> Committed: Fri May 15 12:45:29 2015 -0700 ---------------------------------------------------------------------- modules/spark/pom.xml | 87 ++++++++++++++++++++ .../org/apache/ignite/spark/IgniteRDD.scala | 29 +++++++ pom.xml | 1 + 3 files changed, 117 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b38cf38d/modules/spark/pom.xml ---------------------------------------------------------------------- diff --git a/modules/spark/pom.xml b/modules/spark/pom.xml new file mode 100644 index 0000000..0a60c2f --- /dev/null +++ b/modules/spark/pom.xml @@ -0,0 +1,87 @@ +<?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. +--> + +<!-- + POM file. +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.ignite</groupId> + <artifactId>ignite-parent</artifactId> + <version>1</version> + <relativePath>../../parent</relativePath> + </parent> + + <artifactId>ignite-spark</artifactId> + <version>1.0.6-SNAPSHOT</version> + + <dependencies> + <dependency> + <groupId>org.apache.ignite</groupId> + <artifactId>ignite-core</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> + <groupId>org.apache.ignite</groupId> + <artifactId>ignite-core</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.scala-lang</groupId> + <artifactId>scala-library</artifactId> + <version>2.11.2</version> + </dependency> + <dependency> + <groupId>org.scalatest</groupId> + <artifactId>scalatest_2.11</artifactId> + <version>2.2.4</version> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>org.scala-lang</groupId> + <artifactId>scala-library</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.apache.spark</groupId> + <artifactId>spark-core_2.11</artifactId> + <version>1.3.1</version> + </dependency> + <dependency> + <groupId>org.apache.spark</groupId> + <artifactId>spark-sql_2.11</artifactId> + <version>1.3.1</version> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>net.alchim31.maven</groupId> + <artifactId>scala-maven-plugin</artifactId> + </plugin> + </plugins> + </build> +</project> http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b38cf38d/modules/spark/src/main/scala/org/apache/ignite/spark/IgniteRDD.scala ---------------------------------------------------------------------- diff --git a/modules/spark/src/main/scala/org/apache/ignite/spark/IgniteRDD.scala b/modules/spark/src/main/scala/org/apache/ignite/spark/IgniteRDD.scala new file mode 100644 index 0000000..4d051d8 --- /dev/null +++ b/modules/spark/src/main/scala/org/apache/ignite/spark/IgniteRDD.scala @@ -0,0 +1,29 @@ +/* + * 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.spark + +import org.apache.spark.{TaskContext, Partition, SparkContext} +import org.apache.spark.rdd.RDD + +class IgniteRDD[T]( + sc: SparkContext +) extends RDD[T](sc, deps = Nil) { + override def compute(split: Partition, context: TaskContext): Iterator[T] = ??? + + override protected def getPartitions: Array[Partition] = ??? +} http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b38cf38d/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 7ad83f0..85cbc4f 100644 --- a/pom.xml +++ b/pom.xml @@ -51,6 +51,7 @@ <module>modules/tools</module> <module>modules/core</module> <module>modules/hadoop</module> + <module>modules/spark</module> <module>modules/extdata/p2p</module> <module>modules/extdata/uri</module> <module>modules/clients</module>