Skip to content

Commit

Permalink
Fixed keyword gen part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
rsprabery committed May 12, 2014
1 parent 76bb97a commit 19b9270
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 3 deletions.
26 changes: 26 additions & 0 deletions build_index_part2.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,29 @@

#NOTE: Your index generation should be in Java. This should follow the SSE.indexgen described in Figure 8 of paper
#Call your java code with the arguments here

#java -cp `pwd`/bin mp3.Main ../large illinois 2
#mkdir large_output
#echo "Time to place"
#time java -cp `pwd`/bin mp3.Main ../large illinois 2 blah large_output blah

#echo "time to index"
#time java -Xmx1024m -cp `pwd`/bin mp3.Main ./large_output illinois 2 indexOnly large_output blah

#echo "Time to encrypt"
#time java -cp `pwd`/bin mp3.Main ../small illinois 2 blah small_output encrypt
#mkdir small_output

rm -rf small_output2
mkdir -p small_output2/keywords

echo "Time to place"
time java -cp `pwd`/bin mp3.Main ../small illinois 2 blah small_output2 blah

echo "time to index"
time java -Xmx1024m -cp `pwd`/bin mp3.Main ./small_output2 illinois 2 indexOnly small_output2 blah

echo "Time to encrypt"
#time java -cp `pwd`/bin mp3.Main ../small illinois 2 blah small_output2 encrypt
time java -cp `pwd`/bin mp3.CreateBlindStore small_output2 illinois

1 change: 1 addition & 0 deletions compile_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
#javac -d bin src/mp3/*.java
#javac -d bin -cp `pwd`/bin src/BlindStorageServer.java
mkdir bin
#javac -d bin -cp `pwd`/bin/javautil-3.1.1.jar src/mp3/*.java
javac -d bin src/mp3/*.java
javac -d bin -cp `pwd`/bin src/BlindStorageServer.java
2 changes: 1 addition & 1 deletion src/mp3/FileHash.java
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public static void addFiletoList(String dirPath) {
// "D:\\temp_CS463\\stopwords.txt"), dirLoc + "keywords");
indexer.mapToIndexFiles(indexer.indexMessages(null, dirList,
fileList, "./seperators.txt",
"./stopwords.txt"), dirLoc + "keywords");
"./stopwords.txt"), dirLoc + "/" + "keywords");
} catch (IOException e) { // TODO Auto-generated catch block
e.printStackTrace();
}
Expand Down
4 changes: 2 additions & 2 deletions src/mp3/Indexer.java
Original file line number Diff line number Diff line change
Expand Up @@ -344,11 +344,11 @@ public static Boolean mapToIndexFiles(Map<String, Set<String>> map, String index

for (String keyword : map.keySet()) {
String keywordHash = getHash(keyword);
File file = new File(indexPath + "\\" + keywordHash);
File file = new File(indexPath + "/" + keywordHash);
if (file.exists()) {
System.err.println("There is a keyword collision!");
}
fileWrite = new FileWriter(indexPath + "\\" + keywordHash, true); //+ encryption.hash(keyword));
fileWrite = new FileWriter(indexPath + "/" + keywordHash, true); //+ encryption.hash(keyword));


toWrite = keyword + KEYWORD_DELIM;
Expand Down

0 comments on commit 19b9270

Please sign in to comment.