{"action":"created","comment":{"url":"https://api.github.com/repos/apache/jackrabbit-oak/pulls/comments/201060336","pull_request_review_id":135488269,"id":201060336,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMTA2MDMzNg==","diff_hunk":"@@ -17,59 +17,64 @@\n \n package org.apache.jackrabbit.oak.blob.cloud.s3;\n \n+import static com.google.common.collect.Iterables.filter;\n+import static java.lang.Thread.currentThread;\n+\n import java.io.ByteArrayInputStream;\n import java.io.File;\n import java.io.IOException;\n import java.io.InputStream;\n+import java.net.URL;\n import java.util.ArrayList;\n+import java.util.Collection;\n import java.util.Collections;\n import java.util.Date;\n import java.util.Iterator;\n import java.util.List;\n import java.util.Map;\n import java.util.Properties;\n import java.util.Queue;\n+import java.util.UUID;\n import java.util.concurrent.ExecutorService;\n import java.util.concurrent.Executors;\n import java.util.concurrent.TimeUnit;\n \n+import javax.annotation.Nonnull;\n+\n import com.amazonaws.AmazonClientException;\n import com.amazonaws.AmazonServiceException;\n+import com.amazonaws.HttpMethod;\n import com.amazonaws.regions.Regions;\n import com.amazonaws.services.s3.AmazonS3Client;\n-import com.amazonaws.services.s3.model.CopyObjectRequest;\n-import com.amazonaws.services.s3.model.DeleteObjectsRequest;\n-import com.amazonaws.services.s3.model.DeleteObjectsResult;\n-import com.amazonaws.services.s3.model.ListObjectsRequest;\n-import com.amazonaws.services.s3.model.ObjectListing;\n-import com.amazonaws.services.s3.model.ObjectMetadata;\n-import com.amazonaws.services.s3.model.PutObjectRequest;\n-import com.amazonaws.services.s3.model.Region;\n-import com.amazonaws.services.s3.model.S3Object;\n-import com.amazonaws.services.s3.model.S3ObjectSummary;\n+import com.amazonaws.services.s3.S3ClientOptions;\n+import com.amazonaws.services.s3.model.*;","path":"oak-blob-cloud/src/main/java/org/apache/jackrabbit/oak/blob/cloud/s3/S3Backend.java","position":44,"original_position":44,"commit_id":"ee8b36ff45bbdee251cc7070c7d3dd39d4d3a1b4","original_commit_id":"260d9acc6299570eabe3998c4325661a8d1ab8ad","user":{"login":"mattvryan","id":484088,"node_id":"MDQ6VXNlcjQ4NDA4OA==","avatar_url":"https://avatars3.githubusercontent.com/u/484088?v=4","gravatar_id":"","url":"https://api.github.com/users/mattvryan","html_url":"https://github.com/mattvryan","followers_url":"https://api.github.com/users/mattvryan/followers","following_url":"https://api.github.com/users/mattvryan/following{/other_user}","gists_url":"https://api.github.com/users/mattvryan/gists{/gist_id}","starred_url":"https://api.github.com/users/mattvryan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattvryan/subscriptions","organizations_url":"https://api.github.com/users/mattvryan/orgs","repos_url":"https://api.github.com/users/mattvryan/repos","events_url":"https://api.github.com/users/mattvryan/events{/privacy}","received_events_url":"https://api.github.com/users/mattvryan/received_events","type":"User","site_admin":false},"body":"Thanks @reschke will fix.  Not sure why this ended up in there, my IDE is configured to NOT do this.","created_at":"2018-07-09T16:10:33Z","updated_at":"2018-07-09T16:10:34Z","html_url":"https://github.com/apache/jackrabbit-oak/pull/88#discussion_r201060336","pull_request_url":"https://api.github.com/repos/apache/jackrabbit-oak/pulls/88","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/apache/jackrabbit-oak/pulls/comments/201060336"},"html":{"href":"https://github.com/apache/jackrabbit-oak/pull/88#discussion_r201060336"},"pull_request":{"href":"https://api.github.com/repos/apache/jackrabbit-oak/pulls/88"}},"in_reply_to_id":197606537},"pull_request":{"url":"https://api.github.com/repos/apache/jackrabbit-oak/pulls/88","id":195904223,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1OTA0MjIz","html_url":"https://github.com/apache/jackrabbit-oak/pull/88","diff_url":"https://github.com/apache/jackrabbit-oak/pull/88.diff","patch_url":"https://github.com/apache/jackrabbit-oak/pull/88.patch","issue_url":"https://api.github.com/repos/apache/jackrabbit-oak/issues/88","number":88,"state":"open","locked":false,"title":"Oak Direct Binary Access (GET and PUT) feature","user":{"login":"mattvryan","id":484088,"node_id":"MDQ6VXNlcjQ4NDA4OA==","avatar_url":"https://avatars3.githubusercontent.com/u/484088?v=4","gravatar_id":"","url":"https://api.github.com/users/mattvryan","html_url":"https://github.com/mattvryan","followers_url":"https://api.github.com/users/mattvryan/followers","following_url":"https://api.github.com/users/mattvryan/following{/other_user}","gists_url":"https://api.github.com/users/mattvryan/gists{/gist_id}","starred_url":"https://api.github.com/users/mattvryan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattvryan/subscriptions","organizations_url":"https://api.github.com/users/mattvryan/orgs","repos_url":"https://api.github.com/users/mattvryan/repos","events_url":"https://api.github.com/users/mattvryan/events{/privacy}","received_events_url":"https://api.github.com/users/mattvryan/received_events","type":"User","site_admin":false},"body":"This pull request adds a direct binary access feature to Oak for both storing and retrieving binary content.  This feature will work only with data stores that support direct access via URLs (e.g. `S3DataStore` and `AzureDataStore`).  The feature is described in more detail at https://wiki.apache.org/jackrabbit/Direct%20Binary%20Access.\r\n\r\nFor storing content a three-step process is required.  A client first initiates an upload, in which the JCR path to the desired storage location, the expected size of the binary to be stored, and the number of upload URLs that can be accepted are all given as parameters.  A successful call results in an object being returned that contains information needed to complete a successful upload to the storage location, including URLs to use for storing the data.  Multiple URLs may be returned allowing multi-part uploading.  After the second step (uploading the binary) is complete, the client then completes the upload in which a signed token is provided, which was included in the response from the initiate call.  This indicates to the storage provider that the upload is complete (and associates the parts, for multi-part uploads) and returns a `Binary` object, which can then be stored as a JCR node property.  Thus no `Binary` exists in the JCR until the blob itself is stored and confirmed.\r\n\r\nFor retrieving content, a client requests a URL for an existing `Binary` object that was already retrieved from the JCR.  The response is a URL that can be used to directly access the corresponding blob.\r\n\r\nIt is assumed that URLs for both uploading and downloading are time-limited and signed.  This is true for both S3 and Azure.\r\n\r\nFor uploading, the `SessionImpl` checks the path provided to ensure that the active session has permission to add a property at the requested path.  No upload object is returned if the session has insufficient permission.  Without an upload object, the client gets no upload URLs and no upload token so it is not possible to either upload or complete an upload unless permission to add the binary property has been established.\r\n\r\nFor downloading, a valid `BinaryImpl` must be provided, which had to have been obtained via a prior authorized call, so likewise no download URL can be obtained unless permission to read the binary has been established.","created_at":"2018-06-19T17:34:56Z","updated_at":"2018-07-09T16:10:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"af37389bc28f22f05bfa146e8982442d202d6cd0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/jackrabbit-oak/pulls/88/commits","review_comments_url":"https://api.github.com/repos/apache/jackrabbit-oak/pulls/88/comments","review_comment_url":"https://api.github.com/repos/apache/jackrabbit-oak/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/jackrabbit-oak/issues/88/comments","statuses_url":"https://api.github.com/repos/apache/jackrabbit-oak/statuses/ee8b36ff45bbdee251cc7070c7d3dd39d4d3a1b4","head":{"label":"mattvryan:direct-binary-access","ref":"direct-binary-access","sha":"ee8b36ff45bbdee251cc7070c7d3dd39d4d3a1b4","user":{"login":"mattvryan","id":484088,"node_id":"MDQ6VXNlcjQ4NDA4OA==","avatar_url":"https://avatars3.githubusercontent.com/u/484088?v=4","gravatar_id":"","url":"https://api.github.com/users/mattvryan","html_url":"https://github.com/mattvryan","followers_url":"https://api.github.com/users/mattvryan/followers","following_url":"https://api.github.com/users/mattvryan/following{/other_user}","gists_url":"https://api.github.com/users/mattvryan/gists{/gist_id}","starred_url":"https://api.github.com/users/mattvryan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattvryan/subscriptions","organizations_url":"https://api.github.com/users/mattvryan/orgs","repos_url":"https://api.github.com/users/mattvryan/repos","events_url":"https://api.github.com/users/mattvryan/events{/privacy}","received_events_url":"https://api.github.com/users/mattvryan/received_events","type":"User","site_admin":false},"repo":{"id":68248870,"node_id":"MDEwOlJlcG9zaXRvcnk2ODI0ODg3MA==","name":"jackrabbit-oak","full_name":"mattvryan/jackrabbit-oak","owner":{"login":"mattvryan","id":484088,"node_id":"MDQ6VXNlcjQ4NDA4OA==","avatar_url":"https://avatars3.githubusercontent.com/u/484088?v=4","gravatar_id":"","url":"https://api.github.com/users/mattvryan","html_url":"https://github.com/mattvryan","followers_url":"https://api.github.com/users/mattvryan/followers","following_url":"https://api.github.com/users/mattvryan/following{/other_user}","gists_url":"https://api.github.com/users/mattvryan/gists{/gist_id}","starred_url":"https://api.github.com/users/mattvryan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattvryan/subscriptions","organizations_url":"https://api.github.com/users/mattvryan/orgs","repos_url":"https://api.github.com/users/mattvryan/repos","events_url":"https://api.github.com/users/mattvryan/events{/privacy}","received_events_url":"https://api.github.com/users/mattvryan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mattvryan/jackrabbit-oak","description":"Mirror of Apache Jackrabbit Oak","fork":true,"url":"https://api.github.com/repos/mattvryan/jackrabbit-oak","forks_url":"https://api.github.com/repos/mattvryan/jackrabbit-oak/forks","keys_url":"https://api.github.com/repos/mattvryan/jackrabbit-oak/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mattvryan/jackrabbit-oak/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mattvryan/jackrabbit-oak/teams","hooks_url":"https://api.github.com/repos/mattvryan/jackrabbit-oak/hooks","issue_events_url":"https://api.github.com/repos/mattvryan/jackrabbit-oak/issues/events{/number}","events_url":"https://api.github.com/repos/mattvryan/jackrabbit-oak/events","assignees_url":"https://api.github.com/repos/mattvryan/jackrabbit-oak/assignees{/user}","branches_url":"https://api.github.com/repos/mattvryan/jackrabbit-oak/branches{/branch}","tags_url":"https://api.github.com/repos/mattvryan/jackrabbit-oak/tags","blobs_url":"https://api.github.com/repos/mattvryan/jackrabbit-oak/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mattvryan/jackrabbit-oak/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mattvryan/jackrabbit-oak/git/refs{/sha}","trees_url":"https://api.github.com/repos/mattvryan/jackrabbit-oak/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mattvryan/jackrabbit-oak/statuses/{sha}","languages_url":"https://api.github.com/repos/mattvryan/jackrabbit-oak/languages","stargazers_url":"https://api.github.com/repos/mattvryan/jackrabbit-oak/stargazers","contributors_url":"https://api.github.com/repos/mattvryan/jackrabbit-oak/contributors","subscribers_url":"https://api.github.com/repos/mattvryan/jackrabbit-oak/subscribers","subscription_url":"https://api.github.com/repos/mattvryan/jackrabbit-oak/subscription","commits_url":"https://api.github.com/repos/mattvryan/jackrabbit-oak/commits{/sha}","git_commits_url":"https://api.github.com/repos/mattvryan/jackrabbit-oak/git/commits{/sha}","comments_url":"https://api.github.com/repos/mattvryan/jackrabbit-oak/comments{/number}","issue_comment_url":"https://api.github.com/repos/mattvryan/jackrabbit-oak/issues/comments{/number}","contents_url":"https://api.github.com/repos/mattvryan/jackrabbit-oak/contents/{+path}","compare_url":"https://api.github.com/repos/mattvryan/jackrabbit-oak/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mattvryan/jackrabbit-oak/merges","archive_url":"https://api.github.com/repos/mattvryan/jackrabbit-oak/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mattvryan/jackrabbit-oak/downloads","issues_url":"https://api.github.com/repos/mattvryan/jackrabbit-oak/issues{/number}","pulls_url":"https://api.github.com/repos/mattvryan/jackrabbit-oak/pulls{/number}","milestones_url":"https://api.github.com/repos/mattvryan/jackrabbit-oak/milestones{/number}","notifications_url":"https://api.github.com/repos/mattvryan/jackrabbit-oak/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mattvryan/jackrabbit-oak/labels{/name}","releases_url":"https://api.github.com/repos/mattvryan/jackrabbit-oak/releases{/id}","deployments_url":"https://api.github.com/repos/mattvryan/jackrabbit-oak/deployments","created_at":"2016-09-14T22:35:30Z","updated_at":"2018-06-21T20:55:54Z","pushed_at":"2018-06-26T23:02:13Z","git_url":"git://github.com/mattvryan/jackrabbit-oak.git","ssh_url":"git@github.com:mattvryan/jackrabbit-oak.git","clone_url":"https://github.com/mattvryan/jackrabbit-oak.git","svn_url":"https://github.com/mattvryan/jackrabbit-oak","homepage":null,"size":78277,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"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":"trunk"}},"base":{"label":"apache:trunk","ref":"trunk","sha":"be142a7663950c808fae48f4486a537e655cddbc","user":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":3657930,"node_id":"MDEwOlJlcG9zaXRvcnkzNjU3OTMw","name":"jackrabbit-oak","full_name":"apache/jackrabbit-oak","owner":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/jackrabbit-oak","description":"Mirror of Apache Jackrabbit Oak","fork":false,"url":"https://api.github.com/repos/apache/jackrabbit-oak","forks_url":"https://api.github.com/repos/apache/jackrabbit-oak/forks","keys_url":"https://api.github.com/repos/apache/jackrabbit-oak/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/jackrabbit-oak/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/jackrabbit-oak/teams","hooks_url":"https://api.github.com/repos/apache/jackrabbit-oak/hooks","issue_events_url":"https://api.github.com/repos/apache/jackrabbit-oak/issues/events{/number}","events_url":"https://api.github.com/repos/apache/jackrabbit-oak/events","assignees_url":"https://api.github.com/repos/apache/jackrabbit-oak/assignees{/user}","branches_url":"https://api.github.com/repos/apache/jackrabbit-oak/branches{/branch}","tags_url":"https://api.github.com/repos/apache/jackrabbit-oak/tags","blobs_url":"https://api.github.com/repos/apache/jackrabbit-oak/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/jackrabbit-oak/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/jackrabbit-oak/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/jackrabbit-oak/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/jackrabbit-oak/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/jackrabbit-oak/languages","stargazers_url":"https://api.github.com/repos/apache/jackrabbit-oak/stargazers","contributors_url":"https://api.github.com/repos/apache/jackrabbit-oak/contributors","subscribers_url":"https://api.github.com/repos/apache/jackrabbit-oak/subscribers","subscription_url":"https://api.github.com/repos/apache/jackrabbit-oak/subscription","commits_url":"https://api.github.com/repos/apache/jackrabbit-oak/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/jackrabbit-oak/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/jackrabbit-oak/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/jackrabbit-oak/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/jackrabbit-oak/contents/{+path}","compare_url":"https://api.github.com/repos/apache/jackrabbit-oak/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/jackrabbit-oak/merges","archive_url":"https://api.github.com/repos/apache/jackrabbit-oak/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/jackrabbit-oak/downloads","issues_url":"https://api.github.com/repos/apache/jackrabbit-oak/issues{/number}","pulls_url":"https://api.github.com/repos/apache/jackrabbit-oak/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/jackrabbit-oak/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/jackrabbit-oak/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/jackrabbit-oak/labels{/name}","releases_url":"https://api.github.com/repos/apache/jackrabbit-oak/releases{/id}","deployments_url":"https://api.github.com/repos/apache/jackrabbit-oak/deployments","created_at":"2012-03-08T08:00:14Z","updated_at":"2018-07-09T12:49:23Z","pushed_at":"2018-07-09T15:49:16Z","git_url":"git://github.com/apache/jackrabbit-oak.git","ssh_url":"git@github.com:apache/jackrabbit-oak.git","clone_url":"https://github.com/apache/jackrabbit-oak.git","svn_url":"https://github.com/apache/jackrabbit-oak","homepage":null,"size":79590,"stargazers_count":238,"watchers_count":238,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":252,"mirror_url":null,"archived":false,"open_issues_count":56,"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":252,"open_issues":56,"watchers":238,"default_branch":"trunk"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/jackrabbit-oak/pulls/88"},"html":{"href":"https://github.com/apache/jackrabbit-oak/pull/88"},"issue":{"href":"https://api.github.com/repos/apache/jackrabbit-oak/issues/88"},"comments":{"href":"https://api.github.com/repos/apache/jackrabbit-oak/issues/88/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/jackrabbit-oak/pulls/88/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/jackrabbit-oak/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/jackrabbit-oak/pulls/88/commits"},"statuses":{"href":"https://api.github.com/repos/apache/jackrabbit-oak/statuses/ee8b36ff45bbdee251cc7070c7d3dd39d4d3a1b4"}},"author_association":"NONE"}}
{"actor":{"display_login":"mattvryan"}}