{"action":"created","comment":{"url":"https://api.github.com/repos/linkedin/pinot/pulls/comments/73382310","id":73382310,"diff_hunk":"@@ -0,0 +1,66 @@\n+package com.linkedin.thirdeye.anomaly.utils;\n+\n+import java.io.IOException;\n+import java.io.InputStream;\n+\n+import org.apache.commons.io.IOUtils;\n+import org.apache.http.HttpHost;\n+import org.apache.http.HttpRequest;\n+import org.apache.http.HttpResponse;\n+import org.apache.http.client.ClientProtocolException;\n+import org.apache.http.client.HttpClient;\n+import org.apache.http.client.methods.HttpDelete;\n+import org.apache.http.client.methods.HttpPost;\n+import org.apache.http.impl.client.DefaultHttpClient;\n+import org.apache.http.util.EntityUtils;\n+\n+/**\n+ * Utility classes for calling detector endpoints to execute/schedule jobs\n+ */\n+public class AlertResourceHttpUtils {\n+\n+  private HttpHost alertJobHttpHost;\n+\n+  private static String ALERT_JOB_ENDPOINT = \"/api/alert-job/\";\n+  private static String ADHOC = \"/ad-hoc\";\n+\n+  public AlertResourceHttpUtils(String alertHost, int alertPort) {\n+    this.alertJobHttpHost = new HttpHost(alertHost, alertPort);\n+  }\n+\n+  public String enableEmailConfiguration(String id) throws ClientProtocolException, IOException {\n+    HttpPost req = new HttpPost(ALERT_JOB_ENDPOINT + id);\n+    return callAlertJobEndpoint(req);\n+  }\n+\n+  public String disableEmailConfiguration(String id) throws ClientProtocolException, IOException {\n+    HttpDelete req = new HttpDelete(ALERT_JOB_ENDPOINT + id);\n+    return callAlertJobEndpoint(req);\n+  }\n+\n+  public String runAdhocEmailConfiguration(String id, String start, String end)","path":"thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/anomaly/utils/AlertResourceHttpUtils.java","position":41,"original_position":41,"commit_id":"b591c8da62494933cd445a3e937459372c57fcad","original_commit_id":"b591c8da62494933cd445a3e937459372c57fcad","user":{"login":"puneetjaiswal","id":1412516,"avatar_url":"https://avatars.githubusercontent.com/u/1412516?v=3","gravatar_id":"","url":"https://api.github.com/users/puneetjaiswal","html_url":"https://github.com/puneetjaiswal","followers_url":"https://api.github.com/users/puneetjaiswal/followers","following_url":"https://api.github.com/users/puneetjaiswal/following{/other_user}","gists_url":"https://api.github.com/users/puneetjaiswal/gists{/gist_id}","starred_url":"https://api.github.com/users/puneetjaiswal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puneetjaiswal/subscriptions","organizations_url":"https://api.github.com/users/puneetjaiswal/orgs","repos_url":"https://api.github.com/users/puneetjaiswal/repos","events_url":"https://api.github.com/users/puneetjaiswal/events{/privacy}","received_events_url":"https://api.github.com/users/puneetjaiswal/received_events","type":"User","site_admin":false},"body":"does start / end mean time ? if so please rename it start / endTime.\r\nAlso if this is time, can we make it use date/long datatype consistently for date like params (instead of String and parsing it later) ?","created_at":"2016-08-03T17:39:42Z","updated_at":"2016-08-03T17:39:42Z","html_url":"https://github.com/linkedin/pinot/pull/339#discussion_r73382310","pull_request_url":"https://api.github.com/repos/linkedin/pinot/pulls/339","_links":{"self":{"href":"https://api.github.com/repos/linkedin/pinot/pulls/comments/73382310"},"html":{"href":"https://github.com/linkedin/pinot/pull/339#discussion_r73382310"},"pull_request":{"href":"https://api.github.com/repos/linkedin/pinot/pulls/339"}}},"pull_request":{"url":"https://api.github.com/repos/linkedin/pinot/pulls/339","id":79831536,"html_url":"https://github.com/linkedin/pinot/pull/339","diff_url":"https://github.com/linkedin/pinot/pull/339.diff","patch_url":"https://github.com/linkedin/pinot/pull/339.patch","issue_url":"https://api.github.com/repos/linkedin/pinot/issues/339","number":339,"state":"open","locked":false,"title":"THIRDEYE-865 : Make anomaly dashboard point to new database and manager","user":{"login":"npawar","id":19693933,"avatar_url":"https://avatars.githubusercontent.com/u/19693933?v=3","gravatar_id":"","url":"https://api.github.com/users/npawar","html_url":"https://github.com/npawar","followers_url":"https://api.github.com/users/npawar/followers","following_url":"https://api.github.com/users/npawar/following{/other_user}","gists_url":"https://api.github.com/users/npawar/gists{/gist_id}","starred_url":"https://api.github.com/users/npawar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npawar/subscriptions","organizations_url":"https://api.github.com/users/npawar/orgs","repos_url":"https://api.github.com/users/npawar/repos","events_url":"https://api.github.com/users/npawar/events{/privacy}","received_events_url":"https://api.github.com/users/npawar/received_events","type":"User","site_admin":false},"body":"Anomaly dashboard now points to new controller endpoints\nBefore deploying this change, make sure to update dashboard.yml in thirdeye-configs with hosts,ports of detection and alert scheduler, and update persistence.yml","created_at":"2016-08-03T00:34:24Z","updated_at":"2016-08-03T17:39:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"67dc40b74e1a273ec2ded54747ccbf094d41ed08","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/linkedin/pinot/pulls/339/commits","review_comments_url":"https://api.github.com/repos/linkedin/pinot/pulls/339/comments","review_comment_url":"https://api.github.com/repos/linkedin/pinot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/linkedin/pinot/issues/339/comments","statuses_url":"https://api.github.com/repos/linkedin/pinot/statuses/b591c8da62494933cd445a3e937459372c57fcad","head":{"label":"linkedin:update_dashboard_job_managers","ref":"update_dashboard_job_managers","sha":"b591c8da62494933cd445a3e937459372c57fcad","user":{"login":"linkedin","id":357098,"avatar_url":"https://avatars.githubusercontent.com/u/357098?v=3","gravatar_id":"","url":"https://api.github.com/users/linkedin","html_url":"https://github.com/linkedin","followers_url":"https://api.github.com/users/linkedin/followers","following_url":"https://api.github.com/users/linkedin/following{/other_user}","gists_url":"https://api.github.com/users/linkedin/gists{/gist_id}","starred_url":"https://api.github.com/users/linkedin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linkedin/subscriptions","organizations_url":"https://api.github.com/users/linkedin/orgs","repos_url":"https://api.github.com/users/linkedin/repos","events_url":"https://api.github.com/users/linkedin/events{/privacy}","received_events_url":"https://api.github.com/users/linkedin/received_events","type":"Organization","site_admin":false},"repo":{"id":19961085,"name":"pinot","full_name":"linkedin/pinot","owner":{"login":"linkedin","id":357098,"avatar_url":"https://avatars.githubusercontent.com/u/357098?v=3","gravatar_id":"","url":"https://api.github.com/users/linkedin","html_url":"https://github.com/linkedin","followers_url":"https://api.github.com/users/linkedin/followers","following_url":"https://api.github.com/users/linkedin/following{/other_user}","gists_url":"https://api.github.com/users/linkedin/gists{/gist_id}","starred_url":"https://api.github.com/users/linkedin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linkedin/subscriptions","organizations_url":"https://api.github.com/users/linkedin/orgs","repos_url":"https://api.github.com/users/linkedin/repos","events_url":"https://api.github.com/users/linkedin/events{/privacy}","received_events_url":"https://api.github.com/users/linkedin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/linkedin/pinot","description":"A realtime distributed OLAP datastore","fork":false,"url":"https://api.github.com/repos/linkedin/pinot","forks_url":"https://api.github.com/repos/linkedin/pinot/forks","keys_url":"https://api.github.com/repos/linkedin/pinot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/linkedin/pinot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/linkedin/pinot/teams","hooks_url":"https://api.github.com/repos/linkedin/pinot/hooks","issue_events_url":"https://api.github.com/repos/linkedin/pinot/issues/events{/number}","events_url":"https://api.github.com/repos/linkedin/pinot/events","assignees_url":"https://api.github.com/repos/linkedin/pinot/assignees{/user}","branches_url":"https://api.github.com/repos/linkedin/pinot/branches{/branch}","tags_url":"https://api.github.com/repos/linkedin/pinot/tags","blobs_url":"https://api.github.com/repos/linkedin/pinot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/linkedin/pinot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/linkedin/pinot/git/refs{/sha}","trees_url":"https://api.github.com/repos/linkedin/pinot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/linkedin/pinot/statuses/{sha}","languages_url":"https://api.github.com/repos/linkedin/pinot/languages","stargazers_url":"https://api.github.com/repos/linkedin/pinot/stargazers","contributors_url":"https://api.github.com/repos/linkedin/pinot/contributors","subscribers_url":"https://api.github.com/repos/linkedin/pinot/subscribers","subscription_url":"https://api.github.com/repos/linkedin/pinot/subscription","commits_url":"https://api.github.com/repos/linkedin/pinot/commits{/sha}","git_commits_url":"https://api.github.com/repos/linkedin/pinot/git/commits{/sha}","comments_url":"https://api.github.com/repos/linkedin/pinot/comments{/number}","issue_comment_url":"https://api.github.com/repos/linkedin/pinot/issues/comments{/number}","contents_url":"https://api.github.com/repos/linkedin/pinot/contents/{+path}","compare_url":"https://api.github.com/repos/linkedin/pinot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/linkedin/pinot/merges","archive_url":"https://api.github.com/repos/linkedin/pinot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/linkedin/pinot/downloads","issues_url":"https://api.github.com/repos/linkedin/pinot/issues{/number}","pulls_url":"https://api.github.com/repos/linkedin/pinot/pulls{/number}","milestones_url":"https://api.github.com/repos/linkedin/pinot/milestones{/number}","notifications_url":"https://api.github.com/repos/linkedin/pinot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/linkedin/pinot/labels{/name}","releases_url":"https://api.github.com/repos/linkedin/pinot/releases{/id}","deployments_url":"https://api.github.com/repos/linkedin/pinot/deployments","created_at":"2014-05-19T23:27:48Z","updated_at":"2016-08-02T20:49:34Z","pushed_at":"2016-08-03T16:56:14Z","git_url":"git://github.com/linkedin/pinot.git","ssh_url":"git@github.com:linkedin/pinot.git","clone_url":"https://github.com/linkedin/pinot.git","svn_url":"https://github.com/linkedin/pinot","homepage":"https://github.com/linkedin/pinot/wiki","size":142103,"stargazers_count":1312,"watchers_count":1312,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":213,"mirror_url":null,"open_issues_count":76,"forks":213,"open_issues":76,"watchers":1312,"default_branch":"master"}},"base":{"label":"linkedin:master","ref":"master","sha":"b6e7ea85637eaadb0374aa0f01e979f203819583","user":{"login":"linkedin","id":357098,"avatar_url":"https://avatars.githubusercontent.com/u/357098?v=3","gravatar_id":"","url":"https://api.github.com/users/linkedin","html_url":"https://github.com/linkedin","followers_url":"https://api.github.com/users/linkedin/followers","following_url":"https://api.github.com/users/linkedin/following{/other_user}","gists_url":"https://api.github.com/users/linkedin/gists{/gist_id}","starred_url":"https://api.github.com/users/linkedin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linkedin/subscriptions","organizations_url":"https://api.github.com/users/linkedin/orgs","repos_url":"https://api.github.com/users/linkedin/repos","events_url":"https://api.github.com/users/linkedin/events{/privacy}","received_events_url":"https://api.github.com/users/linkedin/received_events","type":"Organization","site_admin":false},"repo":{"id":19961085,"name":"pinot","full_name":"linkedin/pinot","owner":{"login":"linkedin","id":357098,"avatar_url":"https://avatars.githubusercontent.com/u/357098?v=3","gravatar_id":"","url":"https://api.github.com/users/linkedin","html_url":"https://github.com/linkedin","followers_url":"https://api.github.com/users/linkedin/followers","following_url":"https://api.github.com/users/linkedin/following{/other_user}","gists_url":"https://api.github.com/users/linkedin/gists{/gist_id}","starred_url":"https://api.github.com/users/linkedin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linkedin/subscriptions","organizations_url":"https://api.github.com/users/linkedin/orgs","repos_url":"https://api.github.com/users/linkedin/repos","events_url":"https://api.github.com/users/linkedin/events{/privacy}","received_events_url":"https://api.github.com/users/linkedin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/linkedin/pinot","description":"A realtime distributed OLAP datastore","fork":false,"url":"https://api.github.com/repos/linkedin/pinot","forks_url":"https://api.github.com/repos/linkedin/pinot/forks","keys_url":"https://api.github.com/repos/linkedin/pinot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/linkedin/pinot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/linkedin/pinot/teams","hooks_url":"https://api.github.com/repos/linkedin/pinot/hooks","issue_events_url":"https://api.github.com/repos/linkedin/pinot/issues/events{/number}","events_url":"https://api.github.com/repos/linkedin/pinot/events","assignees_url":"https://api.github.com/repos/linkedin/pinot/assignees{/user}","branches_url":"https://api.github.com/repos/linkedin/pinot/branches{/branch}","tags_url":"https://api.github.com/repos/linkedin/pinot/tags","blobs_url":"https://api.github.com/repos/linkedin/pinot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/linkedin/pinot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/linkedin/pinot/git/refs{/sha}","trees_url":"https://api.github.com/repos/linkedin/pinot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/linkedin/pinot/statuses/{sha}","languages_url":"https://api.github.com/repos/linkedin/pinot/languages","stargazers_url":"https://api.github.com/repos/linkedin/pinot/stargazers","contributors_url":"https://api.github.com/repos/linkedin/pinot/contributors","subscribers_url":"https://api.github.com/repos/linkedin/pinot/subscribers","subscription_url":"https://api.github.com/repos/linkedin/pinot/subscription","commits_url":"https://api.github.com/repos/linkedin/pinot/commits{/sha}","git_commits_url":"https://api.github.com/repos/linkedin/pinot/git/commits{/sha}","comments_url":"https://api.github.com/repos/linkedin/pinot/comments{/number}","issue_comment_url":"https://api.github.com/repos/linkedin/pinot/issues/comments{/number}","contents_url":"https://api.github.com/repos/linkedin/pinot/contents/{+path}","compare_url":"https://api.github.com/repos/linkedin/pinot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/linkedin/pinot/merges","archive_url":"https://api.github.com/repos/linkedin/pinot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/linkedin/pinot/downloads","issues_url":"https://api.github.com/repos/linkedin/pinot/issues{/number}","pulls_url":"https://api.github.com/repos/linkedin/pinot/pulls{/number}","milestones_url":"https://api.github.com/repos/linkedin/pinot/milestones{/number}","notifications_url":"https://api.github.com/repos/linkedin/pinot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/linkedin/pinot/labels{/name}","releases_url":"https://api.github.com/repos/linkedin/pinot/releases{/id}","deployments_url":"https://api.github.com/repos/linkedin/pinot/deployments","created_at":"2014-05-19T23:27:48Z","updated_at":"2016-08-02T20:49:34Z","pushed_at":"2016-08-03T16:56:14Z","git_url":"git://github.com/linkedin/pinot.git","ssh_url":"git@github.com:linkedin/pinot.git","clone_url":"https://github.com/linkedin/pinot.git","svn_url":"https://github.com/linkedin/pinot","homepage":"https://github.com/linkedin/pinot/wiki","size":142103,"stargazers_count":1312,"watchers_count":1312,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":213,"mirror_url":null,"open_issues_count":76,"forks":213,"open_issues":76,"watchers":1312,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/linkedin/pinot/pulls/339"},"html":{"href":"https://github.com/linkedin/pinot/pull/339"},"issue":{"href":"https://api.github.com/repos/linkedin/pinot/issues/339"},"comments":{"href":"https://api.github.com/repos/linkedin/pinot/issues/339/comments"},"review_comments":{"href":"https://api.github.com/repos/linkedin/pinot/pulls/339/comments"},"review_comment":{"href":"https://api.github.com/repos/linkedin/pinot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/linkedin/pinot/pulls/339/commits"},"statuses":{"href":"https://api.github.com/repos/linkedin/pinot/statuses/b591c8da62494933cd445a3e937459372c57fcad"}}}}
{"actor":{"display_login":"puneetjaiswal"}}