{"action":"created","comment":{"url":"https://api.github.com/repos/hydrator/httptohdfs-action/pulls/comments/96320159","pull_request_review_id":16898379,"id":96320159,"diff_hunk":"@@ -0,0 +1,342 @@\n+/*\n+ * Copyright © 2016 Cask Data, Inc.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n+ * use this file except in compliance with the License. You may obtain a copy of\n+ * 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, WITHOUT\n+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n+ * License for the specific language governing permissions and limitations under\n+ * the License.\n+ */\n+package co.cask.hydrator.plugin.batch;\n+\n+import co.cask.cdap.api.annotation.Description;\n+import co.cask.cdap.api.annotation.Macro;\n+import co.cask.cdap.api.annotation.Name;\n+import co.cask.cdap.api.annotation.Plugin;\n+import co.cask.cdap.api.plugin.PluginConfig;\n+import co.cask.cdap.etl.api.PipelineConfigurer;\n+import co.cask.cdap.etl.api.action.Action;\n+import co.cask.cdap.etl.api.action.ActionContext;\n+import com.google.common.base.Joiner;\n+import com.google.common.base.Strings;\n+import com.google.common.collect.ImmutableSet;\n+import org.apache.hadoop.conf.Configuration;\n+import org.apache.hadoop.fs.FSDataOutputStream;\n+import org.apache.hadoop.fs.FileSystem;\n+import org.apache.hadoop.fs.Path;\n+import org.slf4j.Logger;\n+import org.slf4j.LoggerFactory;\n+\n+import java.io.BufferedReader;\n+import java.io.InputStream;\n+import java.io.InputStreamReader;\n+import java.io.OutputStream;\n+import java.io.Reader;\n+import java.net.HttpURLConnection;\n+import java.net.MalformedURLException;\n+import java.net.ProtocolException;\n+import java.net.URL;\n+import java.security.KeyManagementException;\n+import java.security.NoSuchAlgorithmException;\n+import java.security.cert.X509Certificate;\n+import java.util.HashMap;\n+import java.util.List;\n+import java.util.Map;\n+import java.util.Set;\n+import javax.annotation.Nullable;\n+import javax.net.ssl.HostnameVerifier;\n+import javax.net.ssl.HttpsURLConnection;\n+import javax.net.ssl.SSLContext;\n+import javax.net.ssl.SSLSession;\n+import javax.net.ssl.TrustManager;\n+import javax.net.ssl.X509TrustManager;\n+import javax.ws.rs.HttpMethod;\n+\n+/**\n+ * Action to fetch data from an external http webservice or url and dump the data into HDFS.","path":"src/main/java/co/cask/hydrator/plugin/batch/HTTPToHDFSAction.java","position":62,"original_position":62,"commit_id":"a9be67f3f5ae99d2d419c1214544e07e67fa47d7","original_commit_id":"a9be67f3f5ae99d2d419c1214544e07e67fa47d7","user":{"login":"russorat","id":4805997,"avatar_url":"https://avatars.githubusercontent.com/u/4805997?v=3","gravatar_id":"","url":"https://api.github.com/users/russorat","html_url":"https://github.com/russorat","followers_url":"https://api.github.com/users/russorat/followers","following_url":"https://api.github.com/users/russorat/following{/other_user}","gists_url":"https://api.github.com/users/russorat/gists{/gist_id}","starred_url":"https://api.github.com/users/russorat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/russorat/subscriptions","organizations_url":"https://api.github.com/users/russorat/orgs","repos_url":"https://api.github.com/users/russorat/repos","events_url":"https://api.github.com/users/russorat/events{/privacy}","received_events_url":"https://api.github.com/users/russorat/received_events","type":"User","site_admin":false},"body":"...from an external http endpoint and create a file in HDFS.","created_at":"2017-01-16T23:22:37Z","updated_at":"2017-01-16T23:22:37Z","html_url":"https://github.com/hydrator/httptohdfs-action/pull/1#discussion_r96320159","pull_request_url":"https://api.github.com/repos/hydrator/httptohdfs-action/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/hydrator/httptohdfs-action/pulls/comments/96320159"},"html":{"href":"https://github.com/hydrator/httptohdfs-action/pull/1#discussion_r96320159"},"pull_request":{"href":"https://api.github.com/repos/hydrator/httptohdfs-action/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/hydrator/httptohdfs-action/pulls/1","id":101659292,"html_url":"https://github.com/hydrator/httptohdfs-action/pull/1","diff_url":"https://github.com/hydrator/httptohdfs-action/pull/1.diff","patch_url":"https://github.com/hydrator/httptohdfs-action/pull/1.patch","issue_url":"https://api.github.com/repos/hydrator/httptohdfs-action/issues/1","number":1,"state":"open","locked":false,"title":"[HYDRATOR-1074] Implementation for HTTP To HDFS Action plugin","user":{"login":"shashankmoghe","id":20435815,"avatar_url":"https://avatars.githubusercontent.com/u/20435815?v=3","gravatar_id":"","url":"https://api.github.com/users/shashankmoghe","html_url":"https://github.com/shashankmoghe","followers_url":"https://api.github.com/users/shashankmoghe/followers","following_url":"https://api.github.com/users/shashankmoghe/following{/other_user}","gists_url":"https://api.github.com/users/shashankmoghe/gists{/gist_id}","starred_url":"https://api.github.com/users/shashankmoghe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shashankmoghe/subscriptions","organizations_url":"https://api.github.com/users/shashankmoghe/orgs","repos_url":"https://api.github.com/users/shashankmoghe/repos","events_url":"https://api.github.com/users/shashankmoghe/events{/privacy}","received_events_url":"https://api.github.com/users/shashankmoghe/received_events","type":"User","site_admin":false},"body":"Design : https://wiki.cask.co/display/CE/HTTPToHDFS+Action\r\nJIRA: https://issues.cask.co/browse/HYDRATOR-1074\r\n","created_at":"2017-01-16T09:58:10Z","updated_at":"2017-01-16T23:22:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f9cb40219675b180323694f74757f29edd0e8a33","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/hydrator/httptohdfs-action/pulls/1/commits","review_comments_url":"https://api.github.com/repos/hydrator/httptohdfs-action/pulls/1/comments","review_comment_url":"https://api.github.com/repos/hydrator/httptohdfs-action/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hydrator/httptohdfs-action/issues/1/comments","statuses_url":"https://api.github.com/repos/hydrator/httptohdfs-action/statuses/a9be67f3f5ae99d2d419c1214544e07e67fa47d7","head":{"label":"hydrator:develop","ref":"develop","sha":"a9be67f3f5ae99d2d419c1214544e07e67fa47d7","user":{"login":"hydrator","id":23705097,"avatar_url":"https://avatars.githubusercontent.com/u/23705097?v=3","gravatar_id":"","url":"https://api.github.com/users/hydrator","html_url":"https://github.com/hydrator","followers_url":"https://api.github.com/users/hydrator/followers","following_url":"https://api.github.com/users/hydrator/following{/other_user}","gists_url":"https://api.github.com/users/hydrator/gists{/gist_id}","starred_url":"https://api.github.com/users/hydrator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hydrator/subscriptions","organizations_url":"https://api.github.com/users/hydrator/orgs","repos_url":"https://api.github.com/users/hydrator/repos","events_url":"https://api.github.com/users/hydrator/events{/privacy}","received_events_url":"https://api.github.com/users/hydrator/received_events","type":"Organization","site_admin":false},"repo":{"id":78194262,"name":"httptohdfs-action","full_name":"hydrator/httptohdfs-action","owner":{"login":"hydrator","id":23705097,"avatar_url":"https://avatars.githubusercontent.com/u/23705097?v=3","gravatar_id":"","url":"https://api.github.com/users/hydrator","html_url":"https://github.com/hydrator","followers_url":"https://api.github.com/users/hydrator/followers","following_url":"https://api.github.com/users/hydrator/following{/other_user}","gists_url":"https://api.github.com/users/hydrator/gists{/gist_id}","starred_url":"https://api.github.com/users/hydrator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hydrator/subscriptions","organizations_url":"https://api.github.com/users/hydrator/orgs","repos_url":"https://api.github.com/users/hydrator/repos","events_url":"https://api.github.com/users/hydrator/events{/privacy}","received_events_url":"https://api.github.com/users/hydrator/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hydrator/httptohdfs-action","description":"Action to fetch data from an external http webservice or url.","fork":false,"url":"https://api.github.com/repos/hydrator/httptohdfs-action","forks_url":"https://api.github.com/repos/hydrator/httptohdfs-action/forks","keys_url":"https://api.github.com/repos/hydrator/httptohdfs-action/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hydrator/httptohdfs-action/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hydrator/httptohdfs-action/teams","hooks_url":"https://api.github.com/repos/hydrator/httptohdfs-action/hooks","issue_events_url":"https://api.github.com/repos/hydrator/httptohdfs-action/issues/events{/number}","events_url":"https://api.github.com/repos/hydrator/httptohdfs-action/events","assignees_url":"https://api.github.com/repos/hydrator/httptohdfs-action/assignees{/user}","branches_url":"https://api.github.com/repos/hydrator/httptohdfs-action/branches{/branch}","tags_url":"https://api.github.com/repos/hydrator/httptohdfs-action/tags","blobs_url":"https://api.github.com/repos/hydrator/httptohdfs-action/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hydrator/httptohdfs-action/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hydrator/httptohdfs-action/git/refs{/sha}","trees_url":"https://api.github.com/repos/hydrator/httptohdfs-action/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hydrator/httptohdfs-action/statuses/{sha}","languages_url":"https://api.github.com/repos/hydrator/httptohdfs-action/languages","stargazers_url":"https://api.github.com/repos/hydrator/httptohdfs-action/stargazers","contributors_url":"https://api.github.com/repos/hydrator/httptohdfs-action/contributors","subscribers_url":"https://api.github.com/repos/hydrator/httptohdfs-action/subscribers","subscription_url":"https://api.github.com/repos/hydrator/httptohdfs-action/subscription","commits_url":"https://api.github.com/repos/hydrator/httptohdfs-action/commits{/sha}","git_commits_url":"https://api.github.com/repos/hydrator/httptohdfs-action/git/commits{/sha}","comments_url":"https://api.github.com/repos/hydrator/httptohdfs-action/comments{/number}","issue_comment_url":"https://api.github.com/repos/hydrator/httptohdfs-action/issues/comments{/number}","contents_url":"https://api.github.com/repos/hydrator/httptohdfs-action/contents/{+path}","compare_url":"https://api.github.com/repos/hydrator/httptohdfs-action/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hydrator/httptohdfs-action/merges","archive_url":"https://api.github.com/repos/hydrator/httptohdfs-action/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hydrator/httptohdfs-action/downloads","issues_url":"https://api.github.com/repos/hydrator/httptohdfs-action/issues{/number}","pulls_url":"https://api.github.com/repos/hydrator/httptohdfs-action/pulls{/number}","milestones_url":"https://api.github.com/repos/hydrator/httptohdfs-action/milestones{/number}","notifications_url":"https://api.github.com/repos/hydrator/httptohdfs-action/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hydrator/httptohdfs-action/labels{/name}","releases_url":"https://api.github.com/repos/hydrator/httptohdfs-action/releases{/id}","deployments_url":"https://api.github.com/repos/hydrator/httptohdfs-action/deployments","created_at":"2017-01-06T09:41:40Z","updated_at":"2017-01-06T09:41:40Z","pushed_at":"2017-01-16T09:58:10Z","git_url":"git://github.com/hydrator/httptohdfs-action.git","ssh_url":"git@github.com:hydrator/httptohdfs-action.git","clone_url":"https://github.com/hydrator/httptohdfs-action.git","svn_url":"https://github.com/hydrator/httptohdfs-action","homepage":null,"size":23,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"hydrator:master","ref":"master","sha":"1fc8de3eb84b3be65167917a143621fc792623d9","user":{"login":"hydrator","id":23705097,"avatar_url":"https://avatars.githubusercontent.com/u/23705097?v=3","gravatar_id":"","url":"https://api.github.com/users/hydrator","html_url":"https://github.com/hydrator","followers_url":"https://api.github.com/users/hydrator/followers","following_url":"https://api.github.com/users/hydrator/following{/other_user}","gists_url":"https://api.github.com/users/hydrator/gists{/gist_id}","starred_url":"https://api.github.com/users/hydrator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hydrator/subscriptions","organizations_url":"https://api.github.com/users/hydrator/orgs","repos_url":"https://api.github.com/users/hydrator/repos","events_url":"https://api.github.com/users/hydrator/events{/privacy}","received_events_url":"https://api.github.com/users/hydrator/received_events","type":"Organization","site_admin":false},"repo":{"id":78194262,"name":"httptohdfs-action","full_name":"hydrator/httptohdfs-action","owner":{"login":"hydrator","id":23705097,"avatar_url":"https://avatars.githubusercontent.com/u/23705097?v=3","gravatar_id":"","url":"https://api.github.com/users/hydrator","html_url":"https://github.com/hydrator","followers_url":"https://api.github.com/users/hydrator/followers","following_url":"https://api.github.com/users/hydrator/following{/other_user}","gists_url":"https://api.github.com/users/hydrator/gists{/gist_id}","starred_url":"https://api.github.com/users/hydrator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hydrator/subscriptions","organizations_url":"https://api.github.com/users/hydrator/orgs","repos_url":"https://api.github.com/users/hydrator/repos","events_url":"https://api.github.com/users/hydrator/events{/privacy}","received_events_url":"https://api.github.com/users/hydrator/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hydrator/httptohdfs-action","description":"Action to fetch data from an external http webservice or url.","fork":false,"url":"https://api.github.com/repos/hydrator/httptohdfs-action","forks_url":"https://api.github.com/repos/hydrator/httptohdfs-action/forks","keys_url":"https://api.github.com/repos/hydrator/httptohdfs-action/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hydrator/httptohdfs-action/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hydrator/httptohdfs-action/teams","hooks_url":"https://api.github.com/repos/hydrator/httptohdfs-action/hooks","issue_events_url":"https://api.github.com/repos/hydrator/httptohdfs-action/issues/events{/number}","events_url":"https://api.github.com/repos/hydrator/httptohdfs-action/events","assignees_url":"https://api.github.com/repos/hydrator/httptohdfs-action/assignees{/user}","branches_url":"https://api.github.com/repos/hydrator/httptohdfs-action/branches{/branch}","tags_url":"https://api.github.com/repos/hydrator/httptohdfs-action/tags","blobs_url":"https://api.github.com/repos/hydrator/httptohdfs-action/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hydrator/httptohdfs-action/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hydrator/httptohdfs-action/git/refs{/sha}","trees_url":"https://api.github.com/repos/hydrator/httptohdfs-action/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hydrator/httptohdfs-action/statuses/{sha}","languages_url":"https://api.github.com/repos/hydrator/httptohdfs-action/languages","stargazers_url":"https://api.github.com/repos/hydrator/httptohdfs-action/stargazers","contributors_url":"https://api.github.com/repos/hydrator/httptohdfs-action/contributors","subscribers_url":"https://api.github.com/repos/hydrator/httptohdfs-action/subscribers","subscription_url":"https://api.github.com/repos/hydrator/httptohdfs-action/subscription","commits_url":"https://api.github.com/repos/hydrator/httptohdfs-action/commits{/sha}","git_commits_url":"https://api.github.com/repos/hydrator/httptohdfs-action/git/commits{/sha}","comments_url":"https://api.github.com/repos/hydrator/httptohdfs-action/comments{/number}","issue_comment_url":"https://api.github.com/repos/hydrator/httptohdfs-action/issues/comments{/number}","contents_url":"https://api.github.com/repos/hydrator/httptohdfs-action/contents/{+path}","compare_url":"https://api.github.com/repos/hydrator/httptohdfs-action/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hydrator/httptohdfs-action/merges","archive_url":"https://api.github.com/repos/hydrator/httptohdfs-action/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hydrator/httptohdfs-action/downloads","issues_url":"https://api.github.com/repos/hydrator/httptohdfs-action/issues{/number}","pulls_url":"https://api.github.com/repos/hydrator/httptohdfs-action/pulls{/number}","milestones_url":"https://api.github.com/repos/hydrator/httptohdfs-action/milestones{/number}","notifications_url":"https://api.github.com/repos/hydrator/httptohdfs-action/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hydrator/httptohdfs-action/labels{/name}","releases_url":"https://api.github.com/repos/hydrator/httptohdfs-action/releases{/id}","deployments_url":"https://api.github.com/repos/hydrator/httptohdfs-action/deployments","created_at":"2017-01-06T09:41:40Z","updated_at":"2017-01-06T09:41:40Z","pushed_at":"2017-01-16T09:58:10Z","git_url":"git://github.com/hydrator/httptohdfs-action.git","ssh_url":"git@github.com:hydrator/httptohdfs-action.git","clone_url":"https://github.com/hydrator/httptohdfs-action.git","svn_url":"https://github.com/hydrator/httptohdfs-action","homepage":null,"size":23,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hydrator/httptohdfs-action/pulls/1"},"html":{"href":"https://github.com/hydrator/httptohdfs-action/pull/1"},"issue":{"href":"https://api.github.com/repos/hydrator/httptohdfs-action/issues/1"},"comments":{"href":"https://api.github.com/repos/hydrator/httptohdfs-action/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/hydrator/httptohdfs-action/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/hydrator/httptohdfs-action/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hydrator/httptohdfs-action/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/hydrator/httptohdfs-action/statuses/a9be67f3f5ae99d2d419c1214544e07e67fa47d7"}}}}
{"actor":{"display_login":"russorat"}}