Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jortiz16 committed Dec 16, 2016
1 parent 1d52041 commit 7dfebf0
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion perfenforce_files/filesToFetch.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ PSLAGeneration/weka.jar
PSLAGeneration/tiers.txt
PSLAGeneration/training.arff
PerfEnforceScaling/moa.jar
PerfEnforceScaling/training.jar
PerfEnforceScaling/training.arff
PerfEnforceScaling/features/4
PerfEnforceScaling/features/6
PerfEnforceScaling/features/8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ public Response prepareData(final List<PerfEnforceTableEncoding> tableList)

@GET
@Path("/getDataPreparationStatus")
public String getDataPreparationStatus() {
return server.getPerfEnforceDriver().getDataPreparationStatus();
public Response getDataPreparationStatus() {
return Response.ok(server.getPerfEnforceDriver().getDataPreparationStatus()).build();
}

@GET
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public PerfEnforceQueryMetadataEncoding(

this.id = id;
this.slaRuntime = slaRuntime;
this.queryText = queryText;
}

public double getSLA() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public void generateQueries() throws Exception {
"mono "
+ PSLAManagerExePath.toString()
+ " -f "
+ PerfEnforceDriver.configurationPath.toString()
+ PerfEnforceDriver.configurationPath.resolve("PSLAGeneration").toString()
+ " -q");

System.out.println(IOUtils.toString(p.getErrorStream()));
Expand All @@ -50,7 +50,7 @@ public void generatePSLA() throws Exception {
"mono "
+ PSLAManagerExePath.toString()
+ " -f "
+ PerfEnforceDriver.configurationPath.toString()
+ PerfEnforceDriver.configurationPath.resolve("PSLAGeneration").toString()
+ " -p");

p.waitFor();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public void fetchS3Files() throws PerfEnforceException, Exception {
}

public void preparePSLA(List<PerfEnforceTableEncoding> tableList) throws Exception {
isDonePSLA = false;
PerfEnforceDriver.tableList = tableList;
fetchS3Files();

Expand Down Expand Up @@ -114,8 +115,9 @@ public void preparePSLA(List<PerfEnforceTableEncoding> tableList) throws Excepti
PSLAManagerWrapper pslaManager = new PSLAManagerWrapper();
pslaManager.generateQueries();
perfenforceDataPrepare.collectFeaturesFromGeneratedQueries();

pslaManager.generatePSLA();

dataPreparationStatus = "Finished";
isDonePSLA = true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,10 @@ public void findBestClusterSize() throws PerfEnforceException {
PerfEnforceUtils.getMaxFeature(
server, currentQueryForConfiguration, currentClusterSize);

String maxFeatureForConfiguration =
PerfEnforceUtils.getMaxFeature(server, currentQueryFeatures, c);

FileWriter featureWriterForConfiguration;
featureWriterForConfiguration =
new FileWriter(Paths.get(onlineLearningPath, "features", String.valueOf(c)).toString());
featureWriterForConfiguration.write(maxFeatureForConfiguration + '\n');
featureWriterForConfiguration.write(currentQueryFeatures + '\n');
featureWriterForConfiguration.close();
}
} catch (Exception e) {
Expand Down

0 comments on commit 7dfebf0

Please sign in to comment.