GitHub PullRequestReviewCommentEvent at 2014-12-29 21:20:01
Repository: spring-boot
Actor: bsideup
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/spring-projects/spring-boot/pulls/comments/22328964","id":22328964,"diff_hunk":"@@ -0,0 +1,53 @@\n+/*\n+ * Copyright 2012-2014 the original author or authors.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * 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.springframework.boot.actuate.health;\n+\n+import org.apache.commons.logging.Log;\n+import org.apache.commons.logging.LogFactory;\n+import org.springframework.data.cassandra.core.CassandraAdminOperations;\n+import org.springframework.util.Assert;\n+\n+/**\n+ * Simple implementation of a {@link HealthIndicator} returning status information for\n+ * Cassandra data stores.\n+ *\n+ * @author Julien Dubois\n+ * @since 1.3.0\n+ */\n+public class CassandraHealthIndicator extends AbstractHealthIndicator {\n+\n+    private static Log logger = LogFactory.getLog(CassandraHealthIndicator.class);\n+\n+    private CassandraAdminOperations cassandraTemplate;\n+\n+    public CassandraHealthIndicator(CassandraAdminOperations cassandraTemplate) {\n+        Assert.notNull(cassandraTemplate, \"cassandraTemplate must not be null\");\n+        this.cassandraTemplate = cassandraTemplate;\n+    }\n+\n+    @Override\n+    protected void doHealthCheck(Health.Builder builder) throws Exception {\n+        logger.debug(\"Initializing Cassandra health indicator\");\n+        try {\n+            cassandraTemplate.query(\"SELECT cluster_name FROM system.local;\");","path":"spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/CassandraHealthIndicator.java","position":46,"original_position":46,"commit_id":"97377a9927176a39f601351afd7a1c05f29f764b","original_commit_id":"97377a9927176a39f601351afd7a1c05f29f764b","user":{"login":"bsideup","id":1050762,"avatar_url":"https://avatars.githubusercontent.com/u/1050762?v=3","gravatar_id":"","url":"https://api.github.com/users/bsideup","html_url":"https://github.com/bsideup","followers_url":"https://api.github.com/users/bsideup/followers","following_url":"https://api.github.com/users/bsideup/following{/other_user}","gists_url":"https://api.github.com/users/bsideup/gists{/gist_id}","starred_url":"https://api.github.com/users/bsideup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsideup/subscriptions","organizations_url":"https://api.github.com/users/bsideup/orgs","repos_url":"https://api.github.com/users/bsideup/repos","events_url":"https://api.github.com/users/bsideup/events{/privacy}","received_events_url":"https://api.github.com/users/bsideup/received_events","type":"User","site_admin":false},"body":"I think it's better to replace with QueryBuilder.select(\"release_version\").from(\"system\", \"local\") since all other databse health indicators are resulting with version number.","created_at":"2014-12-29T21:20:01Z","updated_at":"2014-12-29T21:20:01Z","html_url":"https://github.com/spring-projects/spring-boot/pull/2214#discussion_r22328964","pull_request_url":"https://api.github.com/repos/spring-projects/spring-boot/pulls/2214","_links":{"self":{"href":"https://api.github.com/repos/spring-projects/spring-boot/pulls/comments/22328964"},"html":{"href":"https://github.com/spring-projects/spring-boot/pull/2214#discussion_r22328964"},"pull_request":{"href":"https://api.github.com/repos/spring-projects/spring-boot/pulls/2214"}}},"pull_request":{"url":"https://api.github.com/repos/spring-projects/spring-boot/pulls/2214","id":26448048,"html_url":"https://github.com/spring-projects/spring-boot/pull/2214","diff_url":"https://github.com/spring-projects/spring-boot/pull/2214.diff","patch_url":"https://github.com/spring-projects/spring-boot/pull/2214.patch","issue_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/2214","number":2214,"state":"open","locked":false,"title":"Added Cassandra support for Spring Boot","user":{"login":"jdubois","id":316835,"avatar_url":"https://avatars.githubusercontent.com/u/316835?v=3","gravatar_id":"","url":"https://api.github.com/users/jdubois","html_url":"https://github.com/jdubois","followers_url":"https://api.github.com/users/jdubois/followers","following_url":"https://api.github.com/users/jdubois/following{/other_user}","gists_url":"https://api.github.com/users/jdubois/gists{/gist_id}","starred_url":"https://api.github.com/users/jdubois/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdubois/subscriptions","organizations_url":"https://api.github.com/users/jdubois/orgs","repos_url":"https://api.github.com/users/jdubois/repos","events_url":"https://api.github.com/users/jdubois/events{/privacy}","received_events_url":"https://api.github.com/users/jdubois/received_events","type":"User","site_admin":false},"body":"- Auto-configuration of the Cassandra driver\r\n- Auto-configuration (basic for the moment) of Spring Data Cassandra\r\n- Healthcheck for Cassandra\r\n\r\nFix #2064","created_at":"2014-12-22T10:07:18Z","updated_at":"2014-12-29T21:20:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"740a9c7ebb28e04e177dde6abc6a62ea4a5cea0f","assignee":null,"milestone":{"url":"https://api.github.com/repos/spring-projects/spring-boot/milestones/28","labels_url":"https://api.github.com/repos/spring-projects/spring-boot/milestones/28/labels","id":818466,"number":28,"title":"1.3.0","description":"","creator":{"login":"philwebb","id":519772,"avatar_url":"https://avatars.githubusercontent.com/u/519772?v=3","gravatar_id":"","url":"https://api.github.com/users/philwebb","html_url":"https://github.com/philwebb","followers_url":"https://api.github.com/users/philwebb/followers","following_url":"https://api.github.com/users/philwebb/following{/other_user}","gists_url":"https://api.github.com/users/philwebb/gists{/gist_id}","starred_url":"https://api.github.com/users/philwebb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philwebb/subscriptions","organizations_url":"https://api.github.com/users/philwebb/orgs","repos_url":"https://api.github.com/users/philwebb/repos","events_url":"https://api.github.com/users/philwebb/events{/privacy}","received_events_url":"https://api.github.com/users/philwebb/received_events","type":"User","site_admin":false},"open_issues":31,"closed_issues":0,"state":"open","created_at":"2014-10-08T15:00:46Z","updated_at":"2014-12-29T20:30:04Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/spring-projects/spring-boot/pulls/2214/commits","review_comments_url":"https://api.github.com/repos/spring-projects/spring-boot/pulls/2214/comments","review_comment_url":"https://api.github.com/repos/spring-projects/spring-boot/pulls/comments/{number}","comments_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/2214/comments","statuses_url":"https://api.github.com/repos/spring-projects/spring-boot/statuses/97377a9927176a39f601351afd7a1c05f29f764b","head":{"label":"jdubois:master","ref":"master","sha":"97377a9927176a39f601351afd7a1c05f29f764b","user":{"login":"jdubois","id":316835,"avatar_url":"https://avatars.githubusercontent.com/u/316835?v=3","gravatar_id":"","url":"https://api.github.com/users/jdubois","html_url":"https://github.com/jdubois","followers_url":"https://api.github.com/users/jdubois/followers","following_url":"https://api.github.com/users/jdubois/following{/other_user}","gists_url":"https://api.github.com/users/jdubois/gists{/gist_id}","starred_url":"https://api.github.com/users/jdubois/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdubois/subscriptions","organizations_url":"https://api.github.com/users/jdubois/orgs","repos_url":"https://api.github.com/users/jdubois/repos","events_url":"https://api.github.com/users/jdubois/events{/privacy}","received_events_url":"https://api.github.com/users/jdubois/received_events","type":"User","site_admin":false},"repo":{"id":28185763,"name":"spring-boot","full_name":"jdubois/spring-boot","owner":{"login":"jdubois","id":316835,"avatar_url":"https://avatars.githubusercontent.com/u/316835?v=3","gravatar_id":"","url":"https://api.github.com/users/jdubois","html_url":"https://github.com/jdubois","followers_url":"https://api.github.com/users/jdubois/followers","following_url":"https://api.github.com/users/jdubois/following{/other_user}","gists_url":"https://api.github.com/users/jdubois/gists{/gist_id}","starred_url":"https://api.github.com/users/jdubois/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdubois/subscriptions","organizations_url":"https://api.github.com/users/jdubois/orgs","repos_url":"https://api.github.com/users/jdubois/repos","events_url":"https://api.github.com/users/jdubois/events{/privacy}","received_events_url":"https://api.github.com/users/jdubois/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jdubois/spring-boot","description":"Spring Boot","fork":true,"url":"https://api.github.com/repos/jdubois/spring-boot","forks_url":"https://api.github.com/repos/jdubois/spring-boot/forks","keys_url":"https://api.github.com/repos/jdubois/spring-boot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jdubois/spring-boot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jdubois/spring-boot/teams","hooks_url":"https://api.github.com/repos/jdubois/spring-boot/hooks","issue_events_url":"https://api.github.com/repos/jdubois/spring-boot/issues/events{/number}","events_url":"https://api.github.com/repos/jdubois/spring-boot/events","assignees_url":"https://api.github.com/repos/jdubois/spring-boot/assignees{/user}","branches_url":"https://api.github.com/repos/jdubois/spring-boot/branches{/branch}","tags_url":"https://api.github.com/repos/jdubois/spring-boot/tags","blobs_url":"https://api.github.com/repos/jdubois/spring-boot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jdubois/spring-boot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jdubois/spring-boot/git/refs{/sha}","trees_url":"https://api.github.com/repos/jdubois/spring-boot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jdubois/spring-boot/statuses/{sha}","languages_url":"https://api.github.com/repos/jdubois/spring-boot/languages","stargazers_url":"https://api.github.com/repos/jdubois/spring-boot/stargazers","contributors_url":"https://api.github.com/repos/jdubois/spring-boot/contributors","subscribers_url":"https://api.github.com/repos/jdubois/spring-boot/subscribers","subscription_url":"https://api.github.com/repos/jdubois/spring-boot/subscription","commits_url":"https://api.github.com/repos/jdubois/spring-boot/commits{/sha}","git_commits_url":"https://api.github.com/repos/jdubois/spring-boot/git/commits{/sha}","comments_url":"https://api.github.com/repos/jdubois/spring-boot/comments{/number}","issue_comment_url":"https://api.github.com/repos/jdubois/spring-boot/issues/comments/{number}","contents_url":"https://api.github.com/repos/jdubois/spring-boot/contents/{+path}","compare_url":"https://api.github.com/repos/jdubois/spring-boot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jdubois/spring-boot/merges","archive_url":"https://api.github.com/repos/jdubois/spring-boot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jdubois/spring-boot/downloads","issues_url":"https://api.github.com/repos/jdubois/spring-boot/issues{/number}","pulls_url":"https://api.github.com/repos/jdubois/spring-boot/pulls{/number}","milestones_url":"https://api.github.com/repos/jdubois/spring-boot/milestones{/number}","notifications_url":"https://api.github.com/repos/jdubois/spring-boot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jdubois/spring-boot/labels{/name}","releases_url":"https://api.github.com/repos/jdubois/spring-boot/releases{/id}","created_at":"2014-12-18T14:02:48Z","updated_at":"2014-12-22T15:14:13Z","pushed_at":"2014-12-22T15:14:13Z","git_url":"git://github.com/jdubois/spring-boot.git","ssh_url":"git@github.com:jdubois/spring-boot.git","clone_url":"https://github.com/jdubois/spring-boot.git","svn_url":"https://github.com/jdubois/spring-boot","homepage":"http://projects.spring.io/spring-boot","size":18760,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"spring-projects:master","ref":"master","sha":"20c8e54c5fd31fd8694bde78cce53ca47671b87c","user":{"login":"spring-projects","id":317776,"avatar_url":"https://avatars.githubusercontent.com/u/317776?v=3","gravatar_id":"","url":"https://api.github.com/users/spring-projects","html_url":"https://github.com/spring-projects","followers_url":"https://api.github.com/users/spring-projects/followers","following_url":"https://api.github.com/users/spring-projects/following{/other_user}","gists_url":"https://api.github.com/users/spring-projects/gists{/gist_id}","starred_url":"https://api.github.com/users/spring-projects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spring-projects/subscriptions","organizations_url":"https://api.github.com/users/spring-projects/orgs","repos_url":"https://api.github.com/users/spring-projects/repos","events_url":"https://api.github.com/users/spring-projects/events{/privacy}","received_events_url":"https://api.github.com/users/spring-projects/received_events","type":"Organization","site_admin":false},"repo":{"id":6296790,"name":"spring-boot","full_name":"spring-projects/spring-boot","owner":{"login":"spring-projects","id":317776,"avatar_url":"https://avatars.githubusercontent.com/u/317776?v=3","gravatar_id":"","url":"https://api.github.com/users/spring-projects","html_url":"https://github.com/spring-projects","followers_url":"https://api.github.com/users/spring-projects/followers","following_url":"https://api.github.com/users/spring-projects/following{/other_user}","gists_url":"https://api.github.com/users/spring-projects/gists{/gist_id}","starred_url":"https://api.github.com/users/spring-projects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spring-projects/subscriptions","organizations_url":"https://api.github.com/users/spring-projects/orgs","repos_url":"https://api.github.com/users/spring-projects/repos","events_url":"https://api.github.com/users/spring-projects/events{/privacy}","received_events_url":"https://api.github.com/users/spring-projects/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spring-projects/spring-boot","description":"Spring Boot","fork":false,"url":"https://api.github.com/repos/spring-projects/spring-boot","forks_url":"https://api.github.com/repos/spring-projects/spring-boot/forks","keys_url":"https://api.github.com/repos/spring-projects/spring-boot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spring-projects/spring-boot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spring-projects/spring-boot/teams","hooks_url":"https://api.github.com/repos/spring-projects/spring-boot/hooks","issue_events_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/events{/number}","events_url":"https://api.github.com/repos/spring-projects/spring-boot/events","assignees_url":"https://api.github.com/repos/spring-projects/spring-boot/assignees{/user}","branches_url":"https://api.github.com/repos/spring-projects/spring-boot/branches{/branch}","tags_url":"https://api.github.com/repos/spring-projects/spring-boot/tags","blobs_url":"https://api.github.com/repos/spring-projects/spring-boot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spring-projects/spring-boot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spring-projects/spring-boot/git/refs{/sha}","trees_url":"https://api.github.com/repos/spring-projects/spring-boot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spring-projects/spring-boot/statuses/{sha}","languages_url":"https://api.github.com/repos/spring-projects/spring-boot/languages","stargazers_url":"https://api.github.com/repos/spring-projects/spring-boot/stargazers","contributors_url":"https://api.github.com/repos/spring-projects/spring-boot/contributors","subscribers_url":"https://api.github.com/repos/spring-projects/spring-boot/subscribers","subscription_url":"https://api.github.com/repos/spring-projects/spring-boot/subscription","commits_url":"https://api.github.com/repos/spring-projects/spring-boot/commits{/sha}","git_commits_url":"https://api.github.com/repos/spring-projects/spring-boot/git/commits{/sha}","comments_url":"https://api.github.com/repos/spring-projects/spring-boot/comments{/number}","issue_comment_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/comments/{number}","contents_url":"https://api.github.com/repos/spring-projects/spring-boot/contents/{+path}","compare_url":"https://api.github.com/repos/spring-projects/spring-boot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spring-projects/spring-boot/merges","archive_url":"https://api.github.com/repos/spring-projects/spring-boot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spring-projects/spring-boot/downloads","issues_url":"https://api.github.com/repos/spring-projects/spring-boot/issues{/number}","pulls_url":"https://api.github.com/repos/spring-projects/spring-boot/pulls{/number}","milestones_url":"https://api.github.com/repos/spring-projects/spring-boot/milestones{/number}","notifications_url":"https://api.github.com/repos/spring-projects/spring-boot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spring-projects/spring-boot/labels{/name}","releases_url":"https://api.github.com/repos/spring-projects/spring-boot/releases{/id}","created_at":"2012-10-19T15:02:57Z","updated_at":"2014-12-29T09:20:18Z","pushed_at":"2014-12-29T09:20:18Z","git_url":"git://github.com/spring-projects/spring-boot.git","ssh_url":"git@github.com:spring-projects/spring-boot.git","clone_url":"https://github.com/spring-projects/spring-boot.git","svn_url":"https://github.com/spring-projects/spring-boot","homepage":"http://projects.spring.io/spring-boot","size":47420,"stargazers_count":1455,"watchers_count":1455,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1257,"mirror_url":null,"open_issues_count":269,"forks":1257,"open_issues":269,"watchers":1455,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spring-projects/spring-boot/pulls/2214"},"html":{"href":"https://github.com/spring-projects/spring-boot/pull/2214"},"issue":{"href":"https://api.github.com/repos/spring-projects/spring-boot/issues/2214"},"comments":{"href":"https://api.github.com/repos/spring-projects/spring-boot/issues/2214/comments"},"review_comments":{"href":"https://api.github.com/repos/spring-projects/spring-boot/pulls/2214/comments"},"review_comment":{"href":"https://api.github.com/repos/spring-projects/spring-boot/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/spring-projects/spring-boot/pulls/2214/commits"},"statuses":{"href":"https://api.github.com/repos/spring-projects/spring-boot/statuses/97377a9927176a39f601351afd7a1c05f29f764b"}}}}