{"action":"created","comment":{"url":"https://api.github.com/repos/linkedin/ambry/pulls/comments/201448860","pull_request_review_id":135954081,"id":201448860,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMTQ0ODg2MA==","diff_hunk":"@@ -0,0 +1,297 @@\n+/*\n+ * Copyright 2018 LinkedIn Corp. All rights reserved.\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+ */\n+package com.github.ambry.frontend;\n+\n+import com.codahale.metrics.MetricRegistry;\n+import com.github.ambry.account.Account;\n+import com.github.ambry.account.Container;\n+import com.github.ambry.account.InMemAccountService;\n+import com.github.ambry.account.InMemAccountServiceFactory;\n+import com.github.ambry.clustermap.ClusterMap;\n+import com.github.ambry.clustermap.MockClusterMap;\n+import com.github.ambry.commons.ByteBufferReadableStreamChannel;\n+import com.github.ambry.config.FrontendConfig;\n+import com.github.ambry.config.VerifiableProperties;\n+import com.github.ambry.messageformat.BlobProperties;\n+import com.github.ambry.rest.MockRestRequest;\n+import com.github.ambry.rest.MockRestResponseChannel;\n+import com.github.ambry.rest.ResponseStatus;\n+import com.github.ambry.rest.RestRequest;\n+import com.github.ambry.rest.RestResponseChannel;\n+import com.github.ambry.rest.RestServiceErrorCode;\n+import com.github.ambry.rest.RestServiceException;\n+import com.github.ambry.rest.RestUtils;\n+import com.github.ambry.router.GetBlobOptionsBuilder;\n+import com.github.ambry.router.GetBlobResult;\n+import com.github.ambry.router.InMemoryRouter;\n+import com.github.ambry.router.PutBlobOptionsBuilder;\n+import com.github.ambry.router.ReadableStreamChannel;\n+import com.github.ambry.utils.TestUtils;\n+import com.github.ambry.utils.Utils;\n+import java.io.IOException;\n+import java.nio.ByteBuffer;\n+import java.util.Properties;\n+import java.util.concurrent.CountDownLatch;\n+import java.util.concurrent.TimeUnit;\n+import java.util.concurrent.atomic.AtomicReference;\n+import org.junit.Test;\n+\n+import static org.junit.Assert.*;\n+\n+\n+/**\n+ * Tests for {@link TtlUpdateHandler}.\n+ */\n+public class TtlUpdateHandlerTest {\n+  private static final InMemAccountService ACCOUNT_SERVICE =\n+      new InMemAccountServiceFactory(false, true).getAccountService();\n+  private static final Account REF_ACCOUNT = ACCOUNT_SERVICE.createAndAddRandomAccount();\n+  private static final Container REF_CONTAINER = REF_ACCOUNT.getContainerById(Container.DEFAULT_PRIVATE_CONTAINER_ID);\n+  private static final ClusterMap CLUSTER_MAP;\n+  private static final String SERVICE_ID = \"TtlUpdateHandlerTest\";\n+  private static final long TTL_SECS = 7200;","path":"ambry-frontend/src/test/java/com.github.ambry.frontend/TtlUpdateHandlerTest.java","position":63,"original_position":63,"commit_id":"1f24ad80607734aa80fac2ba34311e7e9ecb3c15","original_commit_id":"1f24ad80607734aa80fac2ba34311e7e9ecb3c15","user":{"login":"vgkholla","id":288834,"node_id":"MDQ6VXNlcjI4ODgzNA==","avatar_url":"https://avatars2.githubusercontent.com/u/288834?v=4","gravatar_id":"","url":"https://api.github.com/users/vgkholla","html_url":"https://github.com/vgkholla","followers_url":"https://api.github.com/users/vgkholla/followers","following_url":"https://api.github.com/users/vgkholla/following{/other_user}","gists_url":"https://api.github.com/users/vgkholla/gists{/gist_id}","starred_url":"https://api.github.com/users/vgkholla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vgkholla/subscriptions","organizations_url":"https://api.github.com/users/vgkholla/orgs","repos_url":"https://api.github.com/users/vgkholla/repos","events_url":"https://api.github.com/users/vgkholla/events{/privacy}","received_events_url":"https://api.github.com/users/vgkholla/received_events","type":"User","site_admin":false},"body":"Added to `com.github.ambry.utils.TestUtils`","created_at":"2018-07-10T18:31:05Z","updated_at":"2018-07-10T18:31:06Z","html_url":"https://github.com/linkedin/ambry/pull/958#discussion_r201448860","pull_request_url":"https://api.github.com/repos/linkedin/ambry/pulls/958","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/linkedin/ambry/pulls/comments/201448860"},"html":{"href":"https://github.com/linkedin/ambry/pull/958#discussion_r201448860"},"pull_request":{"href":"https://api.github.com/repos/linkedin/ambry/pulls/958"}},"in_reply_to_id":201424867},"pull_request":{"url":"https://api.github.com/repos/linkedin/ambry/pulls/958","id":195664387,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1NjY0Mzg3","html_url":"https://github.com/linkedin/ambry/pull/958","diff_url":"https://github.com/linkedin/ambry/pull/958.diff","patch_url":"https://github.com/linkedin/ambry/pull/958.patch","issue_url":"https://api.github.com/repos/linkedin/ambry/issues/958","number":958,"state":"open","locked":false,"title":"Supporting TTL update at the frontend","user":{"login":"vgkholla","id":288834,"node_id":"MDQ6VXNlcjI4ODgzNA==","avatar_url":"https://avatars2.githubusercontent.com/u/288834?v=4","gravatar_id":"","url":"https://api.github.com/users/vgkholla","html_url":"https://github.com/vgkholla","followers_url":"https://api.github.com/users/vgkholla/followers","following_url":"https://api.github.com/users/vgkholla/following{/other_user}","gists_url":"https://api.github.com/users/vgkholla/gists{/gist_id}","starred_url":"https://api.github.com/users/vgkholla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vgkholla/subscriptions","organizations_url":"https://api.github.com/users/vgkholla/orgs","repos_url":"https://api.github.com/users/vgkholla/repos","events_url":"https://api.github.com/users/vgkholla/events{/privacy}","received_events_url":"https://api.github.com/users/vgkholla/received_events","type":"User","site_admin":false},"body":"This change plugs in all the changes required to support TTL updates at the frontend","created_at":"2018-06-18T22:19:25Z","updated_at":"2018-07-10T18:31:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"72f1317213e28c7cbcd670f56a0e4946a3376b3d","assignee":{"login":"vgkholla","id":288834,"node_id":"MDQ6VXNlcjI4ODgzNA==","avatar_url":"https://avatars2.githubusercontent.com/u/288834?v=4","gravatar_id":"","url":"https://api.github.com/users/vgkholla","html_url":"https://github.com/vgkholla","followers_url":"https://api.github.com/users/vgkholla/followers","following_url":"https://api.github.com/users/vgkholla/following{/other_user}","gists_url":"https://api.github.com/users/vgkholla/gists{/gist_id}","starred_url":"https://api.github.com/users/vgkholla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vgkholla/subscriptions","organizations_url":"https://api.github.com/users/vgkholla/orgs","repos_url":"https://api.github.com/users/vgkholla/repos","events_url":"https://api.github.com/users/vgkholla/events{/privacy}","received_events_url":"https://api.github.com/users/vgkholla/received_events","type":"User","site_admin":false},"assignees":[{"login":"vgkholla","id":288834,"node_id":"MDQ6VXNlcjI4ODgzNA==","avatar_url":"https://avatars2.githubusercontent.com/u/288834?v=4","gravatar_id":"","url":"https://api.github.com/users/vgkholla","html_url":"https://github.com/vgkholla","followers_url":"https://api.github.com/users/vgkholla/followers","following_url":"https://api.github.com/users/vgkholla/following{/other_user}","gists_url":"https://api.github.com/users/vgkholla/gists{/gist_id}","starred_url":"https://api.github.com/users/vgkholla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vgkholla/subscriptions","organizations_url":"https://api.github.com/users/vgkholla/orgs","repos_url":"https://api.github.com/users/vgkholla/repos","events_url":"https://api.github.com/users/vgkholla/events{/privacy}","received_events_url":"https://api.github.com/users/vgkholla/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":62686637,"node_id":"MDU6TGFiZWw2MjY4NjYzNw==","url":"https://api.github.com/repos/linkedin/ambry/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"milestone":null,"commits_url":"https://api.github.com/repos/linkedin/ambry/pulls/958/commits","review_comments_url":"https://api.github.com/repos/linkedin/ambry/pulls/958/comments","review_comment_url":"https://api.github.com/repos/linkedin/ambry/pulls/comments{/number}","comments_url":"https://api.github.com/repos/linkedin/ambry/issues/958/comments","statuses_url":"https://api.github.com/repos/linkedin/ambry/statuses/1f24ad80607734aa80fac2ba34311e7e9ecb3c15","head":{"label":"vgkholla:TtlUpdateFrontendFinal","ref":"TtlUpdateFrontendFinal","sha":"1f24ad80607734aa80fac2ba34311e7e9ecb3c15","user":{"login":"vgkholla","id":288834,"node_id":"MDQ6VXNlcjI4ODgzNA==","avatar_url":"https://avatars2.githubusercontent.com/u/288834?v=4","gravatar_id":"","url":"https://api.github.com/users/vgkholla","html_url":"https://github.com/vgkholla","followers_url":"https://api.github.com/users/vgkholla/followers","following_url":"https://api.github.com/users/vgkholla/following{/other_user}","gists_url":"https://api.github.com/users/vgkholla/gists{/gist_id}","starred_url":"https://api.github.com/users/vgkholla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vgkholla/subscriptions","organizations_url":"https://api.github.com/users/vgkholla/orgs","repos_url":"https://api.github.com/users/vgkholla/repos","events_url":"https://api.github.com/users/vgkholla/events{/privacy}","received_events_url":"https://api.github.com/users/vgkholla/received_events","type":"User","site_admin":false},"repo":{"id":33381520,"node_id":"MDEwOlJlcG9zaXRvcnkzMzM4MTUyMA==","name":"ambry","full_name":"vgkholla/ambry","owner":{"login":"vgkholla","id":288834,"node_id":"MDQ6VXNlcjI4ODgzNA==","avatar_url":"https://avatars2.githubusercontent.com/u/288834?v=4","gravatar_id":"","url":"https://api.github.com/users/vgkholla","html_url":"https://github.com/vgkholla","followers_url":"https://api.github.com/users/vgkholla/followers","following_url":"https://api.github.com/users/vgkholla/following{/other_user}","gists_url":"https://api.github.com/users/vgkholla/gists{/gist_id}","starred_url":"https://api.github.com/users/vgkholla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vgkholla/subscriptions","organizations_url":"https://api.github.com/users/vgkholla/orgs","repos_url":"https://api.github.com/users/vgkholla/repos","events_url":"https://api.github.com/users/vgkholla/events{/privacy}","received_events_url":"https://api.github.com/users/vgkholla/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vgkholla/ambry","description":"Immutable blob store","fork":true,"url":"https://api.github.com/repos/vgkholla/ambry","forks_url":"https://api.github.com/repos/vgkholla/ambry/forks","keys_url":"https://api.github.com/repos/vgkholla/ambry/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vgkholla/ambry/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vgkholla/ambry/teams","hooks_url":"https://api.github.com/repos/vgkholla/ambry/hooks","issue_events_url":"https://api.github.com/repos/vgkholla/ambry/issues/events{/number}","events_url":"https://api.github.com/repos/vgkholla/ambry/events","assignees_url":"https://api.github.com/repos/vgkholla/ambry/assignees{/user}","branches_url":"https://api.github.com/repos/vgkholla/ambry/branches{/branch}","tags_url":"https://api.github.com/repos/vgkholla/ambry/tags","blobs_url":"https://api.github.com/repos/vgkholla/ambry/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vgkholla/ambry/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vgkholla/ambry/git/refs{/sha}","trees_url":"https://api.github.com/repos/vgkholla/ambry/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vgkholla/ambry/statuses/{sha}","languages_url":"https://api.github.com/repos/vgkholla/ambry/languages","stargazers_url":"https://api.github.com/repos/vgkholla/ambry/stargazers","contributors_url":"https://api.github.com/repos/vgkholla/ambry/contributors","subscribers_url":"https://api.github.com/repos/vgkholla/ambry/subscribers","subscription_url":"https://api.github.com/repos/vgkholla/ambry/subscription","commits_url":"https://api.github.com/repos/vgkholla/ambry/commits{/sha}","git_commits_url":"https://api.github.com/repos/vgkholla/ambry/git/commits{/sha}","comments_url":"https://api.github.com/repos/vgkholla/ambry/comments{/number}","issue_comment_url":"https://api.github.com/repos/vgkholla/ambry/issues/comments{/number}","contents_url":"https://api.github.com/repos/vgkholla/ambry/contents/{+path}","compare_url":"https://api.github.com/repos/vgkholla/ambry/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vgkholla/ambry/merges","archive_url":"https://api.github.com/repos/vgkholla/ambry/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vgkholla/ambry/downloads","issues_url":"https://api.github.com/repos/vgkholla/ambry/issues{/number}","pulls_url":"https://api.github.com/repos/vgkholla/ambry/pulls{/number}","milestones_url":"https://api.github.com/repos/vgkholla/ambry/milestones{/number}","notifications_url":"https://api.github.com/repos/vgkholla/ambry/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vgkholla/ambry/labels{/name}","releases_url":"https://api.github.com/repos/vgkholla/ambry/releases{/id}","deployments_url":"https://api.github.com/repos/vgkholla/ambry/deployments","created_at":"2015-04-03T20:29:52Z","updated_at":"2018-06-30T01:10:49Z","pushed_at":"2018-07-10T18:15:46Z","git_url":"git://github.com/vgkholla/ambry.git","ssh_url":"git@github.com:vgkholla/ambry.git","clone_url":"https://github.com/vgkholla/ambry.git","svn_url":"https://github.com/vgkholla/ambry","homepage":null,"size":14207,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"linkedin:master","ref":"master","sha":"8e7d6ea752c726200d74e83b85a574c5b27d9140","user":{"login":"linkedin","id":357098,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1NzA5OA==","avatar_url":"https://avatars3.githubusercontent.com/u/357098?v=4","gravatar_id":"","url":"https://api.github.com/users/linkedin","html_url":"https://github.com/linkedin","followers_url":"https://api.github.com/users/linkedin/followers","following_url":"https://api.github.com/users/linkedin/following{/other_user}","gists_url":"https://api.github.com/users/linkedin/gists{/gist_id}","starred_url":"https://api.github.com/users/linkedin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linkedin/subscriptions","organizations_url":"https://api.github.com/users/linkedin/orgs","repos_url":"https://api.github.com/users/linkedin/repos","events_url":"https://api.github.com/users/linkedin/events{/privacy}","received_events_url":"https://api.github.com/users/linkedin/received_events","type":"Organization","site_admin":false},"repo":{"id":13870893,"node_id":"MDEwOlJlcG9zaXRvcnkxMzg3MDg5Mw==","name":"ambry","full_name":"linkedin/ambry","owner":{"login":"linkedin","id":357098,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1NzA5OA==","avatar_url":"https://avatars3.githubusercontent.com/u/357098?v=4","gravatar_id":"","url":"https://api.github.com/users/linkedin","html_url":"https://github.com/linkedin","followers_url":"https://api.github.com/users/linkedin/followers","following_url":"https://api.github.com/users/linkedin/following{/other_user}","gists_url":"https://api.github.com/users/linkedin/gists{/gist_id}","starred_url":"https://api.github.com/users/linkedin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linkedin/subscriptions","organizations_url":"https://api.github.com/users/linkedin/orgs","repos_url":"https://api.github.com/users/linkedin/repos","events_url":"https://api.github.com/users/linkedin/events{/privacy}","received_events_url":"https://api.github.com/users/linkedin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/linkedin/ambry","description":"Distributed object store","fork":false,"url":"https://api.github.com/repos/linkedin/ambry","forks_url":"https://api.github.com/repos/linkedin/ambry/forks","keys_url":"https://api.github.com/repos/linkedin/ambry/keys{/key_id}","collaborators_url":"https://api.github.com/repos/linkedin/ambry/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/linkedin/ambry/teams","hooks_url":"https://api.github.com/repos/linkedin/ambry/hooks","issue_events_url":"https://api.github.com/repos/linkedin/ambry/issues/events{/number}","events_url":"https://api.github.com/repos/linkedin/ambry/events","assignees_url":"https://api.github.com/repos/linkedin/ambry/assignees{/user}","branches_url":"https://api.github.com/repos/linkedin/ambry/branches{/branch}","tags_url":"https://api.github.com/repos/linkedin/ambry/tags","blobs_url":"https://api.github.com/repos/linkedin/ambry/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/linkedin/ambry/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/linkedin/ambry/git/refs{/sha}","trees_url":"https://api.github.com/repos/linkedin/ambry/git/trees{/sha}","statuses_url":"https://api.github.com/repos/linkedin/ambry/statuses/{sha}","languages_url":"https://api.github.com/repos/linkedin/ambry/languages","stargazers_url":"https://api.github.com/repos/linkedin/ambry/stargazers","contributors_url":"https://api.github.com/repos/linkedin/ambry/contributors","subscribers_url":"https://api.github.com/repos/linkedin/ambry/subscribers","subscription_url":"https://api.github.com/repos/linkedin/ambry/subscription","commits_url":"https://api.github.com/repos/linkedin/ambry/commits{/sha}","git_commits_url":"https://api.github.com/repos/linkedin/ambry/git/commits{/sha}","comments_url":"https://api.github.com/repos/linkedin/ambry/comments{/number}","issue_comment_url":"https://api.github.com/repos/linkedin/ambry/issues/comments{/number}","contents_url":"https://api.github.com/repos/linkedin/ambry/contents/{+path}","compare_url":"https://api.github.com/repos/linkedin/ambry/compare/{base}...{head}","merges_url":"https://api.github.com/repos/linkedin/ambry/merges","archive_url":"https://api.github.com/repos/linkedin/ambry/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/linkedin/ambry/downloads","issues_url":"https://api.github.com/repos/linkedin/ambry/issues{/number}","pulls_url":"https://api.github.com/repos/linkedin/ambry/pulls{/number}","milestones_url":"https://api.github.com/repos/linkedin/ambry/milestones{/number}","notifications_url":"https://api.github.com/repos/linkedin/ambry/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/linkedin/ambry/labels{/name}","releases_url":"https://api.github.com/repos/linkedin/ambry/releases{/id}","deployments_url":"https://api.github.com/repos/linkedin/ambry/deployments","created_at":"2013-10-25T20:04:54Z","updated_at":"2018-07-10T05:31:48Z","pushed_at":"2018-07-10T18:15:48Z","git_url":"git://github.com/linkedin/ambry.git","ssh_url":"git@github.com:linkedin/ambry.git","clone_url":"https://github.com/linkedin/ambry.git","svn_url":"https://github.com/linkedin/ambry","homepage":"https://github.com/linkedin/ambry/wiki","size":13036,"stargazers_count":1076,"watchers_count":1076,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":205,"mirror_url":null,"archived":false,"open_issues_count":107,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":205,"open_issues":107,"watchers":1076,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/linkedin/ambry/pulls/958"},"html":{"href":"https://github.com/linkedin/ambry/pull/958"},"issue":{"href":"https://api.github.com/repos/linkedin/ambry/issues/958"},"comments":{"href":"https://api.github.com/repos/linkedin/ambry/issues/958/comments"},"review_comments":{"href":"https://api.github.com/repos/linkedin/ambry/pulls/958/comments"},"review_comment":{"href":"https://api.github.com/repos/linkedin/ambry/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/linkedin/ambry/pulls/958/commits"},"statuses":{"href":"https://api.github.com/repos/linkedin/ambry/statuses/1f24ad80607734aa80fac2ba34311e7e9ecb3c15"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"vgkholla"}}