{"action":"created","comment":{"url":"https://api.github.com/repos/locationtech/geomesa/pulls/comments/71513193","id":71513193,"diff_hunk":"@@ -12,39 +12,42 @@ import java.util.Date\n \n import com.clearspring.analytics.stream.frequency.{CountMinSketch, RichCountMinSketch}\n import com.vividsolutions.jts.geom.Geometry\n-import org.joda.time.{DateTime, DateTimeZone, Seconds, Weeks}\n-import org.locationtech.geomesa.curve.Z3SFC\n+import org.locationtech.geomesa.curve.TimePeriod.TimePeriod\n+import org.locationtech.geomesa.curve.{BinnedTime, Z3SFC}\n import org.opengis.feature.simple.SimpleFeature\n \n /**\n   * Estimates frequency counts at scale. Tracks geometry and date attributes as a single value.\n   *\n   * @param geomIndex geometry attribute index in the sft\n   * @param dtgIndex date attribute index in the sft\n+  * @param period time period to use for z index\n   * @param precision number of bits of z-index that will be used\n   * @param eps (epsilon) with probability at least @see confidence, estimates will be within eps * N\n   * @param confidence percent - with probability at least confidence, estimates will be within @see eps * N\n   */\n class Z3Frequency(val geomIndex: Int,\n                   val dtgIndex: Int,\n+                  val period: TimePeriod,\n                   val precision: Int,\n                   val eps: Double = 0.005,\n                   val confidence: Double = 0.95) extends Stat {\n \n   override type S = Z3Frequency\n \n   private val mask = Frequency.getMask(precision)\n+  private val sfc = Z3SFC(period)\n+  private val timeToBin = BinnedTime.timeToBinnedTime(period)\n \n   private [stats] val sketches = scala.collection.mutable.Map.empty[Short, CountMinSketch]\n   private [stats] def newSketch: CountMinSketch = new CountMinSketch(eps, confidence, Frequency.Seed)\n \n+","path":"geomesa-utils/src/main/scala/org/locationtech/geomesa/utils/stats/Z3Frequency.scala","position":36,"original_position":36,"commit_id":"82ec5e0e26a2824d9136e025590aa0e934e030e0","original_commit_id":"82ec5e0e26a2824d9136e025590aa0e934e030e0","user":{"login":"elahrvivaz","id":7715322,"avatar_url":"https://avatars.githubusercontent.com/u/7715322?v=3","gravatar_id":"","url":"https://api.github.com/users/elahrvivaz","html_url":"https://github.com/elahrvivaz","followers_url":"https://api.github.com/users/elahrvivaz/followers","following_url":"https://api.github.com/users/elahrvivaz/following{/other_user}","gists_url":"https://api.github.com/users/elahrvivaz/gists{/gist_id}","starred_url":"https://api.github.com/users/elahrvivaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elahrvivaz/subscriptions","organizations_url":"https://api.github.com/users/elahrvivaz/orgs","repos_url":"https://api.github.com/users/elahrvivaz/repos","events_url":"https://api.github.com/users/elahrvivaz/events{/privacy}","received_events_url":"https://api.github.com/users/elahrvivaz/received_events","type":"User","site_admin":false},"body":"fixed!","created_at":"2016-07-20T12:14:44Z","updated_at":"2016-07-20T12:14:44Z","html_url":"https://github.com/locationtech/geomesa/pull/975#discussion_r71513193","pull_request_url":"https://api.github.com/repos/locationtech/geomesa/pulls/975","_links":{"self":{"href":"https://api.github.com/repos/locationtech/geomesa/pulls/comments/71513193"},"html":{"href":"https://github.com/locationtech/geomesa/pull/975#discussion_r71513193"},"pull_request":{"href":"https://api.github.com/repos/locationtech/geomesa/pulls/975"}}},"pull_request":{"url":"https://api.github.com/repos/locationtech/geomesa/pulls/975","id":76612917,"html_url":"https://github.com/locationtech/geomesa/pull/975","diff_url":"https://github.com/locationtech/geomesa/pull/975.diff","patch_url":"https://github.com/locationtech/geomesa/pull/975.patch","issue_url":"https://api.github.com/repos/locationtech/geomesa/issues/975","number":975,"state":"open","locked":false,"title":"GEOMESA-1188 Configurable interval for z3 dates","user":{"login":"elahrvivaz","id":7715322,"avatar_url":"https://avatars.githubusercontent.com/u/7715322?v=3","gravatar_id":"","url":"https://api.github.com/users/elahrvivaz","html_url":"https://github.com/elahrvivaz","followers_url":"https://api.github.com/users/elahrvivaz/followers","following_url":"https://api.github.com/users/elahrvivaz/following{/other_user}","gists_url":"https://api.github.com/users/elahrvivaz/gists{/gist_id}","starred_url":"https://api.github.com/users/elahrvivaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elahrvivaz/subscriptions","organizations_url":"https://api.github.com/users/elahrvivaz/orgs","repos_url":"https://api.github.com/users/elahrvivaz/repos","events_url":"https://api.github.com/users/elahrvivaz/events{/privacy}","received_events_url":"https://api.github.com/users/elahrvivaz/received_events","type":"User","site_admin":false},"body":"Note: stacks on top of #971, please consider only last commit(s).\r\n\r\nSigned-off-by: Emilio Lahr-Vivaz <elahrvivaz@ccri.com>","created_at":"2016-07-07T15:13:30Z","updated_at":"2016-07-20T12:14:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0331a8ad425978f74abc901b6eab24d231f57298","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/locationtech/geomesa/milestones/2","html_url":"https://github.com/locationtech/geomesa/milestones/1.2.5","labels_url":"https://api.github.com/repos/locationtech/geomesa/milestones/2/labels","id":1879723,"number":2,"title":"1.2.5","description":null,"creator":{"login":"jahhulbert-ccri","id":7433591,"avatar_url":"https://avatars.githubusercontent.com/u/7433591?v=3","gravatar_id":"","url":"https://api.github.com/users/jahhulbert-ccri","html_url":"https://github.com/jahhulbert-ccri","followers_url":"https://api.github.com/users/jahhulbert-ccri/followers","following_url":"https://api.github.com/users/jahhulbert-ccri/following{/other_user}","gists_url":"https://api.github.com/users/jahhulbert-ccri/gists{/gist_id}","starred_url":"https://api.github.com/users/jahhulbert-ccri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jahhulbert-ccri/subscriptions","organizations_url":"https://api.github.com/users/jahhulbert-ccri/orgs","repos_url":"https://api.github.com/users/jahhulbert-ccri/repos","events_url":"https://api.github.com/users/jahhulbert-ccri/events{/privacy}","received_events_url":"https://api.github.com/users/jahhulbert-ccri/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":1,"state":"open","created_at":"2016-07-12T22:52:24Z","updated_at":"2016-07-18T19:31:59Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/locationtech/geomesa/pulls/975/commits","review_comments_url":"https://api.github.com/repos/locationtech/geomesa/pulls/975/comments","review_comment_url":"https://api.github.com/repos/locationtech/geomesa/pulls/comments{/number}","comments_url":"https://api.github.com/repos/locationtech/geomesa/issues/975/comments","statuses_url":"https://api.github.com/repos/locationtech/geomesa/statuses/82ec5e0e26a2824d9136e025590aa0e934e030e0","head":{"label":"elahrvivaz:fcr_z3_intervals","ref":"fcr_z3_intervals","sha":"82ec5e0e26a2824d9136e025590aa0e934e030e0","user":{"login":"elahrvivaz","id":7715322,"avatar_url":"https://avatars.githubusercontent.com/u/7715322?v=3","gravatar_id":"","url":"https://api.github.com/users/elahrvivaz","html_url":"https://github.com/elahrvivaz","followers_url":"https://api.github.com/users/elahrvivaz/followers","following_url":"https://api.github.com/users/elahrvivaz/following{/other_user}","gists_url":"https://api.github.com/users/elahrvivaz/gists{/gist_id}","starred_url":"https://api.github.com/users/elahrvivaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elahrvivaz/subscriptions","organizations_url":"https://api.github.com/users/elahrvivaz/orgs","repos_url":"https://api.github.com/users/elahrvivaz/repos","events_url":"https://api.github.com/users/elahrvivaz/events{/privacy}","received_events_url":"https://api.github.com/users/elahrvivaz/received_events","type":"User","site_admin":false},"repo":{"id":20541167,"name":"geomesa","full_name":"elahrvivaz/geomesa","owner":{"login":"elahrvivaz","id":7715322,"avatar_url":"https://avatars.githubusercontent.com/u/7715322?v=3","gravatar_id":"","url":"https://api.github.com/users/elahrvivaz","html_url":"https://github.com/elahrvivaz","followers_url":"https://api.github.com/users/elahrvivaz/followers","following_url":"https://api.github.com/users/elahrvivaz/following{/other_user}","gists_url":"https://api.github.com/users/elahrvivaz/gists{/gist_id}","starred_url":"https://api.github.com/users/elahrvivaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elahrvivaz/subscriptions","organizations_url":"https://api.github.com/users/elahrvivaz/orgs","repos_url":"https://api.github.com/users/elahrvivaz/repos","events_url":"https://api.github.com/users/elahrvivaz/events{/privacy}","received_events_url":"https://api.github.com/users/elahrvivaz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/elahrvivaz/geomesa","description":"","fork":true,"url":"https://api.github.com/repos/elahrvivaz/geomesa","forks_url":"https://api.github.com/repos/elahrvivaz/geomesa/forks","keys_url":"https://api.github.com/repos/elahrvivaz/geomesa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elahrvivaz/geomesa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elahrvivaz/geomesa/teams","hooks_url":"https://api.github.com/repos/elahrvivaz/geomesa/hooks","issue_events_url":"https://api.github.com/repos/elahrvivaz/geomesa/issues/events{/number}","events_url":"https://api.github.com/repos/elahrvivaz/geomesa/events","assignees_url":"https://api.github.com/repos/elahrvivaz/geomesa/assignees{/user}","branches_url":"https://api.github.com/repos/elahrvivaz/geomesa/branches{/branch}","tags_url":"https://api.github.com/repos/elahrvivaz/geomesa/tags","blobs_url":"https://api.github.com/repos/elahrvivaz/geomesa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elahrvivaz/geomesa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elahrvivaz/geomesa/git/refs{/sha}","trees_url":"https://api.github.com/repos/elahrvivaz/geomesa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elahrvivaz/geomesa/statuses/{sha}","languages_url":"https://api.github.com/repos/elahrvivaz/geomesa/languages","stargazers_url":"https://api.github.com/repos/elahrvivaz/geomesa/stargazers","contributors_url":"https://api.github.com/repos/elahrvivaz/geomesa/contributors","subscribers_url":"https://api.github.com/repos/elahrvivaz/geomesa/subscribers","subscription_url":"https://api.github.com/repos/elahrvivaz/geomesa/subscription","commits_url":"https://api.github.com/repos/elahrvivaz/geomesa/commits{/sha}","git_commits_url":"https://api.github.com/repos/elahrvivaz/geomesa/git/commits{/sha}","comments_url":"https://api.github.com/repos/elahrvivaz/geomesa/comments{/number}","issue_comment_url":"https://api.github.com/repos/elahrvivaz/geomesa/issues/comments{/number}","contents_url":"https://api.github.com/repos/elahrvivaz/geomesa/contents/{+path}","compare_url":"https://api.github.com/repos/elahrvivaz/geomesa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elahrvivaz/geomesa/merges","archive_url":"https://api.github.com/repos/elahrvivaz/geomesa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elahrvivaz/geomesa/downloads","issues_url":"https://api.github.com/repos/elahrvivaz/geomesa/issues{/number}","pulls_url":"https://api.github.com/repos/elahrvivaz/geomesa/pulls{/number}","milestones_url":"https://api.github.com/repos/elahrvivaz/geomesa/milestones{/number}","notifications_url":"https://api.github.com/repos/elahrvivaz/geomesa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elahrvivaz/geomesa/labels{/name}","releases_url":"https://api.github.com/repos/elahrvivaz/geomesa/releases{/id}","deployments_url":"https://api.github.com/repos/elahrvivaz/geomesa/deployments","created_at":"2014-06-05T20:51:54Z","updated_at":"2016-02-15T21:22:52Z","pushed_at":"2016-07-19T21:14:08Z","git_url":"git://github.com/elahrvivaz/geomesa.git","ssh_url":"git@github.com:elahrvivaz/geomesa.git","clone_url":"https://github.com/elahrvivaz/geomesa.git","svn_url":"https://github.com/elahrvivaz/geomesa","homepage":null,"size":33680,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"locationtech:master","ref":"master","sha":"69508a82cfc0586f908a597e67671f5d602bdca1","user":{"login":"locationtech","id":1991411,"avatar_url":"https://avatars.githubusercontent.com/u/1991411?v=3","gravatar_id":"","url":"https://api.github.com/users/locationtech","html_url":"https://github.com/locationtech","followers_url":"https://api.github.com/users/locationtech/followers","following_url":"https://api.github.com/users/locationtech/following{/other_user}","gists_url":"https://api.github.com/users/locationtech/gists{/gist_id}","starred_url":"https://api.github.com/users/locationtech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/locationtech/subscriptions","organizations_url":"https://api.github.com/users/locationtech/orgs","repos_url":"https://api.github.com/users/locationtech/repos","events_url":"https://api.github.com/users/locationtech/events{/privacy}","received_events_url":"https://api.github.com/users/locationtech/received_events","type":"Organization","site_admin":false},"repo":{"id":13226069,"name":"geomesa","full_name":"locationtech/geomesa","owner":{"login":"locationtech","id":1991411,"avatar_url":"https://avatars.githubusercontent.com/u/1991411?v=3","gravatar_id":"","url":"https://api.github.com/users/locationtech","html_url":"https://github.com/locationtech","followers_url":"https://api.github.com/users/locationtech/followers","following_url":"https://api.github.com/users/locationtech/following{/other_user}","gists_url":"https://api.github.com/users/locationtech/gists{/gist_id}","starred_url":"https://api.github.com/users/locationtech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/locationtech/subscriptions","organizations_url":"https://api.github.com/users/locationtech/orgs","repos_url":"https://api.github.com/users/locationtech/repos","events_url":"https://api.github.com/users/locationtech/events{/privacy}","received_events_url":"https://api.github.com/users/locationtech/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/locationtech/geomesa","description":"GeoMesa is a suite of tools for working with big geo-spatial data in a distributed fashion.","fork":false,"url":"https://api.github.com/repos/locationtech/geomesa","forks_url":"https://api.github.com/repos/locationtech/geomesa/forks","keys_url":"https://api.github.com/repos/locationtech/geomesa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/locationtech/geomesa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/locationtech/geomesa/teams","hooks_url":"https://api.github.com/repos/locationtech/geomesa/hooks","issue_events_url":"https://api.github.com/repos/locationtech/geomesa/issues/events{/number}","events_url":"https://api.github.com/repos/locationtech/geomesa/events","assignees_url":"https://api.github.com/repos/locationtech/geomesa/assignees{/user}","branches_url":"https://api.github.com/repos/locationtech/geomesa/branches{/branch}","tags_url":"https://api.github.com/repos/locationtech/geomesa/tags","blobs_url":"https://api.github.com/repos/locationtech/geomesa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/locationtech/geomesa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/locationtech/geomesa/git/refs{/sha}","trees_url":"https://api.github.com/repos/locationtech/geomesa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/locationtech/geomesa/statuses/{sha}","languages_url":"https://api.github.com/repos/locationtech/geomesa/languages","stargazers_url":"https://api.github.com/repos/locationtech/geomesa/stargazers","contributors_url":"https://api.github.com/repos/locationtech/geomesa/contributors","subscribers_url":"https://api.github.com/repos/locationtech/geomesa/subscribers","subscription_url":"https://api.github.com/repos/locationtech/geomesa/subscription","commits_url":"https://api.github.com/repos/locationtech/geomesa/commits{/sha}","git_commits_url":"https://api.github.com/repos/locationtech/geomesa/git/commits{/sha}","comments_url":"https://api.github.com/repos/locationtech/geomesa/comments{/number}","issue_comment_url":"https://api.github.com/repos/locationtech/geomesa/issues/comments{/number}","contents_url":"https://api.github.com/repos/locationtech/geomesa/contents/{+path}","compare_url":"https://api.github.com/repos/locationtech/geomesa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/locationtech/geomesa/merges","archive_url":"https://api.github.com/repos/locationtech/geomesa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/locationtech/geomesa/downloads","issues_url":"https://api.github.com/repos/locationtech/geomesa/issues{/number}","pulls_url":"https://api.github.com/repos/locationtech/geomesa/pulls{/number}","milestones_url":"https://api.github.com/repos/locationtech/geomesa/milestones{/number}","notifications_url":"https://api.github.com/repos/locationtech/geomesa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/locationtech/geomesa/labels{/name}","releases_url":"https://api.github.com/repos/locationtech/geomesa/releases{/id}","deployments_url":"https://api.github.com/repos/locationtech/geomesa/deployments","created_at":"2013-09-30T20:13:46Z","updated_at":"2016-07-15T22:54:59Z","pushed_at":"2016-07-19T23:17:11Z","git_url":"git://github.com/locationtech/geomesa.git","ssh_url":"git@github.com:locationtech/geomesa.git","clone_url":"https://github.com/locationtech/geomesa.git","svn_url":"https://github.com/locationtech/geomesa","homepage":"https://www.locationtech.org/projects/technology.geomesa","size":45283,"stargazers_count":192,"watchers_count":192,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":96,"mirror_url":null,"open_issues_count":10,"forks":96,"open_issues":10,"watchers":192,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/locationtech/geomesa/pulls/975"},"html":{"href":"https://github.com/locationtech/geomesa/pull/975"},"issue":{"href":"https://api.github.com/repos/locationtech/geomesa/issues/975"},"comments":{"href":"https://api.github.com/repos/locationtech/geomesa/issues/975/comments"},"review_comments":{"href":"https://api.github.com/repos/locationtech/geomesa/pulls/975/comments"},"review_comment":{"href":"https://api.github.com/repos/locationtech/geomesa/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/locationtech/geomesa/pulls/975/commits"},"statuses":{"href":"https://api.github.com/repos/locationtech/geomesa/statuses/82ec5e0e26a2824d9136e025590aa0e934e030e0"}}}}
{"actor":{"display_login":"elahrvivaz"}}