Repository: incubator-hivemall Updated Branches: refs/heads/v0.5.0 03437007f -> e2fb6f866
http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/e2fb6f86/spark/spark-common/src/main/scala/org/apache/spark/streaming/HivemallStreamingOps.scala ---------------------------------------------------------------------- diff --git a/spark/spark-common/src/main/scala/org/apache/spark/streaming/HivemallStreamingOps.scala b/spark/spark-common/src/main/scala/org/apache/spark/streaming/HivemallStreamingOps.scala deleted file mode 100644 index a6bbb4b..0000000 --- a/spark/spark-common/src/main/scala/org/apache/spark/streaming/HivemallStreamingOps.scala +++ /dev/null @@ -1,47 +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.spark.streaming - -import scala.reflect.ClassTag - -import org.apache.spark.ml.feature.HivemallLabeledPoint -import org.apache.spark.rdd.RDD -import org.apache.spark.sql.{DataFrame, Row, SQLContext} -import org.apache.spark.streaming.dstream.DStream - -final class HivemallStreamingOps(ds: DStream[HivemallLabeledPoint]) { - - def predict[U: ClassTag](f: DataFrame => DataFrame)(implicit sqlContext: SQLContext) - : DStream[Row] = { - ds.transform[Row] { rdd: RDD[HivemallLabeledPoint] => - f(sqlContext.createDataFrame(rdd)).rdd - } - } -} - -object HivemallStreamingOps { - - /** - * Implicitly inject the [[HivemallStreamingOps]] into [[DStream]]. - */ - implicit def dataFrameToHivemallStreamingOps(ds: DStream[HivemallLabeledPoint]) - : HivemallStreamingOps = { - new HivemallStreamingOps(ds) - } -} http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/e2fb6f86/xgboost/pom.xml ---------------------------------------------------------------------- diff --git a/xgboost/pom.xml b/xgboost/pom.xml index 7dab4cb..b0ba6c1 100644 --- a/xgboost/pom.xml +++ b/xgboost/pom.xml @@ -40,55 +40,31 @@ <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-common</artifactId> - <version>${hadoop.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-mapreduce-client-core</artifactId> - <version>${hadoop.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.hive</groupId> <artifactId>hive-exec</artifactId> - <version>${hive.version}</version> <scope>provided</scope> - <exclusions> - <exclusion> - <artifactId>jetty</artifactId> - <groupId>org.mortbay.jetty</groupId> - </exclusion> - <exclusion> - <groupId>javax.jdo</groupId> - <artifactId>jdo2-api</artifactId> - </exclusion> - <exclusion> - <groupId>asm-parent</groupId> - <artifactId>asm-parent</artifactId> - </exclusion> - <exclusion> - <groupId>asm</groupId> - <artifactId>asm</artifactId> - </exclusion> - </exclusions> </dependency> <dependency> <groupId>commons-cli</groupId> <artifactId>commons-cli</artifactId> - <version>1.2</version> <scope>provided</scope> </dependency> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> - <version>1.0.4</version> <scope>provided</scope> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> - <version>1.2.17</version> <scope>provided</scope> </dependency> <dependency> @@ -122,17 +98,7 @@ <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <version>2.5</version> - <configuration> - <finalName>${project.artifactId}-${project.version}</finalName> - <outputDirectory>${project.parent.build.directory}</outputDirectory> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> - <version>3.1.0</version> <executions> <!-- hivemall-xgboost-xx-with-dependencies.jar including minimum dependencies --> <execution>
