{"action":"created","comment":{"url":"https://api.github.com/repos/caskdata/hydrator-plugins/pulls/comments/67104681","id":67104681,"diff_hunk":"@@ -0,0 +1,55 @@\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+\n+package co.cask.hydrator.plugin.batch.source;\n+\n+import org.apache.hadoop.fs.Path;\n+import org.apache.hadoop.io.LongWritable;\n+import org.apache.hadoop.mapreduce.InputSplit;\n+import org.apache.hadoop.mapreduce.JobContext;\n+import org.apache.hadoop.mapreduce.RecordReader;\n+import org.apache.hadoop.mapreduce.TaskAttemptContext;\n+import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;\n+import org.apache.hadoop.mapreduce.lib.input.FileSplit;\n+\n+import java.io.IOException;\n+import java.util.Map;\n+\n+/**\n+ * InputFormat class for XMLReader plugin.\n+ */\n+public class XMLInputFormat extends FileInputFormat<LongWritable, Map<String, String>> {\n+  public static final String XML_INPUT_NAME_CONFIG = \"xml.inputformat.path.name\";\n+  public static final String XML_INPUTFORMAT_NODE_PATH = \"xml.inputformat.node.path\";\n+  public static final String XML_INPUTFORMAT_PATTERN = \"xml.inputformat.pattern\";\n+  public static final String XML_INPUTFORMAT_REPROCESSING_REQUIRED = \"xml.inputformat.reprocessing.required\";\n+  public static final String XML_INPUTFORMAT_PROCESSED_DATA_TEMP_FILE = \"xml.inputformat.processed.data.temp.file\";\n+  public static final String XML_INPUTFORMAT_PROCESSED_FILES = \"xml.inputformat.processed.files\";\n+  public static final String XML_INPUTFORMAT_FILE_ACTION = \"xml.inputformat.file.action\";\n+  public static final String XML_INPUTFORMAT_TARGET_FOLDER = \"xml.inputformat.target.folder\";\n+\n+  @Override\n+  public RecordReader<LongWritable, Map<String, String>> createRecordReader(InputSplit split,\n+                                                                            TaskAttemptContext context)\n+    throws IOException {\n+    return new XMLRecordReader((FileSplit) split, context.getConfiguration());\n+  }\n+\n+  protected boolean isSplitable(JobContext context, Path file) {\n+    //XML files are not splittable hence returning false.","path":"core-plugins/src/main/java/co/cask/hydrator/plugin/batch/source/XMLInputFormat.java","position":52,"original_position":52,"commit_id":"ebeab8b26e84b699895a396e5026eee10c060c38","original_commit_id":"ebeab8b26e84b699895a396e5026eee10c060c38","user":{"login":"anwar6953","id":2440977,"avatar_url":"https://avatars.githubusercontent.com/u/2440977?v=3","gravatar_id":"","url":"https://api.github.com/users/anwar6953","html_url":"https://github.com/anwar6953","followers_url":"https://api.github.com/users/anwar6953/followers","following_url":"https://api.github.com/users/anwar6953/following{/other_user}","gists_url":"https://api.github.com/users/anwar6953/gists{/gist_id}","starred_url":"https://api.github.com/users/anwar6953/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anwar6953/subscriptions","organizations_url":"https://api.github.com/users/anwar6953/orgs","repos_url":"https://api.github.com/users/anwar6953/repos","events_url":"https://api.github.com/users/anwar6953/events{/privacy}","received_events_url":"https://api.github.com/users/anwar6953/received_events","type":"User","site_admin":false},"body":"This'll also enable us to take advantage of MapReduce's parallelism.","created_at":"2016-06-15T06:09:29Z","updated_at":"2016-06-15T06:09:29Z","html_url":"https://github.com/caskdata/hydrator-plugins/pull/285#discussion_r67104681","pull_request_url":"https://api.github.com/repos/caskdata/hydrator-plugins/pulls/285","_links":{"self":{"href":"https://api.github.com/repos/caskdata/hydrator-plugins/pulls/comments/67104681"},"html":{"href":"https://github.com/caskdata/hydrator-plugins/pull/285#discussion_r67104681"},"pull_request":{"href":"https://api.github.com/repos/caskdata/hydrator-plugins/pulls/285"}}},"pull_request":{"url":"https://api.github.com/repos/caskdata/hydrator-plugins/pulls/285","id":73051935,"html_url":"https://github.com/caskdata/hydrator-plugins/pull/285","diff_url":"https://github.com/caskdata/hydrator-plugins/pull/285.diff","patch_url":"https://github.com/caskdata/hydrator-plugins/pull/285.patch","issue_url":"https://api.github.com/repos/caskdata/hydrator-plugins/issues/285","number":285,"state":"open","locked":false,"title":"CDAP-5881 - First draft of XML Reader","user":{"login":"bhushankawadkar","id":17117900,"avatar_url":"https://avatars.githubusercontent.com/u/17117900?v=3","gravatar_id":"","url":"https://api.github.com/users/bhushankawadkar","html_url":"https://github.com/bhushankawadkar","followers_url":"https://api.github.com/users/bhushankawadkar/followers","following_url":"https://api.github.com/users/bhushankawadkar/following{/other_user}","gists_url":"https://api.github.com/users/bhushankawadkar/gists{/gist_id}","starred_url":"https://api.github.com/users/bhushankawadkar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhushankawadkar/subscriptions","organizations_url":"https://api.github.com/users/bhushankawadkar/orgs","repos_url":"https://api.github.com/users/bhushankawadkar/repos","events_url":"https://api.github.com/users/bhushankawadkar/events{/privacy}","received_events_url":"https://api.github.com/users/bhushankawadkar/received_events","type":"User","site_admin":false},"body":"Initial draft of XML Reader with node path approach.","created_at":"2016-06-08T14:03:19Z","updated_at":"2016-06-15T06:09:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3c036f7cc2629903076f8061ffe11724a18289a9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/caskdata/hydrator-plugins/pulls/285/commits","review_comments_url":"https://api.github.com/repos/caskdata/hydrator-plugins/pulls/285/comments","review_comment_url":"https://api.github.com/repos/caskdata/hydrator-plugins/pulls/comments{/number}","comments_url":"https://api.github.com/repos/caskdata/hydrator-plugins/issues/285/comments","statuses_url":"https://api.github.com/repos/caskdata/hydrator-plugins/statuses/ebeab8b26e84b699895a396e5026eee10c060c38","head":{"label":"bhushankawadkar:develop","ref":"develop","sha":"ebeab8b26e84b699895a396e5026eee10c060c38","user":{"login":"bhushankawadkar","id":17117900,"avatar_url":"https://avatars.githubusercontent.com/u/17117900?v=3","gravatar_id":"","url":"https://api.github.com/users/bhushankawadkar","html_url":"https://github.com/bhushankawadkar","followers_url":"https://api.github.com/users/bhushankawadkar/followers","following_url":"https://api.github.com/users/bhushankawadkar/following{/other_user}","gists_url":"https://api.github.com/users/bhushankawadkar/gists{/gist_id}","starred_url":"https://api.github.com/users/bhushankawadkar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhushankawadkar/subscriptions","organizations_url":"https://api.github.com/users/bhushankawadkar/orgs","repos_url":"https://api.github.com/users/bhushankawadkar/repos","events_url":"https://api.github.com/users/bhushankawadkar/events{/privacy}","received_events_url":"https://api.github.com/users/bhushankawadkar/received_events","type":"User","site_admin":false},"repo":{"id":57876540,"name":"hydrator-plugins","full_name":"bhushankawadkar/hydrator-plugins","owner":{"login":"bhushankawadkar","id":17117900,"avatar_url":"https://avatars.githubusercontent.com/u/17117900?v=3","gravatar_id":"","url":"https://api.github.com/users/bhushankawadkar","html_url":"https://github.com/bhushankawadkar","followers_url":"https://api.github.com/users/bhushankawadkar/followers","following_url":"https://api.github.com/users/bhushankawadkar/following{/other_user}","gists_url":"https://api.github.com/users/bhushankawadkar/gists{/gist_id}","starred_url":"https://api.github.com/users/bhushankawadkar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhushankawadkar/subscriptions","organizations_url":"https://api.github.com/users/bhushankawadkar/orgs","repos_url":"https://api.github.com/users/bhushankawadkar/repos","events_url":"https://api.github.com/users/bhushankawadkar/events{/privacy}","received_events_url":"https://api.github.com/users/bhushankawadkar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bhushankawadkar/hydrator-plugins","description":"Cask Hydrator Plugins Repository","fork":true,"url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins","forks_url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins/forks","keys_url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins/teams","hooks_url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins/hooks","issue_events_url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins/issues/events{/number}","events_url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins/events","assignees_url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins/assignees{/user}","branches_url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins/branches{/branch}","tags_url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins/tags","blobs_url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins/git/refs{/sha}","trees_url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins/statuses/{sha}","languages_url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins/languages","stargazers_url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins/stargazers","contributors_url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins/contributors","subscribers_url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins/subscribers","subscription_url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins/subscription","commits_url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins/commits{/sha}","git_commits_url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins/git/commits{/sha}","comments_url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins/comments{/number}","issue_comment_url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins/issues/comments{/number}","contents_url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins/contents/{+path}","compare_url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins/merges","archive_url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins/downloads","issues_url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins/issues{/number}","pulls_url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins/pulls{/number}","milestones_url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins/milestones{/number}","notifications_url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins/labels{/name}","releases_url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins/releases{/id}","deployments_url":"https://api.github.com/repos/bhushankawadkar/hydrator-plugins/deployments","created_at":"2016-05-02T08:59:58Z","updated_at":"2016-05-02T09:00:00Z","pushed_at":"2016-06-14T18:03:55Z","git_url":"git://github.com/bhushankawadkar/hydrator-plugins.git","ssh_url":"git@github.com:bhushankawadkar/hydrator-plugins.git","clone_url":"https://github.com/bhushankawadkar/hydrator-plugins.git","svn_url":"https://github.com/bhushankawadkar/hydrator-plugins","homepage":"","size":2673,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"caskdata:develop","ref":"develop","sha":"1be45fb0c1078adb1595c5b8e1076d27937dea07","user":{"login":"caskdata","id":8123023,"avatar_url":"https://avatars.githubusercontent.com/u/8123023?v=3","gravatar_id":"","url":"https://api.github.com/users/caskdata","html_url":"https://github.com/caskdata","followers_url":"https://api.github.com/users/caskdata/followers","following_url":"https://api.github.com/users/caskdata/following{/other_user}","gists_url":"https://api.github.com/users/caskdata/gists{/gist_id}","starred_url":"https://api.github.com/users/caskdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caskdata/subscriptions","organizations_url":"https://api.github.com/users/caskdata/orgs","repos_url":"https://api.github.com/users/caskdata/repos","events_url":"https://api.github.com/users/caskdata/events{/privacy}","received_events_url":"https://api.github.com/users/caskdata/received_events","type":"Organization","site_admin":false},"repo":{"id":39922362,"name":"hydrator-plugins","full_name":"caskdata/hydrator-plugins","owner":{"login":"caskdata","id":8123023,"avatar_url":"https://avatars.githubusercontent.com/u/8123023?v=3","gravatar_id":"","url":"https://api.github.com/users/caskdata","html_url":"https://github.com/caskdata","followers_url":"https://api.github.com/users/caskdata/followers","following_url":"https://api.github.com/users/caskdata/following{/other_user}","gists_url":"https://api.github.com/users/caskdata/gists{/gist_id}","starred_url":"https://api.github.com/users/caskdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caskdata/subscriptions","organizations_url":"https://api.github.com/users/caskdata/orgs","repos_url":"https://api.github.com/users/caskdata/repos","events_url":"https://api.github.com/users/caskdata/events{/privacy}","received_events_url":"https://api.github.com/users/caskdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/caskdata/hydrator-plugins","description":"Cask Hydrator Plugins Repository","fork":false,"url":"https://api.github.com/repos/caskdata/hydrator-plugins","forks_url":"https://api.github.com/repos/caskdata/hydrator-plugins/forks","keys_url":"https://api.github.com/repos/caskdata/hydrator-plugins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/caskdata/hydrator-plugins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/caskdata/hydrator-plugins/teams","hooks_url":"https://api.github.com/repos/caskdata/hydrator-plugins/hooks","issue_events_url":"https://api.github.com/repos/caskdata/hydrator-plugins/issues/events{/number}","events_url":"https://api.github.com/repos/caskdata/hydrator-plugins/events","assignees_url":"https://api.github.com/repos/caskdata/hydrator-plugins/assignees{/user}","branches_url":"https://api.github.com/repos/caskdata/hydrator-plugins/branches{/branch}","tags_url":"https://api.github.com/repos/caskdata/hydrator-plugins/tags","blobs_url":"https://api.github.com/repos/caskdata/hydrator-plugins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/caskdata/hydrator-plugins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/caskdata/hydrator-plugins/git/refs{/sha}","trees_url":"https://api.github.com/repos/caskdata/hydrator-plugins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/caskdata/hydrator-plugins/statuses/{sha}","languages_url":"https://api.github.com/repos/caskdata/hydrator-plugins/languages","stargazers_url":"https://api.github.com/repos/caskdata/hydrator-plugins/stargazers","contributors_url":"https://api.github.com/repos/caskdata/hydrator-plugins/contributors","subscribers_url":"https://api.github.com/repos/caskdata/hydrator-plugins/subscribers","subscription_url":"https://api.github.com/repos/caskdata/hydrator-plugins/subscription","commits_url":"https://api.github.com/repos/caskdata/hydrator-plugins/commits{/sha}","git_commits_url":"https://api.github.com/repos/caskdata/hydrator-plugins/git/commits{/sha}","comments_url":"https://api.github.com/repos/caskdata/hydrator-plugins/comments{/number}","issue_comment_url":"https://api.github.com/repos/caskdata/hydrator-plugins/issues/comments{/number}","contents_url":"https://api.github.com/repos/caskdata/hydrator-plugins/contents/{+path}","compare_url":"https://api.github.com/repos/caskdata/hydrator-plugins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/caskdata/hydrator-plugins/merges","archive_url":"https://api.github.com/repos/caskdata/hydrator-plugins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/caskdata/hydrator-plugins/downloads","issues_url":"https://api.github.com/repos/caskdata/hydrator-plugins/issues{/number}","pulls_url":"https://api.github.com/repos/caskdata/hydrator-plugins/pulls{/number}","milestones_url":"https://api.github.com/repos/caskdata/hydrator-plugins/milestones{/number}","notifications_url":"https://api.github.com/repos/caskdata/hydrator-plugins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/caskdata/hydrator-plugins/labels{/name}","releases_url":"https://api.github.com/repos/caskdata/hydrator-plugins/releases{/id}","deployments_url":"https://api.github.com/repos/caskdata/hydrator-plugins/deployments","created_at":"2015-07-30T00:14:48Z","updated_at":"2016-06-12T12:57:59Z","pushed_at":"2016-06-14T19:54:27Z","git_url":"git://github.com/caskdata/hydrator-plugins.git","ssh_url":"git@github.com:caskdata/hydrator-plugins.git","clone_url":"https://github.com/caskdata/hydrator-plugins.git","svn_url":"https://github.com/caskdata/hydrator-plugins","homepage":"","size":2942,"stargazers_count":10,"watchers_count":10,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":9,"forks":12,"open_issues":9,"watchers":10,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/caskdata/hydrator-plugins/pulls/285"},"html":{"href":"https://github.com/caskdata/hydrator-plugins/pull/285"},"issue":{"href":"https://api.github.com/repos/caskdata/hydrator-plugins/issues/285"},"comments":{"href":"https://api.github.com/repos/caskdata/hydrator-plugins/issues/285/comments"},"review_comments":{"href":"https://api.github.com/repos/caskdata/hydrator-plugins/pulls/285/comments"},"review_comment":{"href":"https://api.github.com/repos/caskdata/hydrator-plugins/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/caskdata/hydrator-plugins/pulls/285/commits"},"statuses":{"href":"https://api.github.com/repos/caskdata/hydrator-plugins/statuses/ebeab8b26e84b699895a396e5026eee10c060c38"}}}}
{"actor":{"display_login":"anwar6953"}}