{"action":"created","comment":{"url":"https://api.github.com/repos/linkedin/pinot/pulls/comments/83989355","pull_request_review_id":4795967,"id":83989355,"diff_hunk":"@@ -71,15 +82,17 @@\n   private RawAnomalyResultManager anomalyResultDAO;\n   private EmailConfigurationManager emailConfigurationDAO;\n   private DatasetConfigManager datasetConfigDAO;\n+  private AnomalyFunctionFactory anomalyFunctionFactory;\n \n   private static final DAORegistry DAO_REGISTRY = DAORegistry.getInstance();\n \n-  public AnomalyResource() {\n+  public AnomalyResource(String functionConfigPath) {\n     this.anomalyFunctionDAO = DAO_REGISTRY.getAnomalyFunctionDAO();\n     this.anomalyResultDAO = DAO_REGISTRY.getRawAnomalyResultDAO();\n     this.anomalyMergedResultDAO = DAO_REGISTRY.getMergedAnomalyResultDAO();\n     this.emailConfigurationDAO = DAO_REGISTRY.getEmailConfigurationDAO();\n     this.datasetConfigDAO = DAO_REGISTRY.getDatasetConfigDAO();\n+    this.anomalyFunctionFactory = new AnomalyFunctionFactory(functionConfigPath);","path":"thirdeye/thirdeye-pinot/src/main/java/com/linkedin/thirdeye/dashboard/resources/AnomalyResource.java","position":38,"original_position":38,"commit_id":"c5eecf4635335b3216e25f66014c57db8a2e39ac","original_commit_id":"c5eecf4635335b3216e25f66014c57db8a2e39ac","user":{"login":"kishoreg","id":850791,"avatar_url":"https://avatars.githubusercontent.com/u/850791?v=3","gravatar_id":"","url":"https://api.github.com/users/kishoreg","html_url":"https://github.com/kishoreg","followers_url":"https://api.github.com/users/kishoreg/followers","following_url":"https://api.github.com/users/kishoreg/following{/other_user}","gists_url":"https://api.github.com/users/kishoreg/gists{/gist_id}","starred_url":"https://api.github.com/users/kishoreg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kishoreg/subscriptions","organizations_url":"https://api.github.com/users/kishoreg/orgs","repos_url":"https://api.github.com/users/kishoreg/repos","events_url":"https://api.github.com/users/kishoreg/events{/privacy}","received_events_url":"https://api.github.com/users/kishoreg/received_events","type":"User","site_admin":false},"body":"better to create the functionfactory outside and pass it as argument instead of passing functionConfigPath","created_at":"2016-10-19T02:45:42Z","updated_at":"2016-10-19T02:45:42Z","html_url":"https://github.com/linkedin/pinot/pull/698#discussion_r83989355","pull_request_url":"https://api.github.com/repos/linkedin/pinot/pulls/698","_links":{"self":{"href":"https://api.github.com/repos/linkedin/pinot/pulls/comments/83989355"},"html":{"href":"https://github.com/linkedin/pinot/pull/698#discussion_r83989355"},"pull_request":{"href":"https://api.github.com/repos/linkedin/pinot/pulls/698"}}},"pull_request":{"url":"https://api.github.com/repos/linkedin/pinot/pulls/698","id":89921234,"html_url":"https://github.com/linkedin/pinot/pull/698","diff_url":"https://github.com/linkedin/pinot/pull/698.diff","patch_url":"https://github.com/linkedin/pinot/pull/698.patch","issue_url":"https://api.github.com/repos/linkedin/pinot/issues/698","number":698,"state":"open","locked":false,"title":"Generate timeseries for anomaly according to its function","user":{"login":"cyenjung","id":1437087,"avatar_url":"https://avatars.githubusercontent.com/u/1437087?v=3","gravatar_id":"","url":"https://api.github.com/users/cyenjung","html_url":"https://github.com/cyenjung","followers_url":"https://api.github.com/users/cyenjung/followers","following_url":"https://api.github.com/users/cyenjung/following{/other_user}","gists_url":"https://api.github.com/users/cyenjung/gists{/gist_id}","starred_url":"https://api.github.com/users/cyenjung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyenjung/subscriptions","organizations_url":"https://api.github.com/users/cyenjung/orgs","repos_url":"https://api.github.com/users/cyenjung/repos","events_url":"https://api.github.com/users/cyenjung/events{/privacy}","received_events_url":"https://api.github.com/users/cyenjung/received_events","type":"User","site_admin":false},"body":"1. Add a method, named getPresentationTimeseries, to anomaly functions. This method returns the current and baseline values that are used for detecting anomalies. For instance, if a function needs to average the data in the past three weeks, then the returned baseline should be the average values of the past 3 weeks.\r\n\r\n2. Create an endpoint that takes as input the anomaly ID and returns the corresponding time series.","created_at":"2016-10-19T00:08:51Z","updated_at":"2016-10-19T02:48:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a23858d06d3882825c348e8b1f26413be77a3aae","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/linkedin/pinot/pulls/698/commits","review_comments_url":"https://api.github.com/repos/linkedin/pinot/pulls/698/comments","review_comment_url":"https://api.github.com/repos/linkedin/pinot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/linkedin/pinot/issues/698/comments","statuses_url":"https://api.github.com/repos/linkedin/pinot/statuses/c5eecf4635335b3216e25f66014c57db8a2e39ac","head":{"label":"linkedin:generate_anomaly_timeseries_request_from_backend","ref":"generate_anomaly_timeseries_request_from_backend","sha":"c5eecf4635335b3216e25f66014c57db8a2e39ac","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-10-17T11:31:48Z","pushed_at":"2016-10-19T00:19:22Z","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":146085,"stargazers_count":1350,"watchers_count":1350,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":225,"mirror_url":null,"open_issues_count":91,"forks":225,"open_issues":91,"watchers":1350,"default_branch":"master"}},"base":{"label":"linkedin:master","ref":"master","sha":"2a22521698bd6893ca0e8dff8a5dafb06ce2eb3a","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-10-17T11:31:48Z","pushed_at":"2016-10-19T00:19:22Z","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":146085,"stargazers_count":1350,"watchers_count":1350,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":225,"mirror_url":null,"open_issues_count":91,"forks":225,"open_issues":91,"watchers":1350,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/linkedin/pinot/pulls/698"},"html":{"href":"https://github.com/linkedin/pinot/pull/698"},"issue":{"href":"https://api.github.com/repos/linkedin/pinot/issues/698"},"comments":{"href":"https://api.github.com/repos/linkedin/pinot/issues/698/comments"},"review_comments":{"href":"https://api.github.com/repos/linkedin/pinot/pulls/698/comments"},"review_comment":{"href":"https://api.github.com/repos/linkedin/pinot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/linkedin/pinot/pulls/698/commits"},"statuses":{"href":"https://api.github.com/repos/linkedin/pinot/statuses/c5eecf4635335b3216e25f66014c57db8a2e39ac"}}}}
{"actor":{"display_login":"kishoreg"}}