Skip to content
This repository has been archived by the owner on Feb 8, 2019. It is now read-only.

Submodule Refactor Phase 1 #119

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DarinJ
Copy link

@DarinJ DarinJ commented Nov 30, 2016

This is going to have to be broken into chunks.

  1. Pulled out mapreduce, storm and spark (sparkstreaming in spark) responders.
  2. Added methods to ResponderPlugin interface to setup a responder for a test and return the decrypted response.
  3. Refactored org.apache.pirk.test.DistributedTestSuite, org.apache.pirk.test.Utils.BaseTests to handle submodules. This will likely need more work as the unit tests in pirk-core depend on some of the code in org.apache.pirk.test.Utils.BaseTests as a goal is to pull the distributed tests into a submodule.

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.

-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()
Copy link
Member

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
Copy link
Member

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();
Copy link
Member

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
Copy link
Member

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<>();
Copy link
Member

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants