{"action":"created","comment":{"url":"https://api.github.com/repos/spotify/scio/pulls/comments/91410151","pull_request_review_id":11918778,"id":91410151,"diff_hunk":"@@ -23,15 +23,54 @@ import com.google.cloud.dataflow.sdk.coders.Coder.Context\n import com.google.cloud.dataflow.sdk.coders._\n import com.google.cloud.dataflow.sdk.util.VarInt\n import com.google.common.io.ByteStreams\n+import com.google.common.reflect.ClassPath\n import com.google.protobuf.Message\n import com.twitter.chill._\n import com.twitter.chill.algebird.AlgebirdRegistrar\n import com.twitter.chill.protobuf.ProtobufSerializer\n import org.apache.avro.generic.GenericRecord\n import org.apache.avro.specific.SpecificRecordBase\n+import org.slf4j.LoggerFactory\n \n+import scala.collection.JavaConverters._\n import scala.collection.convert.Wrappers.JIterableWrapper\n \n+@KryoRegistrar\n+private class AlgebirdKryoRegistrar extends IKryoRegistrar {\n+  override def apply(k: Kryo): Unit = new AlgebirdRegistrar()(k)\n+}\n+\n+private object KryoRegistrarLoader {\n+\n+  private val logger = LoggerFactory.getLogger(\"KryoRegistrarLoader\")\n+\n+  def load(k: Kryo): Unit = {\n+    logger.info(\"Loading KryoRegistrars: \" + registrars.mkString(\", \"))\n+    registrars.foreach(_(k))\n+  }\n+\n+  private val registrars: Seq[IKryoRegistrar] = {\n+    logger.info(\"Initializing KryoRegistrars\")\n+    val classLoader = Thread.currentThread().getContextClassLoader\n+    ClassPath.from(classLoader).getAllClasses.asScala.toSeq\n+      .filter(_.getName.endsWith(\"KryoRegistrar\"))","path":"scio-core/src/main/scala/com/spotify/scio/coders/KryoAtomicCoder.scala","position":34,"original_position":34,"commit_id":"cb3eba41d8e67eda72de03ea75d7b8681fefca39","original_commit_id":"cb3eba41d8e67eda72de03ea75d7b8681fefca39","user":{"login":"nevillelyh","id":468514,"avatar_url":"https://avatars.githubusercontent.com/u/468514?v=3","gravatar_id":"","url":"https://api.github.com/users/nevillelyh","html_url":"https://github.com/nevillelyh","followers_url":"https://api.github.com/users/nevillelyh/followers","following_url":"https://api.github.com/users/nevillelyh/following{/other_user}","gists_url":"https://api.github.com/users/nevillelyh/gists{/gist_id}","starred_url":"https://api.github.com/users/nevillelyh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nevillelyh/subscriptions","organizations_url":"https://api.github.com/users/nevillelyh/orgs","repos_url":"https://api.github.com/users/nevillelyh/repos","events_url":"https://api.github.com/users/nevillelyh/events{/privacy}","received_events_url":"https://api.github.com/users/nevillelyh/received_events","type":"User","site_admin":false},"body":"The next `flatMap` can be very slow without this fillter, probably due to the cost of `clsInfo.load`. Thoughts?","created_at":"2016-12-07T23:15:52Z","updated_at":"2016-12-07T23:15:52Z","html_url":"https://github.com/spotify/scio/pull/351#discussion_r91410151","pull_request_url":"https://api.github.com/repos/spotify/scio/pulls/351","_links":{"self":{"href":"https://api.github.com/repos/spotify/scio/pulls/comments/91410151"},"html":{"href":"https://github.com/spotify/scio/pull/351#discussion_r91410151"},"pull_request":{"href":"https://api.github.com/repos/spotify/scio/pulls/351"}}},"pull_request":{"url":"https://api.github.com/repos/spotify/scio/pulls/351","id":97027856,"html_url":"https://github.com/spotify/scio/pull/351","diff_url":"https://github.com/spotify/scio/pull/351.diff","patch_url":"https://github.com/spotify/scio/pull/351.patch","issue_url":"https://api.github.com/repos/spotify/scio/issues/351","number":351,"state":"open","locked":false,"title":"support custom KryoRegistrar #343","user":{"login":"nevillelyh","id":468514,"avatar_url":"https://avatars.githubusercontent.com/u/468514?v=3","gravatar_id":"","url":"https://api.github.com/users/nevillelyh","html_url":"https://github.com/nevillelyh","followers_url":"https://api.github.com/users/nevillelyh/followers","following_url":"https://api.github.com/users/nevillelyh/following{/other_user}","gists_url":"https://api.github.com/users/nevillelyh/gists{/gist_id}","starred_url":"https://api.github.com/users/nevillelyh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nevillelyh/subscriptions","organizations_url":"https://api.github.com/users/nevillelyh/orgs","repos_url":"https://api.github.com/users/nevillelyh/repos","events_url":"https://api.github.com/users/nevillelyh/events{/privacy}","received_events_url":"https://api.github.com/users/nevillelyh/received_events","type":"User","site_admin":false},"body":"WIP do not merge yet.","created_at":"2016-12-07T23:14:41Z","updated_at":"2016-12-07T23:15:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ad0c55d60d3656e06c1a3ca6f835fb271946e21d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/spotify/scio/pulls/351/commits","review_comments_url":"https://api.github.com/repos/spotify/scio/pulls/351/comments","review_comment_url":"https://api.github.com/repos/spotify/scio/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spotify/scio/issues/351/comments","statuses_url":"https://api.github.com/repos/spotify/scio/statuses/cb3eba41d8e67eda72de03ea75d7b8681fefca39","head":{"label":"spotify:neville/coder-loader","ref":"neville/coder-loader","sha":"cb3eba41d8e67eda72de03ea75d7b8681fefca39","user":{"login":"spotify","id":251374,"avatar_url":"https://avatars.githubusercontent.com/u/251374?v=3","gravatar_id":"","url":"https://api.github.com/users/spotify","html_url":"https://github.com/spotify","followers_url":"https://api.github.com/users/spotify/followers","following_url":"https://api.github.com/users/spotify/following{/other_user}","gists_url":"https://api.github.com/users/spotify/gists{/gist_id}","starred_url":"https://api.github.com/users/spotify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spotify/subscriptions","organizations_url":"https://api.github.com/users/spotify/orgs","repos_url":"https://api.github.com/users/spotify/repos","events_url":"https://api.github.com/users/spotify/events{/privacy}","received_events_url":"https://api.github.com/users/spotify/received_events","type":"Organization","site_admin":false},"repo":{"id":32946662,"name":"scio","full_name":"spotify/scio","owner":{"login":"spotify","id":251374,"avatar_url":"https://avatars.githubusercontent.com/u/251374?v=3","gravatar_id":"","url":"https://api.github.com/users/spotify","html_url":"https://github.com/spotify","followers_url":"https://api.github.com/users/spotify/followers","following_url":"https://api.github.com/users/spotify/following{/other_user}","gists_url":"https://api.github.com/users/spotify/gists{/gist_id}","starred_url":"https://api.github.com/users/spotify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spotify/subscriptions","organizations_url":"https://api.github.com/users/spotify/orgs","repos_url":"https://api.github.com/users/spotify/repos","events_url":"https://api.github.com/users/spotify/events{/privacy}","received_events_url":"https://api.github.com/users/spotify/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spotify/scio","description":"A Scala API for Google Cloud Dataflow and Apache Beam","fork":false,"url":"https://api.github.com/repos/spotify/scio","forks_url":"https://api.github.com/repos/spotify/scio/forks","keys_url":"https://api.github.com/repos/spotify/scio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spotify/scio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spotify/scio/teams","hooks_url":"https://api.github.com/repos/spotify/scio/hooks","issue_events_url":"https://api.github.com/repos/spotify/scio/issues/events{/number}","events_url":"https://api.github.com/repos/spotify/scio/events","assignees_url":"https://api.github.com/repos/spotify/scio/assignees{/user}","branches_url":"https://api.github.com/repos/spotify/scio/branches{/branch}","tags_url":"https://api.github.com/repos/spotify/scio/tags","blobs_url":"https://api.github.com/repos/spotify/scio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spotify/scio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spotify/scio/git/refs{/sha}","trees_url":"https://api.github.com/repos/spotify/scio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spotify/scio/statuses/{sha}","languages_url":"https://api.github.com/repos/spotify/scio/languages","stargazers_url":"https://api.github.com/repos/spotify/scio/stargazers","contributors_url":"https://api.github.com/repos/spotify/scio/contributors","subscribers_url":"https://api.github.com/repos/spotify/scio/subscribers","subscription_url":"https://api.github.com/repos/spotify/scio/subscription","commits_url":"https://api.github.com/repos/spotify/scio/commits{/sha}","git_commits_url":"https://api.github.com/repos/spotify/scio/git/commits{/sha}","comments_url":"https://api.github.com/repos/spotify/scio/comments{/number}","issue_comment_url":"https://api.github.com/repos/spotify/scio/issues/comments{/number}","contents_url":"https://api.github.com/repos/spotify/scio/contents/{+path}","compare_url":"https://api.github.com/repos/spotify/scio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spotify/scio/merges","archive_url":"https://api.github.com/repos/spotify/scio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spotify/scio/downloads","issues_url":"https://api.github.com/repos/spotify/scio/issues{/number}","pulls_url":"https://api.github.com/repos/spotify/scio/pulls{/number}","milestones_url":"https://api.github.com/repos/spotify/scio/milestones{/number}","notifications_url":"https://api.github.com/repos/spotify/scio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spotify/scio/labels{/name}","releases_url":"https://api.github.com/repos/spotify/scio/releases{/id}","deployments_url":"https://api.github.com/repos/spotify/scio/deployments","created_at":"2015-03-26T19:07:34Z","updated_at":"2016-12-07T11:18:10Z","pushed_at":"2016-12-07T23:14:58Z","git_url":"git://github.com/spotify/scio.git","ssh_url":"git@github.com:spotify/scio.git","clone_url":"https://github.com/spotify/scio.git","svn_url":"https://github.com/spotify/scio","homepage":"http://spotify.github.io/scio","size":3856,"stargazers_count":344,"watchers_count":344,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":39,"mirror_url":null,"open_issues_count":27,"forks":39,"open_issues":27,"watchers":344,"default_branch":"master"}},"base":{"label":"spotify:master","ref":"master","sha":"7f29d0edf63054cfa758c5e9c83c628bebfe13f8","user":{"login":"spotify","id":251374,"avatar_url":"https://avatars.githubusercontent.com/u/251374?v=3","gravatar_id":"","url":"https://api.github.com/users/spotify","html_url":"https://github.com/spotify","followers_url":"https://api.github.com/users/spotify/followers","following_url":"https://api.github.com/users/spotify/following{/other_user}","gists_url":"https://api.github.com/users/spotify/gists{/gist_id}","starred_url":"https://api.github.com/users/spotify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spotify/subscriptions","organizations_url":"https://api.github.com/users/spotify/orgs","repos_url":"https://api.github.com/users/spotify/repos","events_url":"https://api.github.com/users/spotify/events{/privacy}","received_events_url":"https://api.github.com/users/spotify/received_events","type":"Organization","site_admin":false},"repo":{"id":32946662,"name":"scio","full_name":"spotify/scio","owner":{"login":"spotify","id":251374,"avatar_url":"https://avatars.githubusercontent.com/u/251374?v=3","gravatar_id":"","url":"https://api.github.com/users/spotify","html_url":"https://github.com/spotify","followers_url":"https://api.github.com/users/spotify/followers","following_url":"https://api.github.com/users/spotify/following{/other_user}","gists_url":"https://api.github.com/users/spotify/gists{/gist_id}","starred_url":"https://api.github.com/users/spotify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spotify/subscriptions","organizations_url":"https://api.github.com/users/spotify/orgs","repos_url":"https://api.github.com/users/spotify/repos","events_url":"https://api.github.com/users/spotify/events{/privacy}","received_events_url":"https://api.github.com/users/spotify/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spotify/scio","description":"A Scala API for Google Cloud Dataflow and Apache Beam","fork":false,"url":"https://api.github.com/repos/spotify/scio","forks_url":"https://api.github.com/repos/spotify/scio/forks","keys_url":"https://api.github.com/repos/spotify/scio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spotify/scio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spotify/scio/teams","hooks_url":"https://api.github.com/repos/spotify/scio/hooks","issue_events_url":"https://api.github.com/repos/spotify/scio/issues/events{/number}","events_url":"https://api.github.com/repos/spotify/scio/events","assignees_url":"https://api.github.com/repos/spotify/scio/assignees{/user}","branches_url":"https://api.github.com/repos/spotify/scio/branches{/branch}","tags_url":"https://api.github.com/repos/spotify/scio/tags","blobs_url":"https://api.github.com/repos/spotify/scio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spotify/scio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spotify/scio/git/refs{/sha}","trees_url":"https://api.github.com/repos/spotify/scio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spotify/scio/statuses/{sha}","languages_url":"https://api.github.com/repos/spotify/scio/languages","stargazers_url":"https://api.github.com/repos/spotify/scio/stargazers","contributors_url":"https://api.github.com/repos/spotify/scio/contributors","subscribers_url":"https://api.github.com/repos/spotify/scio/subscribers","subscription_url":"https://api.github.com/repos/spotify/scio/subscription","commits_url":"https://api.github.com/repos/spotify/scio/commits{/sha}","git_commits_url":"https://api.github.com/repos/spotify/scio/git/commits{/sha}","comments_url":"https://api.github.com/repos/spotify/scio/comments{/number}","issue_comment_url":"https://api.github.com/repos/spotify/scio/issues/comments{/number}","contents_url":"https://api.github.com/repos/spotify/scio/contents/{+path}","compare_url":"https://api.github.com/repos/spotify/scio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spotify/scio/merges","archive_url":"https://api.github.com/repos/spotify/scio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spotify/scio/downloads","issues_url":"https://api.github.com/repos/spotify/scio/issues{/number}","pulls_url":"https://api.github.com/repos/spotify/scio/pulls{/number}","milestones_url":"https://api.github.com/repos/spotify/scio/milestones{/number}","notifications_url":"https://api.github.com/repos/spotify/scio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spotify/scio/labels{/name}","releases_url":"https://api.github.com/repos/spotify/scio/releases{/id}","deployments_url":"https://api.github.com/repos/spotify/scio/deployments","created_at":"2015-03-26T19:07:34Z","updated_at":"2016-12-07T11:18:10Z","pushed_at":"2016-12-07T23:14:58Z","git_url":"git://github.com/spotify/scio.git","ssh_url":"git@github.com:spotify/scio.git","clone_url":"https://github.com/spotify/scio.git","svn_url":"https://github.com/spotify/scio","homepage":"http://spotify.github.io/scio","size":3856,"stargazers_count":344,"watchers_count":344,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":39,"mirror_url":null,"open_issues_count":27,"forks":39,"open_issues":27,"watchers":344,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spotify/scio/pulls/351"},"html":{"href":"https://github.com/spotify/scio/pull/351"},"issue":{"href":"https://api.github.com/repos/spotify/scio/issues/351"},"comments":{"href":"https://api.github.com/repos/spotify/scio/issues/351/comments"},"review_comments":{"href":"https://api.github.com/repos/spotify/scio/pulls/351/comments"},"review_comment":{"href":"https://api.github.com/repos/spotify/scio/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spotify/scio/pulls/351/commits"},"statuses":{"href":"https://api.github.com/repos/spotify/scio/statuses/cb3eba41d8e67eda72de03ea75d7b8681fefca39"}}}}
{"actor":{"display_login":"nevillelyh"}}