{"action":"created","comment":{"url":"https://api.github.com/repos/yahoo/fili/pulls/comments/205157818","pull_request_review_id":140372186,"id":205157818,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNTE1NzgxOA==","diff_hunk":"@@ -0,0 +1,125 @@\n+// Copyright 2016 Yahoo Inc.\n+// Licensed under the terms of the Apache license. Please see LICENSE.md file distributed with this work for terms.\n+package com.yahoo.wiki.webservice.application;\n+\n+import com.codahale.metrics.servlet.InstrumentedFilter;\n+import com.codahale.metrics.servlets.AdminServlet;\n+import com.yahoo.bard.webservice.application.HealthCheckServletContextListener;\n+import com.yahoo.bard.webservice.application.MetricServletContextListener;\n+import com.yahoo.bard.webservice.data.config.dimension.DimensionConfig;\n+import com.yahoo.luthier.webservice.data.config.ExternalConfigLoader;\n+import com.yahoo.luthier.webservice.data.config.dimension.ExternalDimensionsLoader;\n+import org.asynchttpclient.*;\n+import org.eclipse.jetty.server.Handler;\n+import org.eclipse.jetty.server.Server;\n+import org.eclipse.jetty.server.handler.HandlerList;\n+import org.eclipse.jetty.server.handler.ResourceHandler;\n+import org.eclipse.jetty.servlet.FilterHolder;\n+import org.eclipse.jetty.servlet.ServletContextHandler;\n+import org.eclipse.jetty.servlet.ServletHolder;\n+import org.glassfish.jersey.servlet.ServletContainer;\n+import org.slf4j.Logger;\n+import org.slf4j.LoggerFactory;\n+\n+import javax.servlet.DispatcherType;\n+import java.io.IOException;\n+import java.util.EnumSet;\n+import java.util.concurrent.ExecutionException;\n+\n+/**\n+ * Launch Bard in Embedded Jetty.\n+ */\n+public class WikiCopyMain {\n+    private static final Logger LOG = LoggerFactory.getLogger(WikiCopyMain.class);\n+    private static final String EXTERNAL_CONFIG_FILE_PATH  = System.getProperty(\"user.dir\") + \"/config/\";\n+    private static ExternalConfigLoader externalConfigLoader = new ExternalConfigLoader();\n+\n+    /**\n+     * Makes the dimensions passthrough.\n+     * <p>\n+     * This method sends a lastUpdated date to each dimension in the dimension cache, allowing the health checks\n+     * to pass without having to set up a proper dimension loader. For each dimension, d, the following query is\n+     * sent to the /v1/cache/dimensions/d endpoint:\n+     * {\n+     *     \"name\": \"d\",\n+     *     \"lastUpdated\": \"2016-01-01\"\n+     * }\n+     *\n+     * @param port  The port through which we access the webservice\n+     *\n+     * @throws IOException If something goes terribly wrong when building the JSON or sending it\n+     */\n+    private static void markDimensionCacheHealthy(int port) throws IOException {\n+        AsyncHttpClient asyncHttpClient = new DefaultAsyncHttpClient();\n+        for (DimensionConfig dimensionConfig : new ExternalDimensionsLoader(\n+                externalConfigLoader,\n+                EXTERNAL_CONFIG_FILE_PATH\n+        ).getAllDimensionConfigurations()) {\n+            String dimension = dimensionConfig.getApiName();\n+            BoundRequestBuilder boundRequestBuilder = asyncHttpClient.preparePost(\"http://localhost:\" + port +\n+                    \"/v1/cache/dimensions/\" + dimension)\n+                    .addHeader(\"Content-type\", \"application/json\")\n+                    .setBody(\n+                            String.format(\"{\\n \\\"name\\\":\\\"%s\\\",\\n \\\"lastUpdated\\\":\\\"2016-01-01\\\"\\n}\", dimension)\n+                    );\n+\n+            ListenableFuture<Response> responseFuture = boundRequestBuilder.execute();\n+            try {\n+                Response response = responseFuture.get();\n+                LOG.debug(\"Mark Dimension Cache Updated Response: \", response);\n+            } catch (InterruptedException | ExecutionException e) {\n+                LOG.warn(\"Failed while marking dimensions healthy\", e);\n+            }\n+        }\n+    }\n+\n+    /**\n+     * Run the Wikipedia application.\n+     *\n+     * @param args  command line arguments\n+     * @throws Exception if the server fails to start or crashes\n+     */\n+    public static void main(String[] args) throws Exception {","path":"wiki-example-copy/src/main/java/com/yahoo/wiki/webservice/application/WikiCopyMain.java","position":82,"original_position":82,"commit_id":"17023dc7743fbe57113db74e048e3c4b1a3b3b6b","original_commit_id":"17023dc7743fbe57113db74e048e3c4b1a3b3b6b","user":{"login":"codacy-bot","id":19940114,"node_id":"MDQ6VXNlcjE5OTQwMTE0","avatar_url":"https://avatars1.githubusercontent.com/u/19940114?v=4","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://app.codacy.com/assets/images/favicon.png) Issue found: [A method/constructor shouldnt explicitly throw java.lang.Exception](https://app.codacy.com/app/Fili/fili/pullRequest?prid=1800136)","created_at":"2018-07-25T15:34:21Z","updated_at":"2018-07-25T15:34:21Z","html_url":"https://github.com/yahoo/fili/pull/719#discussion_r205157818","pull_request_url":"https://api.github.com/repos/yahoo/fili/pulls/719","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/yahoo/fili/pulls/comments/205157818"},"html":{"href":"https://github.com/yahoo/fili/pull/719#discussion_r205157818"},"pull_request":{"href":"https://api.github.com/repos/yahoo/fili/pulls/719"}}},"pull_request":{"url":"https://api.github.com/repos/yahoo/fili/pulls/719","id":195929270,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1OTI5Mjcw","html_url":"https://github.com/yahoo/fili/pull/719","diff_url":"https://github.com/yahoo/fili/pull/719.diff","patch_url":"https://github.com/yahoo/fili/pull/719.patch","issue_url":"https://api.github.com/repos/yahoo/fili/issues/719","number":719,"state":"open","locked":false,"title":"Luthier-draft-1","user":{"login":"ForestCold","id":15013380,"node_id":"MDQ6VXNlcjE1MDEzMzgw","avatar_url":"https://avatars1.githubusercontent.com/u/15013380?v=4","gravatar_id":"","url":"https://api.github.com/users/ForestCold","html_url":"https://github.com/ForestCold","followers_url":"https://api.github.com/users/ForestCold/followers","following_url":"https://api.github.com/users/ForestCold/following{/other_user}","gists_url":"https://api.github.com/users/ForestCold/gists{/gist_id}","starred_url":"https://api.github.com/users/ForestCold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ForestCold/subscriptions","organizations_url":"https://api.github.com/users/ForestCold/orgs","repos_url":"https://api.github.com/users/ForestCold/repos","events_url":"https://api.github.com/users/ForestCold/events{/privacy}","received_events_url":"https://api.github.com/users/ForestCold/received_events","type":"User","site_admin":false},"body":"https://github.com/yahoo/fili/issues/708","created_at":"2018-06-19T19:12:09Z","updated_at":"2018-07-25T15:34:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"77f880eef67bcdd08128aef329f3a65978f17842","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":465544253,"node_id":"MDU6TGFiZWw0NjU1NDQyNTM=","url":"https://api.github.com/repos/yahoo/fili/labels/CONFIG","name":"CONFIG","color":"fef2c0","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/yahoo/fili/pulls/719/commits","review_comments_url":"https://api.github.com/repos/yahoo/fili/pulls/719/comments","review_comment_url":"https://api.github.com/repos/yahoo/fili/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yahoo/fili/issues/719/comments","statuses_url":"https://api.github.com/repos/yahoo/fili/statuses/17023dc7743fbe57113db74e048e3c4b1a3b3b6b","head":{"label":"yahoo:wiki-test","ref":"wiki-test","sha":"17023dc7743fbe57113db74e048e3c4b1a3b3b6b","user":{"login":"yahoo","id":16574,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NTc0","avatar_url":"https://avatars1.githubusercontent.com/u/16574?v=4","gravatar_id":"","url":"https://api.github.com/users/yahoo","html_url":"https://github.com/yahoo","followers_url":"https://api.github.com/users/yahoo/followers","following_url":"https://api.github.com/users/yahoo/following{/other_user}","gists_url":"https://api.github.com/users/yahoo/gists{/gist_id}","starred_url":"https://api.github.com/users/yahoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yahoo/subscriptions","organizations_url":"https://api.github.com/users/yahoo/orgs","repos_url":"https://api.github.com/users/yahoo/repos","events_url":"https://api.github.com/users/yahoo/events{/privacy}","received_events_url":"https://api.github.com/users/yahoo/received_events","type":"Organization","site_admin":false},"repo":{"id":60879636,"node_id":"MDEwOlJlcG9zaXRvcnk2MDg3OTYzNg==","name":"fili","full_name":"yahoo/fili","owner":{"login":"yahoo","id":16574,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NTc0","avatar_url":"https://avatars1.githubusercontent.com/u/16574?v=4","gravatar_id":"","url":"https://api.github.com/users/yahoo","html_url":"https://github.com/yahoo","followers_url":"https://api.github.com/users/yahoo/followers","following_url":"https://api.github.com/users/yahoo/following{/other_user}","gists_url":"https://api.github.com/users/yahoo/gists{/gist_id}","starred_url":"https://api.github.com/users/yahoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yahoo/subscriptions","organizations_url":"https://api.github.com/users/yahoo/orgs","repos_url":"https://api.github.com/users/yahoo/repos","events_url":"https://api.github.com/users/yahoo/events{/privacy}","received_events_url":"https://api.github.com/users/yahoo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yahoo/fili","description":"Easily make RESTful web services for time series reporting with Big Data analytics engines like Druid and Hive.","fork":false,"url":"https://api.github.com/repos/yahoo/fili","forks_url":"https://api.github.com/repos/yahoo/fili/forks","keys_url":"https://api.github.com/repos/yahoo/fili/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yahoo/fili/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yahoo/fili/teams","hooks_url":"https://api.github.com/repos/yahoo/fili/hooks","issue_events_url":"https://api.github.com/repos/yahoo/fili/issues/events{/number}","events_url":"https://api.github.com/repos/yahoo/fili/events","assignees_url":"https://api.github.com/repos/yahoo/fili/assignees{/user}","branches_url":"https://api.github.com/repos/yahoo/fili/branches{/branch}","tags_url":"https://api.github.com/repos/yahoo/fili/tags","blobs_url":"https://api.github.com/repos/yahoo/fili/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yahoo/fili/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yahoo/fili/git/refs{/sha}","trees_url":"https://api.github.com/repos/yahoo/fili/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yahoo/fili/statuses/{sha}","languages_url":"https://api.github.com/repos/yahoo/fili/languages","stargazers_url":"https://api.github.com/repos/yahoo/fili/stargazers","contributors_url":"https://api.github.com/repos/yahoo/fili/contributors","subscribers_url":"https://api.github.com/repos/yahoo/fili/subscribers","subscription_url":"https://api.github.com/repos/yahoo/fili/subscription","commits_url":"https://api.github.com/repos/yahoo/fili/commits{/sha}","git_commits_url":"https://api.github.com/repos/yahoo/fili/git/commits{/sha}","comments_url":"https://api.github.com/repos/yahoo/fili/comments{/number}","issue_comment_url":"https://api.github.com/repos/yahoo/fili/issues/comments{/number}","contents_url":"https://api.github.com/repos/yahoo/fili/contents/{+path}","compare_url":"https://api.github.com/repos/yahoo/fili/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yahoo/fili/merges","archive_url":"https://api.github.com/repos/yahoo/fili/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yahoo/fili/downloads","issues_url":"https://api.github.com/repos/yahoo/fili/issues{/number}","pulls_url":"https://api.github.com/repos/yahoo/fili/pulls{/number}","milestones_url":"https://api.github.com/repos/yahoo/fili/milestones{/number}","notifications_url":"https://api.github.com/repos/yahoo/fili/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yahoo/fili/labels{/name}","releases_url":"https://api.github.com/repos/yahoo/fili/releases{/id}","deployments_url":"https://api.github.com/repos/yahoo/fili/deployments","created_at":"2016-06-10T22:07:59Z","updated_at":"2018-07-24T20:48:14Z","pushed_at":"2018-07-25T15:00:32Z","git_url":"git://github.com/yahoo/fili.git","ssh_url":"git@github.com:yahoo/fili.git","clone_url":"https://github.com/yahoo/fili.git","svn_url":"https://github.com/yahoo/fili","homepage":"http://fili.io","size":10173,"stargazers_count":88,"watchers_count":88,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":51,"mirror_url":null,"archived":false,"open_issues_count":235,"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":51,"open_issues":235,"watchers":88,"default_branch":"master"}},"base":{"label":"yahoo:master","ref":"master","sha":"d743cc790b2be87432b3231eea4ee36f979be8a4","user":{"login":"yahoo","id":16574,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NTc0","avatar_url":"https://avatars1.githubusercontent.com/u/16574?v=4","gravatar_id":"","url":"https://api.github.com/users/yahoo","html_url":"https://github.com/yahoo","followers_url":"https://api.github.com/users/yahoo/followers","following_url":"https://api.github.com/users/yahoo/following{/other_user}","gists_url":"https://api.github.com/users/yahoo/gists{/gist_id}","starred_url":"https://api.github.com/users/yahoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yahoo/subscriptions","organizations_url":"https://api.github.com/users/yahoo/orgs","repos_url":"https://api.github.com/users/yahoo/repos","events_url":"https://api.github.com/users/yahoo/events{/privacy}","received_events_url":"https://api.github.com/users/yahoo/received_events","type":"Organization","site_admin":false},"repo":{"id":60879636,"node_id":"MDEwOlJlcG9zaXRvcnk2MDg3OTYzNg==","name":"fili","full_name":"yahoo/fili","owner":{"login":"yahoo","id":16574,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NTc0","avatar_url":"https://avatars1.githubusercontent.com/u/16574?v=4","gravatar_id":"","url":"https://api.github.com/users/yahoo","html_url":"https://github.com/yahoo","followers_url":"https://api.github.com/users/yahoo/followers","following_url":"https://api.github.com/users/yahoo/following{/other_user}","gists_url":"https://api.github.com/users/yahoo/gists{/gist_id}","starred_url":"https://api.github.com/users/yahoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yahoo/subscriptions","organizations_url":"https://api.github.com/users/yahoo/orgs","repos_url":"https://api.github.com/users/yahoo/repos","events_url":"https://api.github.com/users/yahoo/events{/privacy}","received_events_url":"https://api.github.com/users/yahoo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yahoo/fili","description":"Easily make RESTful web services for time series reporting with Big Data analytics engines like Druid and Hive.","fork":false,"url":"https://api.github.com/repos/yahoo/fili","forks_url":"https://api.github.com/repos/yahoo/fili/forks","keys_url":"https://api.github.com/repos/yahoo/fili/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yahoo/fili/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yahoo/fili/teams","hooks_url":"https://api.github.com/repos/yahoo/fili/hooks","issue_events_url":"https://api.github.com/repos/yahoo/fili/issues/events{/number}","events_url":"https://api.github.com/repos/yahoo/fili/events","assignees_url":"https://api.github.com/repos/yahoo/fili/assignees{/user}","branches_url":"https://api.github.com/repos/yahoo/fili/branches{/branch}","tags_url":"https://api.github.com/repos/yahoo/fili/tags","blobs_url":"https://api.github.com/repos/yahoo/fili/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yahoo/fili/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yahoo/fili/git/refs{/sha}","trees_url":"https://api.github.com/repos/yahoo/fili/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yahoo/fili/statuses/{sha}","languages_url":"https://api.github.com/repos/yahoo/fili/languages","stargazers_url":"https://api.github.com/repos/yahoo/fili/stargazers","contributors_url":"https://api.github.com/repos/yahoo/fili/contributors","subscribers_url":"https://api.github.com/repos/yahoo/fili/subscribers","subscription_url":"https://api.github.com/repos/yahoo/fili/subscription","commits_url":"https://api.github.com/repos/yahoo/fili/commits{/sha}","git_commits_url":"https://api.github.com/repos/yahoo/fili/git/commits{/sha}","comments_url":"https://api.github.com/repos/yahoo/fili/comments{/number}","issue_comment_url":"https://api.github.com/repos/yahoo/fili/issues/comments{/number}","contents_url":"https://api.github.com/repos/yahoo/fili/contents/{+path}","compare_url":"https://api.github.com/repos/yahoo/fili/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yahoo/fili/merges","archive_url":"https://api.github.com/repos/yahoo/fili/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yahoo/fili/downloads","issues_url":"https://api.github.com/repos/yahoo/fili/issues{/number}","pulls_url":"https://api.github.com/repos/yahoo/fili/pulls{/number}","milestones_url":"https://api.github.com/repos/yahoo/fili/milestones{/number}","notifications_url":"https://api.github.com/repos/yahoo/fili/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yahoo/fili/labels{/name}","releases_url":"https://api.github.com/repos/yahoo/fili/releases{/id}","deployments_url":"https://api.github.com/repos/yahoo/fili/deployments","created_at":"2016-06-10T22:07:59Z","updated_at":"2018-07-24T20:48:14Z","pushed_at":"2018-07-25T15:00:32Z","git_url":"git://github.com/yahoo/fili.git","ssh_url":"git@github.com:yahoo/fili.git","clone_url":"https://github.com/yahoo/fili.git","svn_url":"https://github.com/yahoo/fili","homepage":"http://fili.io","size":10173,"stargazers_count":88,"watchers_count":88,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":51,"mirror_url":null,"archived":false,"open_issues_count":235,"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":51,"open_issues":235,"watchers":88,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yahoo/fili/pulls/719"},"html":{"href":"https://github.com/yahoo/fili/pull/719"},"issue":{"href":"https://api.github.com/repos/yahoo/fili/issues/719"},"comments":{"href":"https://api.github.com/repos/yahoo/fili/issues/719/comments"},"review_comments":{"href":"https://api.github.com/repos/yahoo/fili/pulls/719/comments"},"review_comment":{"href":"https://api.github.com/repos/yahoo/fili/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yahoo/fili/pulls/719/commits"},"statuses":{"href":"https://api.github.com/repos/yahoo/fili/statuses/17023dc7743fbe57113db74e048e3c4b1a3b3b6b"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"codacy-bot"}}