Skip to content
Open
Show file tree
Hide file tree
Changes from all 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.

This file was deleted.

This file was deleted.

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
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public List<ClickStream> getClickStreamList(String indexName, String type, Strin
* @return an instance of session tree structure
* @throws UnsupportedEncodingException UnsupportedEncodingException
*/
private SessionTree getSessionTree(String indexName, String type, String sessionID) throws UnsupportedEncodingException {
public SessionTree getSessionTree(String indexName, String type, String sessionID) throws UnsupportedEncodingException {

SearchResponse response = es.getClient().prepareSearch(indexName).setTypes(type).setQuery(QueryBuilders.termQuery("SessionID", sessionID)).setSize(100).addSort("Time", SortOrder.ASC)
.execute().actionGet();
Expand Down Expand Up @@ -261,31 +261,4 @@ private JsonElement getRequests(String cleanuptype, String sessionID) throws Uns
}
return gson.toJsonTree(requestList);
}

/**
* getClickStreamList: Extracted ranking training data from current session.
*
* @param indexName an index from which to obtain ranked training data.
* @param cleanuptype: Session type name in Elasticsearch
* @param sessionID: Session ID
* @return Click stram data list
* {@link ClickStream}
*/
public List<RankingTrainData> getRankingTrainData(String indexName, String cleanuptype, String sessionID) {
SessionTree tree = null;
try {
tree = this.getSessionTree(indexName, cleanuptype, sessionID);
} catch (UnsupportedEncodingException e) {
LOG.error("Error whilst retreiving Session Tree: {}", e);
}

List<RankingTrainData> trainData = new ArrayList<>();
try {
trainData = tree.getRankingTrainData(indexName);
} catch (UnsupportedEncodingException e) {
LOG.error("Error whilst retreiving ranking training data: {}", e);
}

return trainData;
}
}
Loading