{"action":"created","comment":{"url":"https://api.github.com/repos/Netflix/ndbench/pulls/comments/199963210","pull_request_review_id":134185026,"id":199963210,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5OTk2MzIxMA==","diff_hunk":"@@ -7,111 +7,136 @@\n import com.datastax.driver.core.ConsistencyLevel;\n import com.datastax.driver.core.PreparedStatement;\n import com.datastax.driver.core.Session;\n-import com.google.inject.Inject;\n-import com.netflix.archaius.api.PropertyFactory;\n import com.netflix.ndbench.api.plugin.DataGenerator;\n import com.netflix.ndbench.api.plugin.NdBenchClient;\n-import com.netflix.ndbench.api.plugin.common.NdBenchConstants;\n+import com.netflix.ndbench.plugin.configs.CassandraConfigurationBase;\n import org.slf4j.Logger;\n import org.slf4j.LoggerFactory;\n \n+import java.util.List;\n+\n /**\n  * @author vchella\n+ * @author Alexander Patrikalakis\n  */\n-public abstract class CJavaDriverBasePlugin implements NdBenchClient {\n+public abstract class CJavaDriverBasePlugin<C extends CassandraConfigurationBase> implements NdBenchClient {\n \n     private static final Logger logger = LoggerFactory.getLogger(CJavaDriverBasePlugin.class);\n+    private static final String DEFAULT_CONSISTENCY_LEVEL = ConsistencyLevel.LOCAL_ONE.toString();\n \n     protected static final String ResultOK = \"Ok\";\n     protected static final String ResutlFailed = \"Failed\";\n     protected static final String CacheMiss = null;\n \n-    protected DataGenerator dataGenerator;\n-    protected PropertyFactory propertyFactory;\n+    protected final CassJavaDriverManager cassJavaDriverManager;\n+    protected final C config;\n \n     // settings\n-    protected static String ClusterName, KeyspaceName, TableName, ClusterContactPoint;\n-    protected static String username, password;\n-    int connections, port;\n-\n-    protected ConsistencyLevel WriteConsistencyLevel=ConsistencyLevel.LOCAL_ONE, ReadConsistencyLevel=ConsistencyLevel.LOCAL_ONE;\n-\n-\n-    protected final CassJavaDriverManager cassJavaDriverManager;\n-    protected Cluster cluster;\n-    protected Session session;\n-    protected PreparedStatement readPstmt;\n-    protected PreparedStatement writePstmt;\n-    Long MaxColCount;\n-\n-    @Inject\n-    public CJavaDriverBasePlugin(PropertyFactory propertyFactory, CassJavaDriverManager javaDriverManager) {\n-        this.propertyFactory = propertyFactory;\n+    protected volatile DataGenerator dataGenerator;\n+    protected volatile String ClusterName;\n+    protected volatile String KeyspaceName;\n+    protected volatile String TableName;\n+    protected volatile String ClusterContactPoint;\n+    protected volatile String username;\n+    protected volatile String password;\n+    protected volatile int connections;\n+    protected volatile int port;\n+    protected volatile ConsistencyLevel WriteConsistencyLevel = ConsistencyLevel.LOCAL_ONE;\n+    protected volatile ConsistencyLevel ReadConsistencyLevel = ConsistencyLevel.LOCAL_ONE;\n+    protected volatile Long MaxColCount;\n+\n+    protected volatile Cluster cluster;\n+    protected volatile Session session;\n+    protected volatile PreparedStatement readPstmt;\n+    protected volatile PreparedStatement writePstmt;\n+\n+\n+    /**\n+     * Creates an instance of the abstract CJavaDriverBasePlugin class. Subclasses calling this method should use\n+     * Guice injection to provide the arguments.\n+     * @param javaDriverManager\n+     * @param config\n+     */\n+    protected CJavaDriverBasePlugin(CassJavaDriverManager javaDriverManager, C config) {\n         this.cassJavaDriverManager = javaDriverManager;\n+        this.config = config;\n     }\n \n     @Override\n     public void init(DataGenerator dataGenerator) throws Exception {\n         this.dataGenerator = dataGenerator;\n-\n-        ClusterName = propertyFactory.getProperty(NdBenchConstants.PROP_NAMESPACE +\"cass.cluster\").asString(\"localhost\").get();\n-        ClusterContactPoint = propertyFactory.getProperty(NdBenchConstants.PROP_NAMESPACE +\"cass.host\").asString(\"127.0.0.1\").get();\n-        KeyspaceName = propertyFactory.getProperty(NdBenchConstants.PROP_NAMESPACE +\"cass.keyspace\").asString(\"dev1\").get();\n-        TableName =propertyFactory.getProperty(NdBenchConstants.PROP_NAMESPACE +\"cass.cfname\").asString(\"emp\").get();\n-        port = propertyFactory.getProperty(NdBenchConstants.PROP_NAMESPACE + \"cass.host.port\").asInteger(9042).get();\n-        connections = propertyFactory.getProperty(NdBenchConstants.PROP_NAMESPACE +\"cass.connections\").asInteger(2).get();\n-\n-        username = propertyFactory.getProperty(NdBenchConstants.PROP_NAMESPACE +\"cass.username\").asString(null).get();\n-        password = propertyFactory.getProperty(NdBenchConstants.PROP_NAMESPACE +\"cass.password\").asString(null).get();\n-\n-        ReadConsistencyLevel = ConsistencyLevel.valueOf(propertyFactory.getProperty(NdBenchConstants.PROP_NAMESPACE +\"cass.readConsistencyLevel\").asString(ConsistencyLevel.LOCAL_ONE.toString()).get());","path":"ndbench-cass-plugins/src/main/java/com/netflix/ndbench/plugin/cass/CJavaDriverBasePlugin.java","position":96,"original_position":96,"commit_id":"74e2f6f9e8bcb7538908794cc3dc66a203c518d4","original_commit_id":"b440caa8f64583d567a7d9f016f6c0214482bdd1","user":{"login":"amcp","id":1066771,"node_id":"MDQ6VXNlcjEwNjY3NzE=","avatar_url":"https://avatars0.githubusercontent.com/u/1066771?v=4","gravatar_id":"","url":"https://api.github.com/users/amcp","html_url":"https://github.com/amcp","followers_url":"https://api.github.com/users/amcp/followers","following_url":"https://api.github.com/users/amcp/following{/other_user}","gists_url":"https://api.github.com/users/amcp/gists{/gist_id}","starred_url":"https://api.github.com/users/amcp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amcp/subscriptions","organizations_url":"https://api.github.com/users/amcp/orgs","repos_url":"https://api.github.com/users/amcp/repos","events_url":"https://api.github.com/users/amcp/events{/privacy}","received_events_url":"https://api.github.com/users/amcp/received_events","type":"User","site_admin":false},"body":"same answer is above, different Enum classes and different default values are used for Read/Write ConsistentcyLevel and MaxColCount. I will add a comment here and in implementing classes to indicate what is different.","created_at":"2018-07-03T22:06:04Z","updated_at":"2018-07-03T22:06:04Z","html_url":"https://github.com/Netflix/ndbench/pull/186#discussion_r199963210","pull_request_url":"https://api.github.com/repos/Netflix/ndbench/pulls/186","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Netflix/ndbench/pulls/comments/199963210"},"html":{"href":"https://github.com/Netflix/ndbench/pull/186#discussion_r199963210"},"pull_request":{"href":"https://api.github.com/repos/Netflix/ndbench/pulls/186"}},"in_reply_to_id":199283201},"pull_request":{"url":"https://api.github.com/repos/Netflix/ndbench/pulls/186","id":182685236,"node_id":"MDExOlB1bGxSZXF1ZXN0MTgyNjg1MjM2","html_url":"https://github.com/Netflix/ndbench/pull/186","diff_url":"https://github.com/Netflix/ndbench/pull/186.diff","patch_url":"https://github.com/Netflix/ndbench/pull/186.patch","issue_url":"https://api.github.com/repos/Netflix/ndbench/issues/186","number":186,"state":"open","locked":false,"title":"Fix all PMD warnings throughout all modules","user":{"login":"amcp","id":1066771,"node_id":"MDQ6VXNlcjEwNjY3NzE=","avatar_url":"https://avatars0.githubusercontent.com/u/1066771?v=4","gravatar_id":"","url":"https://api.github.com/users/amcp","html_url":"https://github.com/amcp","followers_url":"https://api.github.com/users/amcp/followers","following_url":"https://api.github.com/users/amcp/following{/other_user}","gists_url":"https://api.github.com/users/amcp/gists{/gist_id}","starred_url":"https://api.github.com/users/amcp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amcp/subscriptions","organizations_url":"https://api.github.com/users/amcp/orgs","repos_url":"https://api.github.com/users/amcp/repos","events_url":"https://api.github.com/users/amcp/events{/privacy}","received_events_url":"https://api.github.com/users/amcp/received_events","type":"User","site_admin":false},"body":"Fixes #184","created_at":"2018-04-19T07:13:41Z","updated_at":"2018-07-03T22:06:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aefbb54ef98bcd3c1e1cce5465cdf0e7b0d1e641","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Netflix/ndbench/pulls/186/commits","review_comments_url":"https://api.github.com/repos/Netflix/ndbench/pulls/186/comments","review_comment_url":"https://api.github.com/repos/Netflix/ndbench/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Netflix/ndbench/issues/186/comments","statuses_url":"https://api.github.com/repos/Netflix/ndbench/statuses/74e2f6f9e8bcb7538908794cc3dc66a203c518d4","head":{"label":"amcp:pmd","ref":"pmd","sha":"74e2f6f9e8bcb7538908794cc3dc66a203c518d4","user":{"login":"amcp","id":1066771,"node_id":"MDQ6VXNlcjEwNjY3NzE=","avatar_url":"https://avatars0.githubusercontent.com/u/1066771?v=4","gravatar_id":"","url":"https://api.github.com/users/amcp","html_url":"https://github.com/amcp","followers_url":"https://api.github.com/users/amcp/followers","following_url":"https://api.github.com/users/amcp/following{/other_user}","gists_url":"https://api.github.com/users/amcp/gists{/gist_id}","starred_url":"https://api.github.com/users/amcp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amcp/subscriptions","organizations_url":"https://api.github.com/users/amcp/orgs","repos_url":"https://api.github.com/users/amcp/repos","events_url":"https://api.github.com/users/amcp/events{/privacy}","received_events_url":"https://api.github.com/users/amcp/received_events","type":"User","site_admin":false},"repo":{"id":128098172,"node_id":"MDEwOlJlcG9zaXRvcnkxMjgwOTgxNzI=","name":"ndbench","full_name":"amcp/ndbench","owner":{"login":"amcp","id":1066771,"node_id":"MDQ6VXNlcjEwNjY3NzE=","avatar_url":"https://avatars0.githubusercontent.com/u/1066771?v=4","gravatar_id":"","url":"https://api.github.com/users/amcp","html_url":"https://github.com/amcp","followers_url":"https://api.github.com/users/amcp/followers","following_url":"https://api.github.com/users/amcp/following{/other_user}","gists_url":"https://api.github.com/users/amcp/gists{/gist_id}","starred_url":"https://api.github.com/users/amcp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amcp/subscriptions","organizations_url":"https://api.github.com/users/amcp/orgs","repos_url":"https://api.github.com/users/amcp/repos","events_url":"https://api.github.com/users/amcp/events{/privacy}","received_events_url":"https://api.github.com/users/amcp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/amcp/ndbench","description":"Netflix Data Store Benchmark","fork":true,"url":"https://api.github.com/repos/amcp/ndbench","forks_url":"https://api.github.com/repos/amcp/ndbench/forks","keys_url":"https://api.github.com/repos/amcp/ndbench/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amcp/ndbench/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amcp/ndbench/teams","hooks_url":"https://api.github.com/repos/amcp/ndbench/hooks","issue_events_url":"https://api.github.com/repos/amcp/ndbench/issues/events{/number}","events_url":"https://api.github.com/repos/amcp/ndbench/events","assignees_url":"https://api.github.com/repos/amcp/ndbench/assignees{/user}","branches_url":"https://api.github.com/repos/amcp/ndbench/branches{/branch}","tags_url":"https://api.github.com/repos/amcp/ndbench/tags","blobs_url":"https://api.github.com/repos/amcp/ndbench/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amcp/ndbench/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amcp/ndbench/git/refs{/sha}","trees_url":"https://api.github.com/repos/amcp/ndbench/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amcp/ndbench/statuses/{sha}","languages_url":"https://api.github.com/repos/amcp/ndbench/languages","stargazers_url":"https://api.github.com/repos/amcp/ndbench/stargazers","contributors_url":"https://api.github.com/repos/amcp/ndbench/contributors","subscribers_url":"https://api.github.com/repos/amcp/ndbench/subscribers","subscription_url":"https://api.github.com/repos/amcp/ndbench/subscription","commits_url":"https://api.github.com/repos/amcp/ndbench/commits{/sha}","git_commits_url":"https://api.github.com/repos/amcp/ndbench/git/commits{/sha}","comments_url":"https://api.github.com/repos/amcp/ndbench/comments{/number}","issue_comment_url":"https://api.github.com/repos/amcp/ndbench/issues/comments{/number}","contents_url":"https://api.github.com/repos/amcp/ndbench/contents/{+path}","compare_url":"https://api.github.com/repos/amcp/ndbench/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amcp/ndbench/merges","archive_url":"https://api.github.com/repos/amcp/ndbench/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amcp/ndbench/downloads","issues_url":"https://api.github.com/repos/amcp/ndbench/issues{/number}","pulls_url":"https://api.github.com/repos/amcp/ndbench/pulls{/number}","milestones_url":"https://api.github.com/repos/amcp/ndbench/milestones{/number}","notifications_url":"https://api.github.com/repos/amcp/ndbench/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amcp/ndbench/labels{/name}","releases_url":"https://api.github.com/repos/amcp/ndbench/releases{/id}","deployments_url":"https://api.github.com/repos/amcp/ndbench/deployments","created_at":"2018-04-04T17:40:09Z","updated_at":"2018-04-24T23:24:06Z","pushed_at":"2018-07-03T21:52:46Z","git_url":"git://github.com/amcp/ndbench.git","ssh_url":"git@github.com:amcp/ndbench.git","clone_url":"https://github.com/amcp/ndbench.git","svn_url":"https://github.com/amcp/ndbench","homepage":"","size":1409,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Netflix:master","ref":"master","sha":"7fb10d55604bf14dc0d9dbf32b0111e9b59eba61","user":{"login":"Netflix","id":913567,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkxMzU2Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/913567?v=4","gravatar_id":"","url":"https://api.github.com/users/Netflix","html_url":"https://github.com/Netflix","followers_url":"https://api.github.com/users/Netflix/followers","following_url":"https://api.github.com/users/Netflix/following{/other_user}","gists_url":"https://api.github.com/users/Netflix/gists{/gist_id}","starred_url":"https://api.github.com/users/Netflix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Netflix/subscriptions","organizations_url":"https://api.github.com/users/Netflix/orgs","repos_url":"https://api.github.com/users/Netflix/repos","events_url":"https://api.github.com/users/Netflix/events{/privacy}","received_events_url":"https://api.github.com/users/Netflix/received_events","type":"Organization","site_admin":false},"repo":{"id":67083772,"node_id":"MDEwOlJlcG9zaXRvcnk2NzA4Mzc3Mg==","name":"ndbench","full_name":"Netflix/ndbench","owner":{"login":"Netflix","id":913567,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkxMzU2Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/913567?v=4","gravatar_id":"","url":"https://api.github.com/users/Netflix","html_url":"https://github.com/Netflix","followers_url":"https://api.github.com/users/Netflix/followers","following_url":"https://api.github.com/users/Netflix/following{/other_user}","gists_url":"https://api.github.com/users/Netflix/gists{/gist_id}","starred_url":"https://api.github.com/users/Netflix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Netflix/subscriptions","organizations_url":"https://api.github.com/users/Netflix/orgs","repos_url":"https://api.github.com/users/Netflix/repos","events_url":"https://api.github.com/users/Netflix/events{/privacy}","received_events_url":"https://api.github.com/users/Netflix/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Netflix/ndbench","description":"Netflix Data Store Benchmark","fork":false,"url":"https://api.github.com/repos/Netflix/ndbench","forks_url":"https://api.github.com/repos/Netflix/ndbench/forks","keys_url":"https://api.github.com/repos/Netflix/ndbench/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Netflix/ndbench/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Netflix/ndbench/teams","hooks_url":"https://api.github.com/repos/Netflix/ndbench/hooks","issue_events_url":"https://api.github.com/repos/Netflix/ndbench/issues/events{/number}","events_url":"https://api.github.com/repos/Netflix/ndbench/events","assignees_url":"https://api.github.com/repos/Netflix/ndbench/assignees{/user}","branches_url":"https://api.github.com/repos/Netflix/ndbench/branches{/branch}","tags_url":"https://api.github.com/repos/Netflix/ndbench/tags","blobs_url":"https://api.github.com/repos/Netflix/ndbench/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Netflix/ndbench/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Netflix/ndbench/git/refs{/sha}","trees_url":"https://api.github.com/repos/Netflix/ndbench/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Netflix/ndbench/statuses/{sha}","languages_url":"https://api.github.com/repos/Netflix/ndbench/languages","stargazers_url":"https://api.github.com/repos/Netflix/ndbench/stargazers","contributors_url":"https://api.github.com/repos/Netflix/ndbench/contributors","subscribers_url":"https://api.github.com/repos/Netflix/ndbench/subscribers","subscription_url":"https://api.github.com/repos/Netflix/ndbench/subscription","commits_url":"https://api.github.com/repos/Netflix/ndbench/commits{/sha}","git_commits_url":"https://api.github.com/repos/Netflix/ndbench/git/commits{/sha}","comments_url":"https://api.github.com/repos/Netflix/ndbench/comments{/number}","issue_comment_url":"https://api.github.com/repos/Netflix/ndbench/issues/comments{/number}","contents_url":"https://api.github.com/repos/Netflix/ndbench/contents/{+path}","compare_url":"https://api.github.com/repos/Netflix/ndbench/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Netflix/ndbench/merges","archive_url":"https://api.github.com/repos/Netflix/ndbench/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Netflix/ndbench/downloads","issues_url":"https://api.github.com/repos/Netflix/ndbench/issues{/number}","pulls_url":"https://api.github.com/repos/Netflix/ndbench/pulls{/number}","milestones_url":"https://api.github.com/repos/Netflix/ndbench/milestones{/number}","notifications_url":"https://api.github.com/repos/Netflix/ndbench/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Netflix/ndbench/labels{/name}","releases_url":"https://api.github.com/repos/Netflix/ndbench/releases{/id}","deployments_url":"https://api.github.com/repos/Netflix/ndbench/deployments","created_at":"2016-09-01T00:28:02Z","updated_at":"2018-06-20T13:52:30Z","pushed_at":"2018-07-03T21:52:47Z","git_url":"git://github.com/Netflix/ndbench.git","ssh_url":"git@github.com:Netflix/ndbench.git","clone_url":"https://github.com/Netflix/ndbench.git","svn_url":"https://github.com/Netflix/ndbench","homepage":"","size":1369,"stargazers_count":231,"watchers_count":231,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":66,"mirror_url":null,"archived":false,"open_issues_count":23,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":66,"open_issues":23,"watchers":231,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Netflix/ndbench/pulls/186"},"html":{"href":"https://github.com/Netflix/ndbench/pull/186"},"issue":{"href":"https://api.github.com/repos/Netflix/ndbench/issues/186"},"comments":{"href":"https://api.github.com/repos/Netflix/ndbench/issues/186/comments"},"review_comments":{"href":"https://api.github.com/repos/Netflix/ndbench/pulls/186/comments"},"review_comment":{"href":"https://api.github.com/repos/Netflix/ndbench/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Netflix/ndbench/pulls/186/commits"},"statuses":{"href":"https://api.github.com/repos/Netflix/ndbench/statuses/74e2f6f9e8bcb7538908794cc3dc66a203c518d4"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"amcp"}}