-
Notifications
You must be signed in to change notification settings - Fork 26
Submodule Refactor Phase 1 #119
base: master
Are you sure you want to change the base?
Conversation
-1. Pulled out mapreduce, storm and spark responders, -2. Refactored `org.apache.pirk.test.DistributedTestSuite` to handle submodules. Todo Pull out Querier, Responder Modules as mentioned on the mailing list. This will be done separately as it involved decoupling several components.
* if you implement runDistributed test. | ||
* @return | ||
*/ | ||
default boolean hasDistributedTest() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need of keyword default - specify nothing
* @return The results of the QueryResponse | ||
* @throws PIRException | ||
*/ | ||
default public List<QueryResponseJSON> runDistributedTest(ArrayList<String> args, FileSystem fs, Querier querier, int numThreads) throws PIRException |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'default public' - ??
String jsonBaseInputFormatString = jFormat.getClass().getName(); | ||
SystemConfiguration.setProperty("pir.baseInputFormat", jsonBaseInputFormatString); | ||
|
||
ArrayList<String> args = constructBasicArgs(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use List on LHS
@@ -59,28 +71,30 @@ | |||
public static final int hashBitSize = 12; | |||
public static final int paillierBitSize = 384; | |||
public static final int certainty = 128; | |||
public static final String STANDALONE = "standalone"; | |||
|
|||
public static void testDNSHostnameQuery(ArrayList<JSONObject> dataElements, int numThreads, boolean testFalsePositive) throws Exception |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change signature to pass in List<> as opposed to ArrayList<> ?
@@ -195,14 +209,130 @@ public static void checkDNSHostnameQueryResults(List<QueryResponseJSON> results, | |||
} | |||
} | |||
|
|||
private static ArrayList<String> constructBasicArgs() | |||
{ | |||
ArrayList<String> args = new ArrayList<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change method signature to return List<> and LHS should be List
This is going to have to be broken into chunks.
Tested on a local k8s cluster and AWS. With the caveat the test jar to use is now pirk-mapreduce-0.2.0.jar or pirk-spark-0.2.0.jar.
There's several additional steps that need to happen, but I think that a lot must first be address with configuration and commandline first so I'd like to get this in and iterate the two in parallel.