{"action":"created","comment":{"url":"https://api.github.com/repos/jclouds/jclouds-examples/pulls/comments/77902722","id":77902722,"diff_hunk":"@@ -51,34 +59,45 @@\n     *\n     * The first argument (args[0]) must be your username\n     * The second argument (args[1]) must be your API key\n-    * The third argument (args[2]) must be the absolute path to a large file\n     */\n    public static void main(String[] args) throws IOException {\n       UploadLargeObject createContainer = new UploadLargeObject(args[0], args[1]);\n+      File largeFile = new File(\"largefile.dat\");\n+      File downloadedFile = new File(largeFile.getName()+\".downloaded\");\n \n       try {\n-         createContainer.uploadLargeObjectFromFile(new File(args[2]));\n+         // Create a 200MB file for this example\n+         createContainer.createRandomFile(200000000, largeFile);\n+         createContainer.uploadLargeObjectFromFile(largeFile);\n+         createContainer.downloadLargeObjectToFile(largeFile.getName());\n+         System.out.println(\"Random     file hash: \" + Files.hash(largeFile, Hashing.md5()));\n+         System.out.println(\"Downloaded file hash: \" + Files.hash(downloadedFile, Hashing.md5()));\n       }\n       catch (Exception e) {\n          e.printStackTrace();\n       }\n       finally {\n+         createContainer.cleanup();\n          createContainer.close();\n+         if(largeFile.exists()) largeFile.delete();\n+         if(downloadedFile.exists()) downloadedFile.delete();\n       }\n    }\n \n    public UploadLargeObject(String username, String apiKey) {\n       Properties overrides = new Properties();\n       // This property controls the number of parts being uploaded in parallel, the default is 4\n-      overrides.setProperty(\"jclouds.mpu.parallel.degree\", \"5\");\n+      overrides.setProperty(\"jclouds.user-threads\", \"14\");\n       // This property controls the size (in bytes) of parts being uploaded in parallel, the default is 33554432 bytes = 32 MB\n-      overrides.setProperty(\"jclouds.mpu.parts.size\", \"67108864\"); // 64 MB\n+      overrides.setProperty(\"jclouds.mpu.parts.size\", \"1100000\"); // 1 MB","path":"rackspace/src/main/java/org/jclouds/examples/rackspace/cloudfiles/UploadLargeObject.java","position":62,"original_position":62,"commit_id":"533c7b6cd0ddbc925f43f1ea4a9b75b071802ac9","original_commit_id":"533c7b6cd0ddbc925f43f1ea4a9b75b071802ac9","user":{"login":"zack-shoylev","id":3600302,"avatar_url":"https://avatars.githubusercontent.com/u/3600302?v=3","gravatar_id":"","url":"https://api.github.com/users/zack-shoylev","html_url":"https://github.com/zack-shoylev","followers_url":"https://api.github.com/users/zack-shoylev/followers","following_url":"https://api.github.com/users/zack-shoylev/following{/other_user}","gists_url":"https://api.github.com/users/zack-shoylev/gists{/gist_id}","starred_url":"https://api.github.com/users/zack-shoylev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zack-shoylev/subscriptions","organizations_url":"https://api.github.com/users/zack-shoylev/orgs","repos_url":"https://api.github.com/users/zack-shoylev/repos","events_url":"https://api.github.com/users/zack-shoylev/events{/privacy}","received_events_url":"https://api.github.com/users/zack-shoylev/received_events","type":"User","site_admin":false},"body":"I don't think this does anything at all, though....","created_at":"2016-09-07T20:59:47Z","updated_at":"2016-09-07T20:59:47Z","html_url":"https://github.com/jclouds/jclouds-examples/pull/89#discussion_r77902722","pull_request_url":"https://api.github.com/repos/jclouds/jclouds-examples/pulls/89","_links":{"self":{"href":"https://api.github.com/repos/jclouds/jclouds-examples/pulls/comments/77902722"},"html":{"href":"https://github.com/jclouds/jclouds-examples/pull/89#discussion_r77902722"},"pull_request":{"href":"https://api.github.com/repos/jclouds/jclouds-examples/pulls/89"}}},"pull_request":{"url":"https://api.github.com/repos/jclouds/jclouds-examples/pulls/89","id":84368010,"html_url":"https://github.com/jclouds/jclouds-examples/pull/89","diff_url":"https://github.com/jclouds/jclouds-examples/pull/89.diff","patch_url":"https://github.com/jclouds/jclouds-examples/pull/89.patch","issue_url":"https://api.github.com/repos/jclouds/jclouds-examples/issues/89","number":89,"state":"open","locked":false,"title":"Updates to the parallel examples, using the new code.","user":{"login":"zack-shoylev","id":3600302,"avatar_url":"https://avatars.githubusercontent.com/u/3600302?v=3","gravatar_id":"","url":"https://api.github.com/users/zack-shoylev","html_url":"https://github.com/zack-shoylev","followers_url":"https://api.github.com/users/zack-shoylev/followers","following_url":"https://api.github.com/users/zack-shoylev/following{/other_user}","gists_url":"https://api.github.com/users/zack-shoylev/gists{/gist_id}","starred_url":"https://api.github.com/users/zack-shoylev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zack-shoylev/subscriptions","organizations_url":"https://api.github.com/users/zack-shoylev/orgs","repos_url":"https://api.github.com/users/zack-shoylev/repos","events_url":"https://api.github.com/users/zack-shoylev/events{/privacy}","received_events_url":"https://api.github.com/users/zack-shoylev/received_events","type":"User","site_admin":false},"body":"note: Uses SNAPSHOT jclouds, defer merge?","created_at":"2016-09-07T20:30:50Z","updated_at":"2016-09-07T20:59:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1dd044512464c403bb8543918c6444730ad7e2bf","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/jclouds/jclouds-examples/pulls/89/commits","review_comments_url":"https://api.github.com/repos/jclouds/jclouds-examples/pulls/89/comments","review_comment_url":"https://api.github.com/repos/jclouds/jclouds-examples/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jclouds/jclouds-examples/issues/89/comments","statuses_url":"https://api.github.com/repos/jclouds/jclouds-examples/statuses/533c7b6cd0ddbc925f43f1ea4a9b75b071802ac9","head":{"label":"rackerlabs:parallel-examples-updated","ref":"parallel-examples-updated","sha":"533c7b6cd0ddbc925f43f1ea4a9b75b071802ac9","user":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":10064814,"name":"jclouds-examples","full_name":"rackerlabs/jclouds-examples","owner":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rackerlabs/jclouds-examples","description":"Read-only mirror of ASF Git Repo for jclouds examples","fork":true,"url":"https://api.github.com/repos/rackerlabs/jclouds-examples","forks_url":"https://api.github.com/repos/rackerlabs/jclouds-examples/forks","keys_url":"https://api.github.com/repos/rackerlabs/jclouds-examples/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rackerlabs/jclouds-examples/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rackerlabs/jclouds-examples/teams","hooks_url":"https://api.github.com/repos/rackerlabs/jclouds-examples/hooks","issue_events_url":"https://api.github.com/repos/rackerlabs/jclouds-examples/issues/events{/number}","events_url":"https://api.github.com/repos/rackerlabs/jclouds-examples/events","assignees_url":"https://api.github.com/repos/rackerlabs/jclouds-examples/assignees{/user}","branches_url":"https://api.github.com/repos/rackerlabs/jclouds-examples/branches{/branch}","tags_url":"https://api.github.com/repos/rackerlabs/jclouds-examples/tags","blobs_url":"https://api.github.com/repos/rackerlabs/jclouds-examples/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rackerlabs/jclouds-examples/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rackerlabs/jclouds-examples/git/refs{/sha}","trees_url":"https://api.github.com/repos/rackerlabs/jclouds-examples/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rackerlabs/jclouds-examples/statuses/{sha}","languages_url":"https://api.github.com/repos/rackerlabs/jclouds-examples/languages","stargazers_url":"https://api.github.com/repos/rackerlabs/jclouds-examples/stargazers","contributors_url":"https://api.github.com/repos/rackerlabs/jclouds-examples/contributors","subscribers_url":"https://api.github.com/repos/rackerlabs/jclouds-examples/subscribers","subscription_url":"https://api.github.com/repos/rackerlabs/jclouds-examples/subscription","commits_url":"https://api.github.com/repos/rackerlabs/jclouds-examples/commits{/sha}","git_commits_url":"https://api.github.com/repos/rackerlabs/jclouds-examples/git/commits{/sha}","comments_url":"https://api.github.com/repos/rackerlabs/jclouds-examples/comments{/number}","issue_comment_url":"https://api.github.com/repos/rackerlabs/jclouds-examples/issues/comments{/number}","contents_url":"https://api.github.com/repos/rackerlabs/jclouds-examples/contents/{+path}","compare_url":"https://api.github.com/repos/rackerlabs/jclouds-examples/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rackerlabs/jclouds-examples/merges","archive_url":"https://api.github.com/repos/rackerlabs/jclouds-examples/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rackerlabs/jclouds-examples/downloads","issues_url":"https://api.github.com/repos/rackerlabs/jclouds-examples/issues{/number}","pulls_url":"https://api.github.com/repos/rackerlabs/jclouds-examples/pulls{/number}","milestones_url":"https://api.github.com/repos/rackerlabs/jclouds-examples/milestones{/number}","notifications_url":"https://api.github.com/repos/rackerlabs/jclouds-examples/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rackerlabs/jclouds-examples/labels{/name}","releases_url":"https://api.github.com/repos/rackerlabs/jclouds-examples/releases{/id}","deployments_url":"https://api.github.com/repos/rackerlabs/jclouds-examples/deployments","created_at":"2013-05-14T20:59:19Z","updated_at":"2015-04-17T09:59:05Z","pushed_at":"2016-09-07T20:37:02Z","git_url":"git://github.com/rackerlabs/jclouds-examples.git","ssh_url":"git@github.com:rackerlabs/jclouds-examples.git","clone_url":"https://github.com/rackerlabs/jclouds-examples.git","svn_url":"https://github.com/rackerlabs/jclouds-examples","homepage":null,"size":1229,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"jclouds:master","ref":"master","sha":"ddb0cfbd40c8cd37a68a49b51adb8bb721f2b0c0","user":{"login":"jclouds","id":108982,"avatar_url":"https://avatars.githubusercontent.com/u/108982?v=3","gravatar_id":"","url":"https://api.github.com/users/jclouds","html_url":"https://github.com/jclouds","followers_url":"https://api.github.com/users/jclouds/followers","following_url":"https://api.github.com/users/jclouds/following{/other_user}","gists_url":"https://api.github.com/users/jclouds/gists{/gist_id}","starred_url":"https://api.github.com/users/jclouds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jclouds/subscriptions","organizations_url":"https://api.github.com/users/jclouds/orgs","repos_url":"https://api.github.com/users/jclouds/repos","events_url":"https://api.github.com/users/jclouds/events{/privacy}","received_events_url":"https://api.github.com/users/jclouds/received_events","type":"Organization","site_admin":false},"repo":{"id":10041016,"name":"jclouds-examples","full_name":"jclouds/jclouds-examples","owner":{"login":"jclouds","id":108982,"avatar_url":"https://avatars.githubusercontent.com/u/108982?v=3","gravatar_id":"","url":"https://api.github.com/users/jclouds","html_url":"https://github.com/jclouds","followers_url":"https://api.github.com/users/jclouds/followers","following_url":"https://api.github.com/users/jclouds/following{/other_user}","gists_url":"https://api.github.com/users/jclouds/gists{/gist_id}","starred_url":"https://api.github.com/users/jclouds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jclouds/subscriptions","organizations_url":"https://api.github.com/users/jclouds/orgs","repos_url":"https://api.github.com/users/jclouds/repos","events_url":"https://api.github.com/users/jclouds/events{/privacy}","received_events_url":"https://api.github.com/users/jclouds/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jclouds/jclouds-examples","description":"Read-only mirror of ASF Git Repo for jclouds examples","fork":false,"url":"https://api.github.com/repos/jclouds/jclouds-examples","forks_url":"https://api.github.com/repos/jclouds/jclouds-examples/forks","keys_url":"https://api.github.com/repos/jclouds/jclouds-examples/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jclouds/jclouds-examples/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jclouds/jclouds-examples/teams","hooks_url":"https://api.github.com/repos/jclouds/jclouds-examples/hooks","issue_events_url":"https://api.github.com/repos/jclouds/jclouds-examples/issues/events{/number}","events_url":"https://api.github.com/repos/jclouds/jclouds-examples/events","assignees_url":"https://api.github.com/repos/jclouds/jclouds-examples/assignees{/user}","branches_url":"https://api.github.com/repos/jclouds/jclouds-examples/branches{/branch}","tags_url":"https://api.github.com/repos/jclouds/jclouds-examples/tags","blobs_url":"https://api.github.com/repos/jclouds/jclouds-examples/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jclouds/jclouds-examples/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jclouds/jclouds-examples/git/refs{/sha}","trees_url":"https://api.github.com/repos/jclouds/jclouds-examples/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jclouds/jclouds-examples/statuses/{sha}","languages_url":"https://api.github.com/repos/jclouds/jclouds-examples/languages","stargazers_url":"https://api.github.com/repos/jclouds/jclouds-examples/stargazers","contributors_url":"https://api.github.com/repos/jclouds/jclouds-examples/contributors","subscribers_url":"https://api.github.com/repos/jclouds/jclouds-examples/subscribers","subscription_url":"https://api.github.com/repos/jclouds/jclouds-examples/subscription","commits_url":"https://api.github.com/repos/jclouds/jclouds-examples/commits{/sha}","git_commits_url":"https://api.github.com/repos/jclouds/jclouds-examples/git/commits{/sha}","comments_url":"https://api.github.com/repos/jclouds/jclouds-examples/comments{/number}","issue_comment_url":"https://api.github.com/repos/jclouds/jclouds-examples/issues/comments{/number}","contents_url":"https://api.github.com/repos/jclouds/jclouds-examples/contents/{+path}","compare_url":"https://api.github.com/repos/jclouds/jclouds-examples/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jclouds/jclouds-examples/merges","archive_url":"https://api.github.com/repos/jclouds/jclouds-examples/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jclouds/jclouds-examples/downloads","issues_url":"https://api.github.com/repos/jclouds/jclouds-examples/issues{/number}","pulls_url":"https://api.github.com/repos/jclouds/jclouds-examples/pulls{/number}","milestones_url":"https://api.github.com/repos/jclouds/jclouds-examples/milestones{/number}","notifications_url":"https://api.github.com/repos/jclouds/jclouds-examples/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jclouds/jclouds-examples/labels{/name}","releases_url":"https://api.github.com/repos/jclouds/jclouds-examples/releases{/id}","deployments_url":"https://api.github.com/repos/jclouds/jclouds-examples/deployments","created_at":"2013-05-13T20:49:37Z","updated_at":"2016-09-02T02:37:16Z","pushed_at":"2016-09-07T20:37:03Z","git_url":"git://github.com/jclouds/jclouds-examples.git","ssh_url":"git@github.com:jclouds/jclouds-examples.git","clone_url":"https://github.com/jclouds/jclouds-examples.git","svn_url":"https://github.com/jclouds/jclouds-examples","homepage":null,"size":1425,"stargazers_count":81,"watchers_count":81,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":135,"mirror_url":null,"open_issues_count":5,"forks":135,"open_issues":5,"watchers":81,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jclouds/jclouds-examples/pulls/89"},"html":{"href":"https://github.com/jclouds/jclouds-examples/pull/89"},"issue":{"href":"https://api.github.com/repos/jclouds/jclouds-examples/issues/89"},"comments":{"href":"https://api.github.com/repos/jclouds/jclouds-examples/issues/89/comments"},"review_comments":{"href":"https://api.github.com/repos/jclouds/jclouds-examples/pulls/89/comments"},"review_comment":{"href":"https://api.github.com/repos/jclouds/jclouds-examples/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jclouds/jclouds-examples/pulls/89/commits"},"statuses":{"href":"https://api.github.com/repos/jclouds/jclouds-examples/statuses/533c7b6cd0ddbc925f43f1ea4a9b75b071802ac9"}}}}
{"actor":{"display_login":"zack-shoylev"}}