{"action":"created","comment":{"url":"https://api.github.com/repos/apache/phoenix/pulls/comments/26238762","id":26238762,"diff_hunk":"@@ -0,0 +1,204 @@\n+/*\n+ * Licensed to the Apache Software Foundation (ASF) under one\n+ *   or more contributor license agreements.  See the NOTICE file\n+ *   distributed with this work for additional information\n+ *   regarding copyright ownership.  The ASF licenses this file\n+ *   to you under the Apache License, Version 2.0 (the\n+ *   \"License\"); you may not use this file except in compliance\n+ *   with the License.  You may obtain a copy of the License at\n+ *\n+ *   http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ *   Unless required by applicable law or agreed to in writing, software\n+ *   distributed under the License is distributed on an \"AS IS\" BASIS,\n+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ *   See the License for the specific language governing permissions and\n+ *   limitations under the License.\n+ */\n+\n+package org.apache.phoenix.pherf;\n+\n+import org.apache.phoenix.pherf.configuration.XMLConfigParser;\n+import org.apache.phoenix.pherf.schema.SchemaReader;\n+import org.apache.phoenix.pherf.util.PhoenixUtil;\n+import org.apache.phoenix.pherf.util.ResourceList;\n+import org.apache.phoenix.pherf.workload.WorkloadExecutor;\n+\n+import org.apache.commons.cli.*;\n+import org.slf4j.Logger;\n+import org.slf4j.LoggerFactory;\n+\n+import java.nio.file.Path;\n+import java.util.Collection;\n+import java.util.Properties;\n+\n+public class Pherf {\n+    private static final Logger logger = LoggerFactory.getLogger(Pherf.class);\n+    private static final Options options = new Options();\n+\n+    static {\n+//        options.addOption(\"r\", \"release\", true, \"Required option. Release that you want to test. 190, 192, ...\");\n+        options.addOption(\"m\", \"monitor\", false, \"Launch the stats profilers\");\n+        options.addOption(\"monitorFrequency\", true, \"Override for frequency in Ms for which monitor should log stats. \" +\n+                \"\\n See pherf.default.monitorFrequency in pherf.properties\");\n+        options.addOption(\"d\", \"debug\", false, \"Put tool in debug mode\");\n+        options.addOption(\"z\", \"zookeeper\", true, \"HBase Zookeeper address for connection. Default: localhost\");\n+        options.addOption(\"l\", \"load\", false, \"Loads data according to specified configuration values.\");\n+        options.addOption(\"scenarioFile\", true, \"Regex or file name for the Test Scenario configuration .xml file to use.\");\n+        options.addOption(\"drop\", true, \"Regex drop all tables with schema name as PHERF. \" +\n+                \"\\nExample drop Event tables: -drop .*(EVENT).* Drop all: -drop .* or -drop all\");\n+        options.addOption(\"schemaFile\", true, \"Regex or file name for the Test phoenix table schema .sql to use.\");\n+        options.addOption(\"rowCountOverride\", true, \"Row count override to use instead of one specified in scenario.\");\n+        options.addOption(\"hint\", true, \"Executes all queries with specified hint. Example SMALL\");\n+        options.addOption(\"diff\", false, \"Run pherf in verification mode and diff with exported results\");\n+        options.addOption(\"export\", false, \"Exports query results to CSV files in \" + PherfConstants.EXPORT_DIR + \" directory\");\n+        options.addOption(\"listFiles\", false, \"List available resource files\");\n+        options.addOption(\"writerThreadSize\", true, \"Override the default number of writer threads. \" +\n+                \"See pherf.default.dataloader.threadpool in Pherf.properties.\");\n+        options.addOption(\"q\", \"query\", false, \"Executes multi-threaded query sets\");\n+        options.addOption(\"h\", \"help\", false, \"Get help on using this utility.\");\n+    }\n+\n+//    private final String release;","path":"phoenix-pherf/src/main/java/org/apache/phoenix/pherf/Pherf.java","position":62,"original_position":62,"commit_id":"51c9b053f8c15fae55c2baaef61bdce31794a184","original_commit_id":"51c9b053f8c15fae55c2baaef61bdce31794a184","user":{"login":"samarthjain","id":1642180,"avatar_url":"https://avatars.githubusercontent.com/u/1642180?v=3","gravatar_id":"","url":"https://api.github.com/users/samarthjain","html_url":"https://github.com/samarthjain","followers_url":"https://api.github.com/users/samarthjain/followers","following_url":"https://api.github.com/users/samarthjain/following{/other_user}","gists_url":"https://api.github.com/users/samarthjain/gists{/gist_id}","starred_url":"https://api.github.com/users/samarthjain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samarthjain/subscriptions","organizations_url":"https://api.github.com/users/samarthjain/orgs","repos_url":"https://api.github.com/users/samarthjain/repos","events_url":"https://api.github.com/users/samarthjain/events{/privacy}","received_events_url":"https://api.github.com/users/samarthjain/received_events","type":"User","site_admin":false},"body":"same as above.","created_at":"2015-03-11T18:06:30Z","updated_at":"2015-03-11T18:06:30Z","html_url":"https://github.com/apache/phoenix/pull/41#discussion_r26238762","pull_request_url":"https://api.github.com/repos/apache/phoenix/pulls/41","_links":{"self":{"href":"https://api.github.com/repos/apache/phoenix/pulls/comments/26238762"},"html":{"href":"https://github.com/apache/phoenix/pull/41#discussion_r26238762"},"pull_request":{"href":"https://api.github.com/repos/apache/phoenix/pulls/41"}}},"pull_request":{"url":"https://api.github.com/repos/apache/phoenix/pulls/41","id":30809872,"html_url":"https://github.com/apache/phoenix/pull/41","diff_url":"https://github.com/apache/phoenix/pull/41.diff","patch_url":"https://github.com/apache/phoenix/pull/41.patch","issue_url":"https://api.github.com/repos/apache/phoenix/issues/41","number":41,"state":"open","locked":false,"title":"working additions of pherf to phoenix as a project module","user":{"login":"codymarcel","id":1214567,"avatar_url":"https://avatars.githubusercontent.com/u/1214567?v=3","gravatar_id":"","url":"https://api.github.com/users/codymarcel","html_url":"https://github.com/codymarcel","followers_url":"https://api.github.com/users/codymarcel/followers","following_url":"https://api.github.com/users/codymarcel/following{/other_user}","gists_url":"https://api.github.com/users/codymarcel/gists{/gist_id}","starred_url":"https://api.github.com/users/codymarcel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codymarcel/subscriptions","organizations_url":"https://api.github.com/users/codymarcel/orgs","repos_url":"https://api.github.com/users/codymarcel/repos","events_url":"https://api.github.com/users/codymarcel/events{/privacy}","received_events_url":"https://api.github.com/users/codymarcel/received_events","type":"User","site_admin":false},"body":"\"mvn clean package\" builds everything correctly.\r\nAll tests pass.","created_at":"2015-03-09T23:23:38Z","updated_at":"2015-03-11T18:06:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"390cd452fc4dfc5bf0689a403909332f257778db","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/phoenix/pulls/41/commits","review_comments_url":"https://api.github.com/repos/apache/phoenix/pulls/41/comments","review_comment_url":"https://api.github.com/repos/apache/phoenix/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/phoenix/issues/41/comments","statuses_url":"https://api.github.com/repos/apache/phoenix/statuses/51c9b053f8c15fae55c2baaef61bdce31794a184","head":{"label":"codymarcel:pherf","ref":"pherf","sha":"51c9b053f8c15fae55c2baaef61bdce31794a184","user":{"login":"codymarcel","id":1214567,"avatar_url":"https://avatars.githubusercontent.com/u/1214567?v=3","gravatar_id":"","url":"https://api.github.com/users/codymarcel","html_url":"https://github.com/codymarcel","followers_url":"https://api.github.com/users/codymarcel/followers","following_url":"https://api.github.com/users/codymarcel/following{/other_user}","gists_url":"https://api.github.com/users/codymarcel/gists{/gist_id}","starred_url":"https://api.github.com/users/codymarcel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codymarcel/subscriptions","organizations_url":"https://api.github.com/users/codymarcel/orgs","repos_url":"https://api.github.com/users/codymarcel/repos","events_url":"https://api.github.com/users/codymarcel/events{/privacy}","received_events_url":"https://api.github.com/users/codymarcel/received_events","type":"User","site_admin":false},"repo":{"id":31568129,"name":"phoenix","full_name":"codymarcel/phoenix","owner":{"login":"codymarcel","id":1214567,"avatar_url":"https://avatars.githubusercontent.com/u/1214567?v=3","gravatar_id":"","url":"https://api.github.com/users/codymarcel","html_url":"https://github.com/codymarcel","followers_url":"https://api.github.com/users/codymarcel/followers","following_url":"https://api.github.com/users/codymarcel/following{/other_user}","gists_url":"https://api.github.com/users/codymarcel/gists{/gist_id}","starred_url":"https://api.github.com/users/codymarcel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codymarcel/subscriptions","organizations_url":"https://api.github.com/users/codymarcel/orgs","repos_url":"https://api.github.com/users/codymarcel/repos","events_url":"https://api.github.com/users/codymarcel/events{/privacy}","received_events_url":"https://api.github.com/users/codymarcel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/codymarcel/phoenix","description":"Mirror of Apache Phoenix","fork":true,"url":"https://api.github.com/repos/codymarcel/phoenix","forks_url":"https://api.github.com/repos/codymarcel/phoenix/forks","keys_url":"https://api.github.com/repos/codymarcel/phoenix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codymarcel/phoenix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codymarcel/phoenix/teams","hooks_url":"https://api.github.com/repos/codymarcel/phoenix/hooks","issue_events_url":"https://api.github.com/repos/codymarcel/phoenix/issues/events{/number}","events_url":"https://api.github.com/repos/codymarcel/phoenix/events","assignees_url":"https://api.github.com/repos/codymarcel/phoenix/assignees{/user}","branches_url":"https://api.github.com/repos/codymarcel/phoenix/branches{/branch}","tags_url":"https://api.github.com/repos/codymarcel/phoenix/tags","blobs_url":"https://api.github.com/repos/codymarcel/phoenix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codymarcel/phoenix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codymarcel/phoenix/git/refs{/sha}","trees_url":"https://api.github.com/repos/codymarcel/phoenix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codymarcel/phoenix/statuses/{sha}","languages_url":"https://api.github.com/repos/codymarcel/phoenix/languages","stargazers_url":"https://api.github.com/repos/codymarcel/phoenix/stargazers","contributors_url":"https://api.github.com/repos/codymarcel/phoenix/contributors","subscribers_url":"https://api.github.com/repos/codymarcel/phoenix/subscribers","subscription_url":"https://api.github.com/repos/codymarcel/phoenix/subscription","commits_url":"https://api.github.com/repos/codymarcel/phoenix/commits{/sha}","git_commits_url":"https://api.github.com/repos/codymarcel/phoenix/git/commits{/sha}","comments_url":"https://api.github.com/repos/codymarcel/phoenix/comments{/number}","issue_comment_url":"https://api.github.com/repos/codymarcel/phoenix/issues/comments{/number}","contents_url":"https://api.github.com/repos/codymarcel/phoenix/contents/{+path}","compare_url":"https://api.github.com/repos/codymarcel/phoenix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codymarcel/phoenix/merges","archive_url":"https://api.github.com/repos/codymarcel/phoenix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codymarcel/phoenix/downloads","issues_url":"https://api.github.com/repos/codymarcel/phoenix/issues{/number}","pulls_url":"https://api.github.com/repos/codymarcel/phoenix/pulls{/number}","milestones_url":"https://api.github.com/repos/codymarcel/phoenix/milestones{/number}","notifications_url":"https://api.github.com/repos/codymarcel/phoenix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codymarcel/phoenix/labels{/name}","releases_url":"https://api.github.com/repos/codymarcel/phoenix/releases{/id}","created_at":"2015-03-02T22:59:56Z","updated_at":"2015-03-02T22:59:59Z","pushed_at":"2015-03-11T17:48:45Z","git_url":"git://github.com/codymarcel/phoenix.git","ssh_url":"git@github.com:codymarcel/phoenix.git","clone_url":"https://github.com/codymarcel/phoenix.git","svn_url":"https://github.com/codymarcel/phoenix","homepage":null,"size":12812,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"44a7064bb22c4a9c3047340174f5ed646c4bf126","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":20473418,"name":"phoenix","full_name":"apache/phoenix","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/phoenix","description":"Mirror of Apache Phoenix","fork":false,"url":"https://api.github.com/repos/apache/phoenix","forks_url":"https://api.github.com/repos/apache/phoenix/forks","keys_url":"https://api.github.com/repos/apache/phoenix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/phoenix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/phoenix/teams","hooks_url":"https://api.github.com/repos/apache/phoenix/hooks","issue_events_url":"https://api.github.com/repos/apache/phoenix/issues/events{/number}","events_url":"https://api.github.com/repos/apache/phoenix/events","assignees_url":"https://api.github.com/repos/apache/phoenix/assignees{/user}","branches_url":"https://api.github.com/repos/apache/phoenix/branches{/branch}","tags_url":"https://api.github.com/repos/apache/phoenix/tags","blobs_url":"https://api.github.com/repos/apache/phoenix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/phoenix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/phoenix/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/phoenix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/phoenix/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/phoenix/languages","stargazers_url":"https://api.github.com/repos/apache/phoenix/stargazers","contributors_url":"https://api.github.com/repos/apache/phoenix/contributors","subscribers_url":"https://api.github.com/repos/apache/phoenix/subscribers","subscription_url":"https://api.github.com/repos/apache/phoenix/subscription","commits_url":"https://api.github.com/repos/apache/phoenix/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/phoenix/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/phoenix/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/phoenix/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/phoenix/contents/{+path}","compare_url":"https://api.github.com/repos/apache/phoenix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/phoenix/merges","archive_url":"https://api.github.com/repos/apache/phoenix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/phoenix/downloads","issues_url":"https://api.github.com/repos/apache/phoenix/issues{/number}","pulls_url":"https://api.github.com/repos/apache/phoenix/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/phoenix/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/phoenix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/phoenix/labels{/name}","releases_url":"https://api.github.com/repos/apache/phoenix/releases{/id}","created_at":"2014-06-04T07:00:08Z","updated_at":"2015-03-10T15:59:04Z","pushed_at":"2015-03-10T23:34:19Z","git_url":"git://github.com/apache/phoenix.git","ssh_url":"git@github.com:apache/phoenix.git","clone_url":"https://github.com/apache/phoenix.git","svn_url":"https://github.com/apache/phoenix","homepage":null,"size":23849,"stargazers_count":45,"watchers_count":45,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":80,"mirror_url":"git://git.apache.org/phoenix.git","open_issues_count":29,"forks":80,"open_issues":29,"watchers":45,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/phoenix/pulls/41"},"html":{"href":"https://github.com/apache/phoenix/pull/41"},"issue":{"href":"https://api.github.com/repos/apache/phoenix/issues/41"},"comments":{"href":"https://api.github.com/repos/apache/phoenix/issues/41/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/phoenix/pulls/41/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/phoenix/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/phoenix/pulls/41/commits"},"statuses":{"href":"https://api.github.com/repos/apache/phoenix/statuses/51c9b053f8c15fae55c2baaef61bdce31794a184"}}}}