Skip to content
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,10 @@
<resource>
<directory>${basedir}/src/main/resources</directory>
<filtering>true</filtering>
<excludes>
<exclude>${svmSgdModel.value}/**</exclude>
</excludes>
</resource>

<resource>
<directory>${project.build.directory}</directory>
<includes>
<include>${svmSgdModel.value}.zip</include>
</includes>
</resource>

<resource>
Expand Down Expand Up @@ -206,26 +200,6 @@
<artifactId>maven-assembly-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>zipSVMWithSGDModel</id>
<phase>generate-resources</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<tarLongFileMode>posix</tarLongFileMode>
<finalName>${svmSgdModel.value}</finalName>
<outputDirectory>${project.build.directory}
</outputDirectory>
<descriptors>
<descriptor>
${basedir}/src/main/assembly/zipSVMWithSGDModel.xml
</descriptor>
</descriptors>
</configuration>
</execution>

<execution>
<id>generateDistribution</id>
<phase>package</phase>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import org.apache.sdap.mudrod.driver.SparkDriver;
import org.apache.sdap.mudrod.main.MudrodConstants;
import org.apache.sdap.mudrod.semantics.SVDAnalyzer;
import org.apache.sdap.mudrod.ssearch.ClickStreamImporter;
import org.apache.sdap.mudrod.utils.LinkageTriple;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -60,10 +59,7 @@ public Object execute() {
props.getProperty(MudrodConstants.CLICKSTREAM_SVD_PATH));
List<LinkageTriple> tripleList = svd.calTermSimfromMatrix(props.getProperty(MudrodConstants.CLICKSTREAM_SVD_PATH));
svd.saveToES(tripleList, props.getProperty(MudrodConstants.ES_INDEX_NAME), MudrodConstants.CLICK_STREAM_LINKAGE_TYPE);

// Store click stream in ES for the ranking use
ClickStreamImporter cs = new ClickStreamImporter(props, es, spark);
cs.importfromCSVtoES();

}
} catch (Exception e) {
LOG.error("Encountered an error during execution of ClickStreamAnalyzer.", e);
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@

<modules>
<module>core</module>
<module>ranking</module>
<module>service</module>
<module>web</module>
</modules>
Expand Down
3 changes: 3 additions & 0 deletions ranking/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/target/
/bin/
/lib/
215 changes: 215 additions & 0 deletions ranking/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,215 @@
<?xml version="1.0" encoding="UTF-8"?>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please ensure that license header is formatted correctly.

Also ensure that the code formatting matches what is present in the other pom.xml files.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some files will be moved to ranking module in the next step, such as RankingTrainData.java because I worked on the expert provided train data now.

<!-- Licensed 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. -->
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.apache.sdap</groupId>
<artifactId>mudrod-parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>

<artifactId>mudrod-ranking</artifactId>

<name>Mudrod :: Ranking</name>
<description>Mudrod ranking algorithm implementation.</description>

<properties>
<!-- This property is the name of the directory containing the SVM/SGD
Model. It is used during build to create a zip file from this directory -->
<svmSgdModel.value>javaSVMWithSGDModel</svmSgdModel.value>
</properties>

<dependencies>
<!-- Core Module -->
<dependency>
<groupId>org.apache.sdap.mudrod</groupId>
<artifactId>mudrod-core</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

<build>
<resources>
<resource>
<directory>${basedir}/src/main/resources</directory>
<filtering>true</filtering>
<excludes>
<exclude>${svmSgdModel.value}/**</exclude>
</excludes>
</resource>

<resource>
<directory>${project.build.directory}</directory>
<includes>
<include>${svmSgdModel.value}.zip</include>
</includes>
</resource>

<resource>
<directory>${basedir}/../</directory>
<targetPath>META-INF</targetPath>
<includes>
<include>LICENSE.txt</include>
<include>NOTICE.txt</include>
</includes>
</resource>
</resources>

<plugins>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not need the appassembler-maven-plugin configuration

<!-- generates the bin launchers -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>appassembler-maven-plugin</artifactId>
<version>1.10</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>assemble</goal>
</goals>
</execution>
</executions>
<configuration>
<repositoryLayout>flat</repositoryLayout>
<repositoryName>lib</repositoryName>
<programs>
<program>
<mainClass>org.apache.sdap.mudrod.main.MudrodEngine
</mainClass>
<name>mudrod-engine</name>
</program>
</programs>
</configuration>
</plugin>

<!-- Generates the distribution package -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>zipSVMWithSGDModel</id>
<phase>generate-resources</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<tarLongFileMode>posix</tarLongFileMode>
<finalName>${svmSgdModel.value}</finalName>
<outputDirectory>${project.build.directory}
</outputDirectory>
<descriptors>
<descriptor>
${basedir}/src/main/assembly/zipSVMWithSGDModel.xml
</descriptor>
</descriptors>
</configuration>
</execution>

<execution>
<id>generateDistribution</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<tarLongFileMode>posix</tarLongFileMode>
<descriptors>
<descriptor>
${basedir}/src/main/assembly/bin.xml
</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not need the maven-shade-plugin configuration

<artifactId>maven-shade-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Main-Class>
org.apache.sdap.mudrod.main.MudrodEngine
</Main-Class>
<Build-Number>${implementation.build}
</Build-Number>
</manifestEntries>
</transformer>
</transformers>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
<finalName>
${project.artifactId}-uber-${project.version}
</finalName>
</configuration>
</execution>
</executions>
</plugin>

</plugins>
</build>

<profiles>
<profile>
<id>release</id>
<build>
<resources>
<resource>
<directory>${basedir}/../</directory>
<targetPath>
${project.build.directory}/apidocs/META-INF
</targetPath>
<includes>
<include>LICENSE.txt</include>
<include>NOTICE.txt</include>
</includes>
</resource>
</resources>
</build>
</profile>
</profiles>

</project>
50 changes: 50 additions & 0 deletions ranking/src/main/assembly/bin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not need this

<!--
Licensed 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.
-->
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>bin</id>
<formats>
<format>tar.gz</format>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>target/appassembler/bin</directory>
<outputDirectory>bin</outputDirectory>
<excludes>
<exclude>*.bat</exclude>
</excludes>
<lineEnding>unix</lineEnding>
<directoryMode>0755</directoryMode>
<fileMode>0644</fileMode>
</fileSet>
<fileSet>
<directory>target/appassembler/bin</directory>
<outputDirectory>bin</outputDirectory>
<includes>
<include>*.bat</include>
</includes>
<lineEnding>dos</lineEnding>
<directoryMode>0755</directoryMode>
<fileMode>0644</fileMode>
</fileSet>
<fileSet>
<directory>target/appassembler/lib</directory>
<outputDirectory>lib</outputDirectory>
</fileSet>
</fileSets>
</assembly>
Loading