{"action":"created","comment":{"url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/pulls/comments/47113032","id":47113032,"diff_hunk":"@@ -0,0 +1,31 @@\n+import com.datastax.spark.connector.cql.CassandraConnector\n+import org.apache.spark.SparkConf\n+import org.joda.time.format.PeriodFormatterBuilder\n+import org.joda.time.{DateTime, Period}\n+\n+//\n+///**\n+//  * Created by maxime on 23/11/15.\n+//  */\n+//\n+object MeanTimeBetweenResponse{\n+//\n+  def getTweets(conf : SparkConf, inReplyToStatusId : Long, timestamp : DateTime ): String = {\n+\n+      if(inReplyToStatusId > 0){\n+        CassandraConnector(conf).withSessionDo { session =>\n+          val reply_id = session.execute(\"SELECT created_at FROM twitter_streaming.tweets WHERE tweet_id=\"+ inReplyToStatusId +\" ALLOW FILTERING\")\n+          try {","path":"src/main/scala/MeanTimeBetweenResponse.scala","position":18,"original_position":18,"commit_id":"c838277a42ac55a045fed93555c3e8df164deb9e","original_commit_id":"c838277a42ac55a045fed93555c3e8df164deb9e","user":{"login":"eftov","id":6874086,"avatar_url":"https://avatars.githubusercontent.com/u/6874086?v=3","gravatar_id":"","url":"https://api.github.com/users/eftov","html_url":"https://github.com/eftov","followers_url":"https://api.github.com/users/eftov/followers","following_url":"https://api.github.com/users/eftov/following{/other_user}","gists_url":"https://api.github.com/users/eftov/gists{/gist_id}","starred_url":"https://api.github.com/users/eftov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eftov/subscriptions","organizations_url":"https://api.github.com/users/eftov/orgs","repos_url":"https://api.github.com/users/eftov/repos","events_url":"https://api.github.com/users/eftov/events{/privacy}","received_events_url":"https://api.github.com/users/eftov/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/versioned/images/favicon.png) Issue found: [Consider using util.Try instead of a try-catch block](https://www.codacy.com/app/b-fovet/spark-streaming-twitter/file/1529237931/issues/source?bid=2980032&fileBranchId=3010315#l18)","created_at":"2015-12-09T16:23:39Z","updated_at":"2015-12-09T16:23:39Z","html_url":"https://github.com/t3g7/spark-streaming-twitter/pull/8#discussion_r47113032","pull_request_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/t3g7/spark-streaming-twitter/pulls/comments/47113032"},"html":{"href":"https://github.com/t3g7/spark-streaming-twitter/pull/8#discussion_r47113032"},"pull_request":{"href":"https://api.github.com/repos/t3g7/spark-streaming-twitter/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/pulls/8","id":53086917,"html_url":"https://github.com/t3g7/spark-streaming-twitter/pull/8","diff_url":"https://github.com/t3g7/spark-streaming-twitter/pull/8.diff","patch_url":"https://github.com/t3g7/spark-streaming-twitter/pull/8.patch","issue_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/issues/8","number":8,"state":"open","locked":false,"title":"Mean time between response","user":{"login":"mgasque","id":9765773,"avatar_url":"https://avatars.githubusercontent.com/u/9765773?v=3","gravatar_id":"","url":"https://api.github.com/users/mgasque","html_url":"https://github.com/mgasque","followers_url":"https://api.github.com/users/mgasque/followers","following_url":"https://api.github.com/users/mgasque/following{/other_user}","gists_url":"https://api.github.com/users/mgasque/gists{/gist_id}","starred_url":"https://api.github.com/users/mgasque/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgasque/subscriptions","organizations_url":"https://api.github.com/users/mgasque/orgs","repos_url":"https://api.github.com/users/mgasque/repos","events_url":"https://api.github.com/users/mgasque/events{/privacy}","received_events_url":"https://api.github.com/users/mgasque/received_events","type":"User","site_admin":false},"body":"Mean time between tweets integration","created_at":"2015-12-09T07:55:13Z","updated_at":"2015-12-09T16:23:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/pulls/8/commits","review_comments_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/pulls/8/comments","review_comment_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/pulls/comments{/number}","comments_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/issues/8/comments","statuses_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/statuses/c838277a42ac55a045fed93555c3e8df164deb9e","head":{"label":"t3g7:mean_time_between_response","ref":"mean_time_between_response","sha":"c838277a42ac55a045fed93555c3e8df164deb9e","user":{"login":"t3g7","id":15203751,"avatar_url":"https://avatars.githubusercontent.com/u/15203751?v=3","gravatar_id":"","url":"https://api.github.com/users/t3g7","html_url":"https://github.com/t3g7","followers_url":"https://api.github.com/users/t3g7/followers","following_url":"https://api.github.com/users/t3g7/following{/other_user}","gists_url":"https://api.github.com/users/t3g7/gists{/gist_id}","starred_url":"https://api.github.com/users/t3g7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t3g7/subscriptions","organizations_url":"https://api.github.com/users/t3g7/orgs","repos_url":"https://api.github.com/users/t3g7/repos","events_url":"https://api.github.com/users/t3g7/events{/privacy}","received_events_url":"https://api.github.com/users/t3g7/received_events","type":"Organization","site_admin":false},"repo":{"id":45392100,"name":"spark-streaming-twitter","full_name":"t3g7/spark-streaming-twitter","owner":{"login":"t3g7","id":15203751,"avatar_url":"https://avatars.githubusercontent.com/u/15203751?v=3","gravatar_id":"","url":"https://api.github.com/users/t3g7","html_url":"https://github.com/t3g7","followers_url":"https://api.github.com/users/t3g7/followers","following_url":"https://api.github.com/users/t3g7/following{/other_user}","gists_url":"https://api.github.com/users/t3g7/gists{/gist_id}","starred_url":"https://api.github.com/users/t3g7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t3g7/subscriptions","organizations_url":"https://api.github.com/users/t3g7/orgs","repos_url":"https://api.github.com/users/t3g7/repos","events_url":"https://api.github.com/users/t3g7/events{/privacy}","received_events_url":"https://api.github.com/users/t3g7/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/t3g7/spark-streaming-twitter","description":"Spark Streaming app for Twitter","fork":false,"url":"https://api.github.com/repos/t3g7/spark-streaming-twitter","forks_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/forks","keys_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/teams","hooks_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/hooks","issue_events_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/issues/events{/number}","events_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/events","assignees_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/assignees{/user}","branches_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/branches{/branch}","tags_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/tags","blobs_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/git/refs{/sha}","trees_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/statuses/{sha}","languages_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/languages","stargazers_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/stargazers","contributors_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/contributors","subscribers_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/subscribers","subscription_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/subscription","commits_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/commits{/sha}","git_commits_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/git/commits{/sha}","comments_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/comments{/number}","issue_comment_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/issues/comments{/number}","contents_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/contents/{+path}","compare_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/merges","archive_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/downloads","issues_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/issues{/number}","pulls_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/pulls{/number}","milestones_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/milestones{/number}","notifications_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/labels{/name}","releases_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/releases{/id}","created_at":"2015-11-02T12:05:50Z","updated_at":"2015-11-08T08:38:21Z","pushed_at":"2015-12-09T07:55:13Z","git_url":"git://github.com/t3g7/spark-streaming-twitter.git","ssh_url":"git@github.com:t3g7/spark-streaming-twitter.git","clone_url":"https://github.com/t3g7/spark-streaming-twitter.git","svn_url":"https://github.com/t3g7/spark-streaming-twitter","homepage":"","size":176,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"t3g7:develop","ref":"develop","sha":"d9c91d2b75c02f463db21a6eac84c76980ab2de5","user":{"login":"t3g7","id":15203751,"avatar_url":"https://avatars.githubusercontent.com/u/15203751?v=3","gravatar_id":"","url":"https://api.github.com/users/t3g7","html_url":"https://github.com/t3g7","followers_url":"https://api.github.com/users/t3g7/followers","following_url":"https://api.github.com/users/t3g7/following{/other_user}","gists_url":"https://api.github.com/users/t3g7/gists{/gist_id}","starred_url":"https://api.github.com/users/t3g7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t3g7/subscriptions","organizations_url":"https://api.github.com/users/t3g7/orgs","repos_url":"https://api.github.com/users/t3g7/repos","events_url":"https://api.github.com/users/t3g7/events{/privacy}","received_events_url":"https://api.github.com/users/t3g7/received_events","type":"Organization","site_admin":false},"repo":{"id":45392100,"name":"spark-streaming-twitter","full_name":"t3g7/spark-streaming-twitter","owner":{"login":"t3g7","id":15203751,"avatar_url":"https://avatars.githubusercontent.com/u/15203751?v=3","gravatar_id":"","url":"https://api.github.com/users/t3g7","html_url":"https://github.com/t3g7","followers_url":"https://api.github.com/users/t3g7/followers","following_url":"https://api.github.com/users/t3g7/following{/other_user}","gists_url":"https://api.github.com/users/t3g7/gists{/gist_id}","starred_url":"https://api.github.com/users/t3g7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t3g7/subscriptions","organizations_url":"https://api.github.com/users/t3g7/orgs","repos_url":"https://api.github.com/users/t3g7/repos","events_url":"https://api.github.com/users/t3g7/events{/privacy}","received_events_url":"https://api.github.com/users/t3g7/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/t3g7/spark-streaming-twitter","description":"Spark Streaming app for Twitter","fork":false,"url":"https://api.github.com/repos/t3g7/spark-streaming-twitter","forks_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/forks","keys_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/teams","hooks_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/hooks","issue_events_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/issues/events{/number}","events_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/events","assignees_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/assignees{/user}","branches_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/branches{/branch}","tags_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/tags","blobs_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/git/refs{/sha}","trees_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/statuses/{sha}","languages_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/languages","stargazers_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/stargazers","contributors_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/contributors","subscribers_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/subscribers","subscription_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/subscription","commits_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/commits{/sha}","git_commits_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/git/commits{/sha}","comments_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/comments{/number}","issue_comment_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/issues/comments{/number}","contents_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/contents/{+path}","compare_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/merges","archive_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/downloads","issues_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/issues{/number}","pulls_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/pulls{/number}","milestones_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/milestones{/number}","notifications_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/labels{/name}","releases_url":"https://api.github.com/repos/t3g7/spark-streaming-twitter/releases{/id}","created_at":"2015-11-02T12:05:50Z","updated_at":"2015-11-08T08:38:21Z","pushed_at":"2015-12-09T07:55:13Z","git_url":"git://github.com/t3g7/spark-streaming-twitter.git","ssh_url":"git@github.com:t3g7/spark-streaming-twitter.git","clone_url":"https://github.com/t3g7/spark-streaming-twitter.git","svn_url":"https://github.com/t3g7/spark-streaming-twitter","homepage":"","size":176,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/t3g7/spark-streaming-twitter/pulls/8"},"html":{"href":"https://github.com/t3g7/spark-streaming-twitter/pull/8"},"issue":{"href":"https://api.github.com/repos/t3g7/spark-streaming-twitter/issues/8"},"comments":{"href":"https://api.github.com/repos/t3g7/spark-streaming-twitter/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/t3g7/spark-streaming-twitter/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/t3g7/spark-streaming-twitter/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/t3g7/spark-streaming-twitter/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/t3g7/spark-streaming-twitter/statuses/c838277a42ac55a045fed93555c3e8df164deb9e"}}}}