{"action":"created","issue":{"url":"https://api.github.com/repos/pinterest/rocksplicator/issues/21","repository_url":"https://api.github.com/repos/pinterest/rocksplicator","labels_url":"https://api.github.com/repos/pinterest/rocksplicator/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/pinterest/rocksplicator/issues/21/comments","events_url":"https://api.github.com/repos/pinterest/rocksplicator/issues/21/events","html_url":"https://github.com/pinterest/rocksplicator/pull/21","id":200548112,"number":21,"title":"Framework skeleton for Worker service","user":{"login":"shuzhang1989","id":15947888,"avatar_url":"https://avatars.githubusercontent.com/u/15947888?v=3","gravatar_id":"","url":"https://api.github.com/users/shuzhang1989","html_url":"https://github.com/shuzhang1989","followers_url":"https://api.github.com/users/shuzhang1989/followers","following_url":"https://api.github.com/users/shuzhang1989/following{/other_user}","gists_url":"https://api.github.com/users/shuzhang1989/gists{/gist_id}","starred_url":"https://api.github.com/users/shuzhang1989/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shuzhang1989/subscriptions","organizations_url":"https://api.github.com/users/shuzhang1989/orgs","repos_url":"https://api.github.com/users/shuzhang1989/repos","events_url":"https://api.github.com/users/shuzhang1989/events{/privacy}","received_events_url":"https://api.github.com/users/shuzhang1989/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2017-01-13T04:58:27Z","updated_at":"2017-01-17T19:06:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/pinterest/rocksplicator/pulls/21","html_url":"https://github.com/pinterest/rocksplicator/pull/21","diff_url":"https://github.com/pinterest/rocksplicator/pull/21.diff","patch_url":"https://github.com/pinterest/rocksplicator/pull/21.patch"},"body":"No tests yet. just for high level review to ensure the architecture is good."},"comment":{"url":"https://api.github.com/repos/pinterest/rocksplicator/issues/comments/273266425","html_url":"https://github.com/pinterest/rocksplicator/pull/21#issuecomment-273266425","issue_url":"https://api.github.com/repos/pinterest/rocksplicator/issues/21","id":273266425,"user":{"login":"angxu","id":5187448,"avatar_url":"https://avatars.githubusercontent.com/u/5187448?v=3","gravatar_id":"","url":"https://api.github.com/users/angxu","html_url":"https://github.com/angxu","followers_url":"https://api.github.com/users/angxu/followers","following_url":"https://api.github.com/users/angxu/following{/other_user}","gists_url":"https://api.github.com/users/angxu/gists{/gist_id}","starred_url":"https://api.github.com/users/angxu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angxu/subscriptions","organizations_url":"https://api.github.com/users/angxu/orgs","repos_url":"https://api.github.com/users/angxu/repos","events_url":"https://api.github.com/users/angxu/events{/privacy}","received_events_url":"https://api.github.com/users/angxu/received_events","type":"User","site_admin":false},"created_at":"2017-01-17T19:06:45Z","updated_at":"2017-01-17T19:06:45Z","body":"\n\n\n\nReview status: 3 of 9 files reviewed at latest revision, 11 unresolved discussions.\n\n---\n\n*[controller/controller-worker/src/main/java/com/pinterest/rocksplicator/controller/WorkerPool.java, line 40 at r1](https://reviewable.io:443/reviews/pinterest/rocksplicator/21#-KaLLoOtTcM2inDrRrGi:-KahnfZrfdJ1VGETbbiL:b-f6ys71) ([raw file](https://github.com/pinterest/rocksplicator/blob/c2cbf9700af41ed764b3be2f6e86f5af0a3e811d/controller/controller-worker/src/main/java/com/pinterest/rocksplicator/controller/WorkerPool.java#L40)):*\n<details><summary><i>Previously, shuzhang1989 (Shu Zhang) wrote…</i></summary><blockquote>\n\ni may need to stick to ThreadPoolExecutor because it provides afterExeucte() for worker to release the Semaphore. i think this need to be transparent to users who write the task.\n</blockquote></details>\n\nA common practice in java to add pre/post execution hook is to wrap the input runnable. It's also easier to share per task/execution context between the two hooks. For example:\n\n```\nvoid execute(Runnable run) {\n  executor.execute(() -> {\n    Context ctx = new Context();\n    preRun(ctx);\n    try {\n      run.run();\n    } finally {\n      postRun(ctx);\n    }\n  });\n}\n```\n\n---\n\n\n*Comments from [Reviewable](https://reviewable.io:443/reviews/pinterest/rocksplicator/21)*\n<!-- Sent from Reviewable.io -->\n"}}
{"actor":{"display_login":"angxu"}}