{"action":"created","comment":{"url":"https://api.github.com/repos/apache/carbondata/pulls/comments/197716607","pull_request_review_id":131512174,"id":197716607,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NzcxNjYwNw==","diff_hunk":"@@ -0,0 +1,331 @@\n+/*\n+ * Licensed to the Apache Software Foundation (ASF) under one or more\n+ * contributor license agreements.  See the NOTICE file distributed with\n+ * this work for additional information regarding copyright ownership.\n+ * The ASF licenses this file to You under the Apache License, Version 2.0\n+ * (the \"License\"); you may not use this file except in compliance with\n+ * the License.  You may obtain a copy of 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,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package org.apache.carbondata.processing.loading.steps;\n+\n+import java.io.IOException;\n+import java.util.ArrayList;\n+import java.util.Iterator;\n+import java.util.List;\n+import java.util.Map;\n+import java.util.concurrent.atomic.AtomicLong;\n+\n+import org.apache.carbondata.common.CarbonIterator;\n+import org.apache.carbondata.common.logging.LogService;\n+import org.apache.carbondata.common.logging.LogServiceFactory;\n+import org.apache.carbondata.core.datastore.row.CarbonRow;\n+import org.apache.carbondata.core.metadata.datatype.DataType;\n+import org.apache.carbondata.core.metadata.datatype.DataTypes;\n+import org.apache.carbondata.core.metadata.schema.table.column.CarbonColumn;\n+import org.apache.carbondata.core.metadata.schema.table.column.CarbonDimension;\n+import org.apache.carbondata.core.util.CarbonProperties;\n+import org.apache.carbondata.processing.loading.AbstractDataLoadProcessorStep;\n+import org.apache.carbondata.processing.loading.BadRecordsLogger;\n+import org.apache.carbondata.processing.loading.BadRecordsLoggerProvider;\n+import org.apache.carbondata.processing.loading.CarbonDataLoadConfiguration;\n+import org.apache.carbondata.processing.loading.DataField;\n+import org.apache.carbondata.processing.loading.complexobjects.ArrayObject;\n+import org.apache.carbondata.processing.loading.complexobjects.StructObject;\n+import org.apache.carbondata.processing.loading.converter.impl.RowConverterImpl;\n+import org.apache.carbondata.processing.loading.row.CarbonRowBatch;\n+import org.apache.carbondata.processing.util.CarbonBadRecordUtil;\n+\n+import org.apache.htrace.fasterxml.jackson.core.type.TypeReference;\n+import org.apache.htrace.fasterxml.jackson.databind.ObjectMapper;\n+\n+/**\n+ * It reads data from record reader and sends data to next step.\n+ */\n+public class InputProcessorStepWithJsonConverterImpl extends AbstractDataLoadProcessorStep {","path":"processing/src/main/java/org/apache/carbondata/processing/loading/steps/InputProcessorStepWithJsonConverterImpl.java","position":52,"original_position":52,"commit_id":"61deac4c19fa36a7821a50703e7e6b7173d3b6e5","original_commit_id":"61deac4c19fa36a7821a50703e7e6b7173d3b6e5","user":{"login":"ravipesala","id":8134086,"node_id":"MDQ6VXNlcjgxMzQwODY=","avatar_url":"https://avatars2.githubusercontent.com/u/8134086?v=4","gravatar_id":"","url":"https://api.github.com/users/ravipesala","html_url":"https://github.com/ravipesala","followers_url":"https://api.github.com/users/ravipesala/followers","following_url":"https://api.github.com/users/ravipesala/following{/other_user}","gists_url":"https://api.github.com/users/ravipesala/gists{/gist_id}","starred_url":"https://api.github.com/users/ravipesala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ravipesala/subscriptions","organizations_url":"https://api.github.com/users/ravipesala/orgs","repos_url":"https://api.github.com/users/ravipesala/repos","events_url":"https://api.github.com/users/ravipesala/events{/privacy}","received_events_url":"https://api.github.com/users/ravipesala/received_events","type":"User","site_admin":false},"body":"Why is it needed? why is again json parsing done here?","created_at":"2018-06-25T08:33:18Z","updated_at":"2018-06-25T08:33:18Z","html_url":"https://github.com/apache/carbondata/pull/2384#discussion_r197716607","pull_request_url":"https://api.github.com/repos/apache/carbondata/pulls/2384","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/carbondata/pulls/comments/197716607"},"html":{"href":"https://github.com/apache/carbondata/pull/2384#discussion_r197716607"},"pull_request":{"href":"https://api.github.com/repos/apache/carbondata/pulls/2384"}}},"pull_request":{"url":"https://api.github.com/repos/apache/carbondata/pulls/2384","id":195903768,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1OTAzNzY4","html_url":"https://github.com/apache/carbondata/pull/2384","diff_url":"https://github.com/apache/carbondata/pull/2384.diff","patch_url":"https://github.com/apache/carbondata/pull/2384.patch","issue_url":"https://api.github.com/repos/apache/carbondata/issues/2384","number":2384,"state":"open","locked":false,"title":"[CARBONDATA-2608] SDK Support JSON data loading directly (without AVRO conversion)","user":{"login":"ajantha-bhat","id":5889404,"node_id":"MDQ6VXNlcjU4ODk0MDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/5889404?v=4","gravatar_id":"","url":"https://api.github.com/users/ajantha-bhat","html_url":"https://github.com/ajantha-bhat","followers_url":"https://api.github.com/users/ajantha-bhat/followers","following_url":"https://api.github.com/users/ajantha-bhat/following{/other_user}","gists_url":"https://api.github.com/users/ajantha-bhat/gists{/gist_id}","starred_url":"https://api.github.com/users/ajantha-bhat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajantha-bhat/subscriptions","organizations_url":"https://api.github.com/users/ajantha-bhat/orgs","repos_url":"https://api.github.com/users/ajantha-bhat/repos","events_url":"https://api.github.com/users/ajantha-bhat/events{/privacy}","received_events_url":"https://api.github.com/users/ajantha-bhat/received_events","type":"User","site_admin":false},"body":"**What changes were proposed in this pull request?**\r\nCurrently SDK Support JSON data loading only with AVRO.\r\nSo, converting json to avro record and avro to carbon object is a two step process. Hence there is a need for a new carbonWriter that works with Json without AVRO.\r\nThis PR implents that.\r\n\r\nHighlights:\r\n **#Works with just the json data and carbon schema.\r\n #Implements hadoop's FileInputFormat to create JsonInputFormat.\r\n #supports reading multiple json files in a folder.\r\n #supports reading json data in multiline with record identifier.\r\n #supports single row json read and write.\r\n #Handles bad records when loading json data\r\n #Supports n-level nesting of complex types as josn data**\r\n\r\n\r\n**How was this patch tested?**\r\n\r\nManual testing, and UTs are added in this PR.\r\n\r\nBe sure to do all of the following checklist to help us incorporate \r\nyour contribution quickly and easily:\r\n\r\n - [ ] Any interfaces changed? NA\r\n \r\n - [ ] Any backward compatibility impacted? NA\r\n \r\n - [ ] Document update required? Yes, will be handled in separate PR\r\n\r\n - [ ] Testing done\r\nYes, updated the UT.       \r\n - [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.  NA\r\n\r\n","created_at":"2018-06-19T17:33:07Z","updated_at":"2018-06-25T08:33:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fbd564d38d2786116fe2a5748daddc5d075f0c22","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/carbondata/pulls/2384/commits","review_comments_url":"https://api.github.com/repos/apache/carbondata/pulls/2384/comments","review_comment_url":"https://api.github.com/repos/apache/carbondata/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/carbondata/issues/2384/comments","statuses_url":"https://api.github.com/repos/apache/carbondata/statuses/61deac4c19fa36a7821a50703e7e6b7173d3b6e5","head":{"label":"ajantha-bhat:issue_fix","ref":"issue_fix","sha":"61deac4c19fa36a7821a50703e7e6b7173d3b6e5","user":{"login":"ajantha-bhat","id":5889404,"node_id":"MDQ6VXNlcjU4ODk0MDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/5889404?v=4","gravatar_id":"","url":"https://api.github.com/users/ajantha-bhat","html_url":"https://github.com/ajantha-bhat","followers_url":"https://api.github.com/users/ajantha-bhat/followers","following_url":"https://api.github.com/users/ajantha-bhat/following{/other_user}","gists_url":"https://api.github.com/users/ajantha-bhat/gists{/gist_id}","starred_url":"https://api.github.com/users/ajantha-bhat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajantha-bhat/subscriptions","organizations_url":"https://api.github.com/users/ajantha-bhat/orgs","repos_url":"https://api.github.com/users/ajantha-bhat/repos","events_url":"https://api.github.com/users/ajantha-bhat/events{/privacy}","received_events_url":"https://api.github.com/users/ajantha-bhat/received_events","type":"User","site_admin":false},"repo":{"id":115105646,"node_id":"MDEwOlJlcG9zaXRvcnkxMTUxMDU2NDY=","name":"carbondata","full_name":"ajantha-bhat/carbondata","owner":{"login":"ajantha-bhat","id":5889404,"node_id":"MDQ6VXNlcjU4ODk0MDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/5889404?v=4","gravatar_id":"","url":"https://api.github.com/users/ajantha-bhat","html_url":"https://github.com/ajantha-bhat","followers_url":"https://api.github.com/users/ajantha-bhat/followers","following_url":"https://api.github.com/users/ajantha-bhat/following{/other_user}","gists_url":"https://api.github.com/users/ajantha-bhat/gists{/gist_id}","starred_url":"https://api.github.com/users/ajantha-bhat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajantha-bhat/subscriptions","organizations_url":"https://api.github.com/users/ajantha-bhat/orgs","repos_url":"https://api.github.com/users/ajantha-bhat/repos","events_url":"https://api.github.com/users/ajantha-bhat/events{/privacy}","received_events_url":"https://api.github.com/users/ajantha-bhat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ajantha-bhat/carbondata","description":"Mirror of Apache CarbonData","fork":true,"url":"https://api.github.com/repos/ajantha-bhat/carbondata","forks_url":"https://api.github.com/repos/ajantha-bhat/carbondata/forks","keys_url":"https://api.github.com/repos/ajantha-bhat/carbondata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ajantha-bhat/carbondata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ajantha-bhat/carbondata/teams","hooks_url":"https://api.github.com/repos/ajantha-bhat/carbondata/hooks","issue_events_url":"https://api.github.com/repos/ajantha-bhat/carbondata/issues/events{/number}","events_url":"https://api.github.com/repos/ajantha-bhat/carbondata/events","assignees_url":"https://api.github.com/repos/ajantha-bhat/carbondata/assignees{/user}","branches_url":"https://api.github.com/repos/ajantha-bhat/carbondata/branches{/branch}","tags_url":"https://api.github.com/repos/ajantha-bhat/carbondata/tags","blobs_url":"https://api.github.com/repos/ajantha-bhat/carbondata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ajantha-bhat/carbondata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ajantha-bhat/carbondata/git/refs{/sha}","trees_url":"https://api.github.com/repos/ajantha-bhat/carbondata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ajantha-bhat/carbondata/statuses/{sha}","languages_url":"https://api.github.com/repos/ajantha-bhat/carbondata/languages","stargazers_url":"https://api.github.com/repos/ajantha-bhat/carbondata/stargazers","contributors_url":"https://api.github.com/repos/ajantha-bhat/carbondata/contributors","subscribers_url":"https://api.github.com/repos/ajantha-bhat/carbondata/subscribers","subscription_url":"https://api.github.com/repos/ajantha-bhat/carbondata/subscription","commits_url":"https://api.github.com/repos/ajantha-bhat/carbondata/commits{/sha}","git_commits_url":"https://api.github.com/repos/ajantha-bhat/carbondata/git/commits{/sha}","comments_url":"https://api.github.com/repos/ajantha-bhat/carbondata/comments{/number}","issue_comment_url":"https://api.github.com/repos/ajantha-bhat/carbondata/issues/comments{/number}","contents_url":"https://api.github.com/repos/ajantha-bhat/carbondata/contents/{+path}","compare_url":"https://api.github.com/repos/ajantha-bhat/carbondata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ajantha-bhat/carbondata/merges","archive_url":"https://api.github.com/repos/ajantha-bhat/carbondata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ajantha-bhat/carbondata/downloads","issues_url":"https://api.github.com/repos/ajantha-bhat/carbondata/issues{/number}","pulls_url":"https://api.github.com/repos/ajantha-bhat/carbondata/pulls{/number}","milestones_url":"https://api.github.com/repos/ajantha-bhat/carbondata/milestones{/number}","notifications_url":"https://api.github.com/repos/ajantha-bhat/carbondata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ajantha-bhat/carbondata/labels{/name}","releases_url":"https://api.github.com/repos/ajantha-bhat/carbondata/releases{/id}","deployments_url":"https://api.github.com/repos/ajantha-bhat/carbondata/deployments","created_at":"2017-12-22T10:35:58Z","updated_at":"2017-12-22T10:36:05Z","pushed_at":"2018-06-24T16:00:14Z","git_url":"git://github.com/ajantha-bhat/carbondata.git","ssh_url":"git@github.com:ajantha-bhat/carbondata.git","clone_url":"https://github.com/ajantha-bhat/carbondata.git","svn_url":"https://github.com/ajantha-bhat/carbondata","homepage":"","size":82415,"stargazers_count":0,"watchers_count":0,"language":"Scala","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":"master"}},"base":{"label":"apache:master","ref":"master","sha":"d5e86db528031dde50021f69d6ca8f930378736c","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":62117818,"node_id":"MDEwOlJlcG9zaXRvcnk2MjExNzgxOA==","name":"carbondata","full_name":"apache/carbondata","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/carbondata","description":"Mirror of Apache CarbonData","fork":false,"url":"https://api.github.com/repos/apache/carbondata","forks_url":"https://api.github.com/repos/apache/carbondata/forks","keys_url":"https://api.github.com/repos/apache/carbondata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/carbondata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/carbondata/teams","hooks_url":"https://api.github.com/repos/apache/carbondata/hooks","issue_events_url":"https://api.github.com/repos/apache/carbondata/issues/events{/number}","events_url":"https://api.github.com/repos/apache/carbondata/events","assignees_url":"https://api.github.com/repos/apache/carbondata/assignees{/user}","branches_url":"https://api.github.com/repos/apache/carbondata/branches{/branch}","tags_url":"https://api.github.com/repos/apache/carbondata/tags","blobs_url":"https://api.github.com/repos/apache/carbondata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/carbondata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/carbondata/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/carbondata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/carbondata/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/carbondata/languages","stargazers_url":"https://api.github.com/repos/apache/carbondata/stargazers","contributors_url":"https://api.github.com/repos/apache/carbondata/contributors","subscribers_url":"https://api.github.com/repos/apache/carbondata/subscribers","subscription_url":"https://api.github.com/repos/apache/carbondata/subscription","commits_url":"https://api.github.com/repos/apache/carbondata/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/carbondata/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/carbondata/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/carbondata/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/carbondata/contents/{+path}","compare_url":"https://api.github.com/repos/apache/carbondata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/carbondata/merges","archive_url":"https://api.github.com/repos/apache/carbondata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/carbondata/downloads","issues_url":"https://api.github.com/repos/apache/carbondata/issues{/number}","pulls_url":"https://api.github.com/repos/apache/carbondata/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/carbondata/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/carbondata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/carbondata/labels{/name}","releases_url":"https://api.github.com/repos/apache/carbondata/releases{/id}","deployments_url":"https://api.github.com/repos/apache/carbondata/deployments","created_at":"2016-06-28T07:00:06Z","updated_at":"2018-06-22T11:53:36Z","pushed_at":"2018-06-25T08:22:21Z","git_url":"git://github.com/apache/carbondata.git","ssh_url":"git@github.com:apache/carbondata.git","clone_url":"https://github.com/apache/carbondata.git","svn_url":"https://github.com/apache/carbondata","homepage":"","size":59661,"stargazers_count":695,"watchers_count":695,"language":"Scala","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":430,"mirror_url":null,"archived":false,"open_issues_count":86,"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":430,"open_issues":86,"watchers":695,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/carbondata/pulls/2384"},"html":{"href":"https://github.com/apache/carbondata/pull/2384"},"issue":{"href":"https://api.github.com/repos/apache/carbondata/issues/2384"},"comments":{"href":"https://api.github.com/repos/apache/carbondata/issues/2384/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/carbondata/pulls/2384/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/carbondata/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/carbondata/pulls/2384/commits"},"statuses":{"href":"https://api.github.com/repos/apache/carbondata/statuses/61deac4c19fa36a7821a50703e7e6b7173d3b6e5"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ravipesala"}}