{"action":"created","comment":{"url":"https://api.github.com/repos/apache/incubator-carbondata/pulls/comments/84400885","pull_request_review_id":5181938,"id":84400885,"diff_hunk":"@@ -439,42 +436,42 @@ class DataFileLoaderRDD[K, V](\n   }\n \n   override def getPreferredLocations(split: Partition): Seq[String] = {\n-    isTableSplitPartition match {\n-      case true =>\n-        // for table split partition\n-        val theSplit = split.asInstanceOf[CarbonTableSplitPartition]\n-        val location = theSplit.serializableHadoopSplit.value.getLocations.asScala\n-        location\n-      case false =>\n-        // for node partition\n-        val theSplit = split.asInstanceOf[CarbonNodePartition]\n-        val firstOptionLocation: Seq[String] = List(theSplit.serializableHadoopSplit)\n-        logInfo(\"Preferred Location for split : \" + firstOptionLocation(0))\n-        val blockMap = new util.LinkedHashMap[String, Integer]()\n-        val tableBlocks = theSplit.blocksDetails\n-        tableBlocks.foreach(tableBlock => tableBlock.getLocations.foreach(\n-          location => {\n-            if (!firstOptionLocation.exists(location.equalsIgnoreCase(_))) {\n-              val currentCount = blockMap.get(location)\n-              if (currentCount == null) {\n-                blockMap.put(location, 1)\n-              } else {\n-                blockMap.put(location, currentCount + 1)\n-              }\n+    if (isTableSplitPartition) {\n+      // for table split partition\n+      val theSplit = split.asInstanceOf[CarbonTableSplitPartition]\n+      val location = theSplit.serializableHadoopSplit.value.getLocations.asScala\n+      location\n+    } else {\n+      // for node partition\n+      val theSplit = split.asInstanceOf[CarbonNodePartition]\n+      val firstOptionLocation: Seq[String] = List(theSplit.serializableHadoopSplit)\n+      logInfo(\"Preferred Location for split : \" + firstOptionLocation.head)\n+      val blockMap = new util.LinkedHashMap[String, Integer]()\n+      val tableBlocks = theSplit.blocksDetails\n+      tableBlocks.foreach(tableBlock => tableBlock.getLocations.foreach(\n+        location => {\n+          if (!firstOptionLocation.exists(location.equalsIgnoreCase)) {\n+            val currentCount = blockMap.get(location)\n+            if (currentCount == null) {\n+              blockMap.put(location, 1)\n+            } else {\n+              blockMap.put(location, currentCount + 1)\n             }\n           }\n-        )\n-        )\n-\n-        val sortedList = blockMap.entrySet().asScala.toSeq.sortWith((nodeCount1, nodeCount2) => {\n-          nodeCount1.getValue > nodeCount2.getValue\n         }\n-        )\n+      )\n+      )","path":"integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/CarbonDataLoadRDD.scala","position":229,"original_position":229,"commit_id":"64f169a324e6210fd156b6b5a6acc0916c201616","original_commit_id":"64f169a324e6210fd156b6b5a6acc0916c201616","user":{"login":"jackylk","id":6500698,"avatar_url":"https://avatars.githubusercontent.com/u/6500698?v=3","gravatar_id":"","url":"https://api.github.com/users/jackylk","html_url":"https://github.com/jackylk","followers_url":"https://api.github.com/users/jackylk/followers","following_url":"https://api.github.com/users/jackylk/following{/other_user}","gists_url":"https://api.github.com/users/jackylk/gists{/gist_id}","starred_url":"https://api.github.com/users/jackylk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jackylk/subscriptions","organizations_url":"https://api.github.com/users/jackylk/orgs","repos_url":"https://api.github.com/users/jackylk/repos","events_url":"https://api.github.com/users/jackylk/events{/privacy}","received_events_url":"https://api.github.com/users/jackylk/received_events","type":"User","site_admin":false},"body":"indentation is not correct","created_at":"2016-10-21T00:19:44Z","updated_at":"2016-10-21T00:25:29Z","html_url":"https://github.com/apache/incubator-carbondata/pull/248#discussion_r84400885","pull_request_url":"https://api.github.com/repos/apache/incubator-carbondata/pulls/248","_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-carbondata/pulls/comments/84400885"},"html":{"href":"https://github.com/apache/incubator-carbondata/pull/248#discussion_r84400885"},"pull_request":{"href":"https://api.github.com/repos/apache/incubator-carbondata/pulls/248"}}},"pull_request":{"url":"https://api.github.com/repos/apache/incubator-carbondata/pulls/248","id":90050721,"html_url":"https://github.com/apache/incubator-carbondata/pull/248","diff_url":"https://github.com/apache/incubator-carbondata/pull/248.diff","patch_url":"https://github.com/apache/incubator-carbondata/pull/248.patch","issue_url":"https://api.github.com/repos/apache/incubator-carbondata/issues/248","number":248,"state":"open","locked":false,"title":"[CARBONDATA-328] Improve Code and Fix Warnings [Spark]","user":{"login":"PKOfficial","id":5462747,"avatar_url":"https://avatars.githubusercontent.com/u/5462747?v=3","gravatar_id":"","url":"https://api.github.com/users/PKOfficial","html_url":"https://github.com/PKOfficial","followers_url":"https://api.github.com/users/PKOfficial/followers","following_url":"https://api.github.com/users/PKOfficial/following{/other_user}","gists_url":"https://api.github.com/users/PKOfficial/gists{/gist_id}","starred_url":"https://api.github.com/users/PKOfficial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PKOfficial/subscriptions","organizations_url":"https://api.github.com/users/PKOfficial/orgs","repos_url":"https://api.github.com/users/PKOfficial/repos","events_url":"https://api.github.com/users/PKOfficial/events{/privacy}","received_events_url":"https://api.github.com/users/PKOfficial/received_events","type":"User","site_admin":false},"body":"Removed some compliation warnings.\r\nReplace pattern matching for boolean to IF-ELSE.\r\nImproved code according to scala standards.\r\n\r\n\r\n**Please provide details on** \r\n**- Whether new unit test cases have been added or why no new tests are required?**\r\nNot required because no change in functionality.\r\n**- What manual testing you have done?**\r\nRun basic Commands in Beeline.\r\n**- Any additional information to help reviewers in testing this change.**\r\nNo","created_at":"2016-10-19T17:00:40Z","updated_at":"2016-10-21T00:25:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e1aa8b80d3116b02e787c6eb9b66c295db19a0a7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/incubator-carbondata/pulls/248/commits","review_comments_url":"https://api.github.com/repos/apache/incubator-carbondata/pulls/248/comments","review_comment_url":"https://api.github.com/repos/apache/incubator-carbondata/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/incubator-carbondata/issues/248/comments","statuses_url":"https://api.github.com/repos/apache/incubator-carbondata/statuses/64f169a324e6210fd156b6b5a6acc0916c201616","head":{"label":"PKOfficial:improved-code-spark","ref":"improved-code-spark","sha":"64f169a324e6210fd156b6b5a6acc0916c201616","user":{"login":"PKOfficial","id":5462747,"avatar_url":"https://avatars.githubusercontent.com/u/5462747?v=3","gravatar_id":"","url":"https://api.github.com/users/PKOfficial","html_url":"https://github.com/PKOfficial","followers_url":"https://api.github.com/users/PKOfficial/followers","following_url":"https://api.github.com/users/PKOfficial/following{/other_user}","gists_url":"https://api.github.com/users/PKOfficial/gists{/gist_id}","starred_url":"https://api.github.com/users/PKOfficial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PKOfficial/subscriptions","organizations_url":"https://api.github.com/users/PKOfficial/orgs","repos_url":"https://api.github.com/users/PKOfficial/repos","events_url":"https://api.github.com/users/PKOfficial/events{/privacy}","received_events_url":"https://api.github.com/users/PKOfficial/received_events","type":"User","site_admin":false},"repo":{"id":71237457,"name":"incubator-carbondata","full_name":"PKOfficial/incubator-carbondata","owner":{"login":"PKOfficial","id":5462747,"avatar_url":"https://avatars.githubusercontent.com/u/5462747?v=3","gravatar_id":"","url":"https://api.github.com/users/PKOfficial","html_url":"https://github.com/PKOfficial","followers_url":"https://api.github.com/users/PKOfficial/followers","following_url":"https://api.github.com/users/PKOfficial/following{/other_user}","gists_url":"https://api.github.com/users/PKOfficial/gists{/gist_id}","starred_url":"https://api.github.com/users/PKOfficial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PKOfficial/subscriptions","organizations_url":"https://api.github.com/users/PKOfficial/orgs","repos_url":"https://api.github.com/users/PKOfficial/repos","events_url":"https://api.github.com/users/PKOfficial/events{/privacy}","received_events_url":"https://api.github.com/users/PKOfficial/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/PKOfficial/incubator-carbondata","description":"Mirror of Apache CarbonData (Incubating)","fork":true,"url":"https://api.github.com/repos/PKOfficial/incubator-carbondata","forks_url":"https://api.github.com/repos/PKOfficial/incubator-carbondata/forks","keys_url":"https://api.github.com/repos/PKOfficial/incubator-carbondata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PKOfficial/incubator-carbondata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PKOfficial/incubator-carbondata/teams","hooks_url":"https://api.github.com/repos/PKOfficial/incubator-carbondata/hooks","issue_events_url":"https://api.github.com/repos/PKOfficial/incubator-carbondata/issues/events{/number}","events_url":"https://api.github.com/repos/PKOfficial/incubator-carbondata/events","assignees_url":"https://api.github.com/repos/PKOfficial/incubator-carbondata/assignees{/user}","branches_url":"https://api.github.com/repos/PKOfficial/incubator-carbondata/branches{/branch}","tags_url":"https://api.github.com/repos/PKOfficial/incubator-carbondata/tags","blobs_url":"https://api.github.com/repos/PKOfficial/incubator-carbondata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PKOfficial/incubator-carbondata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PKOfficial/incubator-carbondata/git/refs{/sha}","trees_url":"https://api.github.com/repos/PKOfficial/incubator-carbondata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PKOfficial/incubator-carbondata/statuses/{sha}","languages_url":"https://api.github.com/repos/PKOfficial/incubator-carbondata/languages","stargazers_url":"https://api.github.com/repos/PKOfficial/incubator-carbondata/stargazers","contributors_url":"https://api.github.com/repos/PKOfficial/incubator-carbondata/contributors","subscribers_url":"https://api.github.com/repos/PKOfficial/incubator-carbondata/subscribers","subscription_url":"https://api.github.com/repos/PKOfficial/incubator-carbondata/subscription","commits_url":"https://api.github.com/repos/PKOfficial/incubator-carbondata/commits{/sha}","git_commits_url":"https://api.github.com/repos/PKOfficial/incubator-carbondata/git/commits{/sha}","comments_url":"https://api.github.com/repos/PKOfficial/incubator-carbondata/comments{/number}","issue_comment_url":"https://api.github.com/repos/PKOfficial/incubator-carbondata/issues/comments{/number}","contents_url":"https://api.github.com/repos/PKOfficial/incubator-carbondata/contents/{+path}","compare_url":"https://api.github.com/repos/PKOfficial/incubator-carbondata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PKOfficial/incubator-carbondata/merges","archive_url":"https://api.github.com/repos/PKOfficial/incubator-carbondata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PKOfficial/incubator-carbondata/downloads","issues_url":"https://api.github.com/repos/PKOfficial/incubator-carbondata/issues{/number}","pulls_url":"https://api.github.com/repos/PKOfficial/incubator-carbondata/pulls{/number}","milestones_url":"https://api.github.com/repos/PKOfficial/incubator-carbondata/milestones{/number}","notifications_url":"https://api.github.com/repos/PKOfficial/incubator-carbondata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PKOfficial/incubator-carbondata/labels{/name}","releases_url":"https://api.github.com/repos/PKOfficial/incubator-carbondata/releases{/id}","deployments_url":"https://api.github.com/repos/PKOfficial/incubator-carbondata/deployments","created_at":"2016-10-18T10:36:26Z","updated_at":"2016-10-18T10:36:31Z","pushed_at":"2016-10-19T17:01:33Z","git_url":"git://github.com/PKOfficial/incubator-carbondata.git","ssh_url":"git@github.com:PKOfficial/incubator-carbondata.git","clone_url":"https://github.com/PKOfficial/incubator-carbondata.git","svn_url":"https://github.com/PKOfficial/incubator-carbondata","homepage":null,"size":38134,"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":"master"}},"base":{"label":"apache:master","ref":"master","sha":"5279d5b15bf5d0250d9c26a5a936573778b41de6","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","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,"name":"incubator-carbondata","full_name":"apache/incubator-carbondata","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","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/incubator-carbondata","description":"Mirror of Apache CarbonData (Incubating)","fork":false,"url":"https://api.github.com/repos/apache/incubator-carbondata","forks_url":"https://api.github.com/repos/apache/incubator-carbondata/forks","keys_url":"https://api.github.com/repos/apache/incubator-carbondata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/incubator-carbondata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/incubator-carbondata/teams","hooks_url":"https://api.github.com/repos/apache/incubator-carbondata/hooks","issue_events_url":"https://api.github.com/repos/apache/incubator-carbondata/issues/events{/number}","events_url":"https://api.github.com/repos/apache/incubator-carbondata/events","assignees_url":"https://api.github.com/repos/apache/incubator-carbondata/assignees{/user}","branches_url":"https://api.github.com/repos/apache/incubator-carbondata/branches{/branch}","tags_url":"https://api.github.com/repos/apache/incubator-carbondata/tags","blobs_url":"https://api.github.com/repos/apache/incubator-carbondata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/incubator-carbondata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/incubator-carbondata/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/incubator-carbondata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/incubator-carbondata/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/incubator-carbondata/languages","stargazers_url":"https://api.github.com/repos/apache/incubator-carbondata/stargazers","contributors_url":"https://api.github.com/repos/apache/incubator-carbondata/contributors","subscribers_url":"https://api.github.com/repos/apache/incubator-carbondata/subscribers","subscription_url":"https://api.github.com/repos/apache/incubator-carbondata/subscription","commits_url":"https://api.github.com/repos/apache/incubator-carbondata/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/incubator-carbondata/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/incubator-carbondata/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/incubator-carbondata/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/incubator-carbondata/contents/{+path}","compare_url":"https://api.github.com/repos/apache/incubator-carbondata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/incubator-carbondata/merges","archive_url":"https://api.github.com/repos/apache/incubator-carbondata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/incubator-carbondata/downloads","issues_url":"https://api.github.com/repos/apache/incubator-carbondata/issues{/number}","pulls_url":"https://api.github.com/repos/apache/incubator-carbondata/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/incubator-carbondata/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/incubator-carbondata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/incubator-carbondata/labels{/name}","releases_url":"https://api.github.com/repos/apache/incubator-carbondata/releases{/id}","deployments_url":"https://api.github.com/repos/apache/incubator-carbondata/deployments","created_at":"2016-06-28T07:00:06Z","updated_at":"2016-10-19T07:13:15Z","pushed_at":"2016-10-20T18:04:59Z","git_url":"git://github.com/apache/incubator-carbondata.git","ssh_url":"git@github.com:apache/incubator-carbondata.git","clone_url":"https://github.com/apache/incubator-carbondata.git","svn_url":"https://github.com/apache/incubator-carbondata","homepage":null,"size":40027,"stargazers_count":131,"watchers_count":131,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":131,"mirror_url":"git://git.apache.org/incubator-carbondata.git","open_issues_count":37,"forks":131,"open_issues":37,"watchers":131,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-carbondata/pulls/248"},"html":{"href":"https://github.com/apache/incubator-carbondata/pull/248"},"issue":{"href":"https://api.github.com/repos/apache/incubator-carbondata/issues/248"},"comments":{"href":"https://api.github.com/repos/apache/incubator-carbondata/issues/248/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/incubator-carbondata/pulls/248/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/incubator-carbondata/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/incubator-carbondata/pulls/248/commits"},"statuses":{"href":"https://api.github.com/repos/apache/incubator-carbondata/statuses/64f169a324e6210fd156b6b5a6acc0916c201616"}}}}
{"actor":{"display_login":"jackylk"}}