{"action":"created","comment":{"url":"https://api.github.com/repos/treasure-data/td-client-ruby/pulls/comments/65446692","id":65446692,"diff_hunk":"@@ -287,6 +248,114 @@ def query(q, type=:hive, db=nil, result_url=nil, priority=nil, retry_limit=nil,\n \n   private\n \n+  def validate_content_length(response, current_total_chunk_size)\n+    if expected_size = response.header['Content-Range'][0]\n+      expected_size = expected_size[/\\d+$/].to_i\n+    elsif expected_size = response.header['Content-Length'][0]\n+      expected_size = expected_size.to_i\n+    end\n+\n+    if expected_size.nil?\n+    elsif current_total_chunk_size < expected_size\n+      # too small\n+      raise EOFError, 'httpclient IncompleteError'\n+    elsif current_total_chunk_size < expected_size\n+      # too large\n+      raise_error(\"Get job result failed\", res)","path":"lib/td/client/api/job.rb","position":161,"original_position":161,"commit_id":"e28710a69451b5911b2afdc015813fd0276341d1","original_commit_id":"e28710a69451b5911b2afdc015813fd0276341d1","user":{"login":"uu59","id":499680,"avatar_url":"https://avatars.githubusercontent.com/u/499680?v=3","gravatar_id":"","url":"https://api.github.com/users/uu59","html_url":"https://github.com/uu59","followers_url":"https://api.github.com/users/uu59/followers","following_url":"https://api.github.com/users/uu59/following{/other_user}","gists_url":"https://api.github.com/users/uu59/gists{/gist_id}","starred_url":"https://api.github.com/users/uu59/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uu59/subscriptions","organizations_url":"https://api.github.com/users/uu59/orgs","repos_url":"https://api.github.com/users/uu59/repos","events_url":"https://api.github.com/users/uu59/events{/privacy}","received_events_url":"https://api.github.com/users/uu59/received_events","type":"User","site_admin":false},"body":"I'm just wondering why `else` call `raise_error`. `raise_error` will raise HTTP status code conditional error.\r\nIn the \"too small\" situation, is assumed as incomplete/EOF error. It is reasonable to me.\r\nBut \"too large\" situation is mysterious. I can't imagine such situation.. but at least I think it is not plain HTTP error.\r\n","created_at":"2016-06-01T21:30:56Z","updated_at":"2016-06-01T21:30:56Z","html_url":"https://github.com/treasure-data/td-client-ruby/pull/85#discussion_r65446692","pull_request_url":"https://api.github.com/repos/treasure-data/td-client-ruby/pulls/85","_links":{"self":{"href":"https://api.github.com/repos/treasure-data/td-client-ruby/pulls/comments/65446692"},"html":{"href":"https://github.com/treasure-data/td-client-ruby/pull/85#discussion_r65446692"},"pull_request":{"href":"https://api.github.com/repos/treasure-data/td-client-ruby/pulls/85"}}},"pull_request":{"url":"https://api.github.com/repos/treasure-data/td-client-ruby/pulls/85","id":72080482,"html_url":"https://github.com/treasure-data/td-client-ruby/pull/85","diff_url":"https://github.com/treasure-data/td-client-ruby/pull/85.diff","patch_url":"https://github.com/treasure-data/td-client-ruby/pull/85.patch","issue_url":"https://api.github.com/repos/treasure-data/td-client-ruby/issues/85","number":85,"state":"open","locked":false,"title":"Rewrite job_result_download logic","user":{"login":"nurse","id":13423,"avatar_url":"https://avatars.githubusercontent.com/u/13423?v=3","gravatar_id":"","url":"https://api.github.com/users/nurse","html_url":"https://github.com/nurse","followers_url":"https://api.github.com/users/nurse/followers","following_url":"https://api.github.com/users/nurse/following{/other_user}","gists_url":"https://api.github.com/users/nurse/gists{/gist_id}","starred_url":"https://api.github.com/users/nurse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nurse/subscriptions","organizations_url":"https://api.github.com/users/nurse/orgs","repos_url":"https://api.github.com/users/nurse/repos","events_url":"https://api.github.com/users/nurse/events{/privacy}","received_events_url":"https://api.github.com/users/nurse/received_events","type":"User","site_admin":false},"body":"Revert #79 & #81 and rewrite job_result_download as another method.\r\nv0.8.80 doesn't work on resuming because the status of resuming\r\nresponse is 206 but it accespts only 200.","created_at":"2016-05-31T20:29:40Z","updated_at":"2016-06-01T21:30:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6130b2430e2aa24487721f8e986ae08f46be2261","assignee":{"login":"uu59","id":499680,"avatar_url":"https://avatars.githubusercontent.com/u/499680?v=3","gravatar_id":"","url":"https://api.github.com/users/uu59","html_url":"https://github.com/uu59","followers_url":"https://api.github.com/users/uu59/followers","following_url":"https://api.github.com/users/uu59/following{/other_user}","gists_url":"https://api.github.com/users/uu59/gists{/gist_id}","starred_url":"https://api.github.com/users/uu59/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uu59/subscriptions","organizations_url":"https://api.github.com/users/uu59/orgs","repos_url":"https://api.github.com/users/uu59/repos","events_url":"https://api.github.com/users/uu59/events{/privacy}","received_events_url":"https://api.github.com/users/uu59/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/treasure-data/td-client-ruby/pulls/85/commits","review_comments_url":"https://api.github.com/repos/treasure-data/td-client-ruby/pulls/85/comments","review_comment_url":"https://api.github.com/repos/treasure-data/td-client-ruby/pulls/comments{/number}","comments_url":"https://api.github.com/repos/treasure-data/td-client-ruby/issues/85/comments","statuses_url":"https://api.github.com/repos/treasure-data/td-client-ruby/statuses/e28710a69451b5911b2afdc015813fd0276341d1","head":{"label":"treasure-data:job_result_download","ref":"job_result_download","sha":"e28710a69451b5911b2afdc015813fd0276341d1","user":{"login":"treasure-data","id":747746,"avatar_url":"https://avatars.githubusercontent.com/u/747746?v=3","gravatar_id":"","url":"https://api.github.com/users/treasure-data","html_url":"https://github.com/treasure-data","followers_url":"https://api.github.com/users/treasure-data/followers","following_url":"https://api.github.com/users/treasure-data/following{/other_user}","gists_url":"https://api.github.com/users/treasure-data/gists{/gist_id}","starred_url":"https://api.github.com/users/treasure-data/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/treasure-data/subscriptions","organizations_url":"https://api.github.com/users/treasure-data/orgs","repos_url":"https://api.github.com/users/treasure-data/repos","events_url":"https://api.github.com/users/treasure-data/events{/privacy}","received_events_url":"https://api.github.com/users/treasure-data/received_events","type":"Organization","site_admin":false},"repo":{"id":2242689,"name":"td-client-ruby","full_name":"treasure-data/td-client-ruby","owner":{"login":"treasure-data","id":747746,"avatar_url":"https://avatars.githubusercontent.com/u/747746?v=3","gravatar_id":"","url":"https://api.github.com/users/treasure-data","html_url":"https://github.com/treasure-data","followers_url":"https://api.github.com/users/treasure-data/followers","following_url":"https://api.github.com/users/treasure-data/following{/other_user}","gists_url":"https://api.github.com/users/treasure-data/gists{/gist_id}","starred_url":"https://api.github.com/users/treasure-data/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/treasure-data/subscriptions","organizations_url":"https://api.github.com/users/treasure-data/orgs","repos_url":"https://api.github.com/users/treasure-data/repos","events_url":"https://api.github.com/users/treasure-data/events{/privacy}","received_events_url":"https://api.github.com/users/treasure-data/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/treasure-data/td-client-ruby","description":"Ruby Client Library for Treasure Data","fork":false,"url":"https://api.github.com/repos/treasure-data/td-client-ruby","forks_url":"https://api.github.com/repos/treasure-data/td-client-ruby/forks","keys_url":"https://api.github.com/repos/treasure-data/td-client-ruby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/treasure-data/td-client-ruby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/treasure-data/td-client-ruby/teams","hooks_url":"https://api.github.com/repos/treasure-data/td-client-ruby/hooks","issue_events_url":"https://api.github.com/repos/treasure-data/td-client-ruby/issues/events{/number}","events_url":"https://api.github.com/repos/treasure-data/td-client-ruby/events","assignees_url":"https://api.github.com/repos/treasure-data/td-client-ruby/assignees{/user}","branches_url":"https://api.github.com/repos/treasure-data/td-client-ruby/branches{/branch}","tags_url":"https://api.github.com/repos/treasure-data/td-client-ruby/tags","blobs_url":"https://api.github.com/repos/treasure-data/td-client-ruby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/treasure-data/td-client-ruby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/treasure-data/td-client-ruby/git/refs{/sha}","trees_url":"https://api.github.com/repos/treasure-data/td-client-ruby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/treasure-data/td-client-ruby/statuses/{sha}","languages_url":"https://api.github.com/repos/treasure-data/td-client-ruby/languages","stargazers_url":"https://api.github.com/repos/treasure-data/td-client-ruby/stargazers","contributors_url":"https://api.github.com/repos/treasure-data/td-client-ruby/contributors","subscribers_url":"https://api.github.com/repos/treasure-data/td-client-ruby/subscribers","subscription_url":"https://api.github.com/repos/treasure-data/td-client-ruby/subscription","commits_url":"https://api.github.com/repos/treasure-data/td-client-ruby/commits{/sha}","git_commits_url":"https://api.github.com/repos/treasure-data/td-client-ruby/git/commits{/sha}","comments_url":"https://api.github.com/repos/treasure-data/td-client-ruby/comments{/number}","issue_comment_url":"https://api.github.com/repos/treasure-data/td-client-ruby/issues/comments{/number}","contents_url":"https://api.github.com/repos/treasure-data/td-client-ruby/contents/{+path}","compare_url":"https://api.github.com/repos/treasure-data/td-client-ruby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/treasure-data/td-client-ruby/merges","archive_url":"https://api.github.com/repos/treasure-data/td-client-ruby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/treasure-data/td-client-ruby/downloads","issues_url":"https://api.github.com/repos/treasure-data/td-client-ruby/issues{/number}","pulls_url":"https://api.github.com/repos/treasure-data/td-client-ruby/pulls{/number}","milestones_url":"https://api.github.com/repos/treasure-data/td-client-ruby/milestones{/number}","notifications_url":"https://api.github.com/repos/treasure-data/td-client-ruby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/treasure-data/td-client-ruby/labels{/name}","releases_url":"https://api.github.com/repos/treasure-data/td-client-ruby/releases{/id}","deployments_url":"https://api.github.com/repos/treasure-data/td-client-ruby/deployments","created_at":"2011-08-21T08:19:23Z","updated_at":"2016-01-06T03:30:16Z","pushed_at":"2016-06-01T18:13:08Z","git_url":"git://github.com/treasure-data/td-client-ruby.git","ssh_url":"git@github.com:treasure-data/td-client-ruby.git","clone_url":"https://github.com/treasure-data/td-client-ruby.git","svn_url":"https://github.com/treasure-data/td-client-ruby","homepage":"http://docs.treasure-data.com/articles/rest-api-ruby-client","size":892,"stargazers_count":13,"watchers_count":13,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":11,"forks":11,"open_issues":11,"watchers":13,"default_branch":"master"}},"base":{"label":"treasure-data:master","ref":"master","sha":"95858e797b76e0aae358d8999930719d8962bfad","user":{"login":"treasure-data","id":747746,"avatar_url":"https://avatars.githubusercontent.com/u/747746?v=3","gravatar_id":"","url":"https://api.github.com/users/treasure-data","html_url":"https://github.com/treasure-data","followers_url":"https://api.github.com/users/treasure-data/followers","following_url":"https://api.github.com/users/treasure-data/following{/other_user}","gists_url":"https://api.github.com/users/treasure-data/gists{/gist_id}","starred_url":"https://api.github.com/users/treasure-data/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/treasure-data/subscriptions","organizations_url":"https://api.github.com/users/treasure-data/orgs","repos_url":"https://api.github.com/users/treasure-data/repos","events_url":"https://api.github.com/users/treasure-data/events{/privacy}","received_events_url":"https://api.github.com/users/treasure-data/received_events","type":"Organization","site_admin":false},"repo":{"id":2242689,"name":"td-client-ruby","full_name":"treasure-data/td-client-ruby","owner":{"login":"treasure-data","id":747746,"avatar_url":"https://avatars.githubusercontent.com/u/747746?v=3","gravatar_id":"","url":"https://api.github.com/users/treasure-data","html_url":"https://github.com/treasure-data","followers_url":"https://api.github.com/users/treasure-data/followers","following_url":"https://api.github.com/users/treasure-data/following{/other_user}","gists_url":"https://api.github.com/users/treasure-data/gists{/gist_id}","starred_url":"https://api.github.com/users/treasure-data/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/treasure-data/subscriptions","organizations_url":"https://api.github.com/users/treasure-data/orgs","repos_url":"https://api.github.com/users/treasure-data/repos","events_url":"https://api.github.com/users/treasure-data/events{/privacy}","received_events_url":"https://api.github.com/users/treasure-data/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/treasure-data/td-client-ruby","description":"Ruby Client Library for Treasure Data","fork":false,"url":"https://api.github.com/repos/treasure-data/td-client-ruby","forks_url":"https://api.github.com/repos/treasure-data/td-client-ruby/forks","keys_url":"https://api.github.com/repos/treasure-data/td-client-ruby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/treasure-data/td-client-ruby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/treasure-data/td-client-ruby/teams","hooks_url":"https://api.github.com/repos/treasure-data/td-client-ruby/hooks","issue_events_url":"https://api.github.com/repos/treasure-data/td-client-ruby/issues/events{/number}","events_url":"https://api.github.com/repos/treasure-data/td-client-ruby/events","assignees_url":"https://api.github.com/repos/treasure-data/td-client-ruby/assignees{/user}","branches_url":"https://api.github.com/repos/treasure-data/td-client-ruby/branches{/branch}","tags_url":"https://api.github.com/repos/treasure-data/td-client-ruby/tags","blobs_url":"https://api.github.com/repos/treasure-data/td-client-ruby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/treasure-data/td-client-ruby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/treasure-data/td-client-ruby/git/refs{/sha}","trees_url":"https://api.github.com/repos/treasure-data/td-client-ruby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/treasure-data/td-client-ruby/statuses/{sha}","languages_url":"https://api.github.com/repos/treasure-data/td-client-ruby/languages","stargazers_url":"https://api.github.com/repos/treasure-data/td-client-ruby/stargazers","contributors_url":"https://api.github.com/repos/treasure-data/td-client-ruby/contributors","subscribers_url":"https://api.github.com/repos/treasure-data/td-client-ruby/subscribers","subscription_url":"https://api.github.com/repos/treasure-data/td-client-ruby/subscription","commits_url":"https://api.github.com/repos/treasure-data/td-client-ruby/commits{/sha}","git_commits_url":"https://api.github.com/repos/treasure-data/td-client-ruby/git/commits{/sha}","comments_url":"https://api.github.com/repos/treasure-data/td-client-ruby/comments{/number}","issue_comment_url":"https://api.github.com/repos/treasure-data/td-client-ruby/issues/comments{/number}","contents_url":"https://api.github.com/repos/treasure-data/td-client-ruby/contents/{+path}","compare_url":"https://api.github.com/repos/treasure-data/td-client-ruby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/treasure-data/td-client-ruby/merges","archive_url":"https://api.github.com/repos/treasure-data/td-client-ruby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/treasure-data/td-client-ruby/downloads","issues_url":"https://api.github.com/repos/treasure-data/td-client-ruby/issues{/number}","pulls_url":"https://api.github.com/repos/treasure-data/td-client-ruby/pulls{/number}","milestones_url":"https://api.github.com/repos/treasure-data/td-client-ruby/milestones{/number}","notifications_url":"https://api.github.com/repos/treasure-data/td-client-ruby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/treasure-data/td-client-ruby/labels{/name}","releases_url":"https://api.github.com/repos/treasure-data/td-client-ruby/releases{/id}","deployments_url":"https://api.github.com/repos/treasure-data/td-client-ruby/deployments","created_at":"2011-08-21T08:19:23Z","updated_at":"2016-01-06T03:30:16Z","pushed_at":"2016-06-01T18:13:08Z","git_url":"git://github.com/treasure-data/td-client-ruby.git","ssh_url":"git@github.com:treasure-data/td-client-ruby.git","clone_url":"https://github.com/treasure-data/td-client-ruby.git","svn_url":"https://github.com/treasure-data/td-client-ruby","homepage":"http://docs.treasure-data.com/articles/rest-api-ruby-client","size":892,"stargazers_count":13,"watchers_count":13,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":11,"forks":11,"open_issues":11,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/treasure-data/td-client-ruby/pulls/85"},"html":{"href":"https://github.com/treasure-data/td-client-ruby/pull/85"},"issue":{"href":"https://api.github.com/repos/treasure-data/td-client-ruby/issues/85"},"comments":{"href":"https://api.github.com/repos/treasure-data/td-client-ruby/issues/85/comments"},"review_comments":{"href":"https://api.github.com/repos/treasure-data/td-client-ruby/pulls/85/comments"},"review_comment":{"href":"https://api.github.com/repos/treasure-data/td-client-ruby/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/treasure-data/td-client-ruby/pulls/85/commits"},"statuses":{"href":"https://api.github.com/repos/treasure-data/td-client-ruby/statuses/e28710a69451b5911b2afdc015813fd0276341d1"}}}}
{"actor":{"display_login":"uu59"}}