{"action":"created","comment":{"url":"https://api.github.com/repos/apache/incubator-reef/pulls/comments/34492547","id":34492547,"diff_hunk":"@@ -0,0 +1,80 @@\n+/*\n+ * Licensed to the Apache Software Foundation (ASF) under one\n+ * or more contributor license agreements.  See the NOTICE file\n+ * distributed with this work for additional information\n+ * regarding copyright ownership.  The ASF licenses this file\n+ * to you under the Apache License, Version 2.0 (the\n+ * \"License\"); you may not use this file except in compliance\n+ * with 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,\n+ * software distributed under the License is distributed on an\n+ * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n+ * KIND, either express or implied.  See the License for the\n+ * specific language governing permissions and limitations\n+ * under the License.\n+ */\n+package org.apache.reef.io.data.loading.impl;\n+\n+import org.apache.commons.lang.builder.EqualsBuilder;\n+import org.apache.commons.lang3.builder.HashCodeBuilder;\n+\n+/**\n+ * POJO that represents a data partition. Basically, it contains the path where\n+ * the data files are located for this partition, and the location where we want\n+ * this data to be loaded into.\n+ *\n+ */\n+public final class DataPartition {\n+\n+  public static final String ANY = \"/*\";\n+\n+  /**\n+   * The path of the folder.\n+   */\n+  private final String path;\n+\n+  /**\n+   * The location (either a rackName or a nodeName) where we want the data\n+   * in this partition to be loaded into.\n+   */\n+  private final String location;\n+\n+  public DataPartition(final String path, final String location) {","path":"lang/java/reef-io/src/main/java/org/apache/reef/io/data/loading/impl/DataPartition.java","position":45,"original_position":45,"commit_id":"0a2ada564846a649006318f0b511de85a16604b6","original_commit_id":"0a2ada564846a649006318f0b511de85a16604b6","user":{"login":"nachocano","id":4714124,"avatar_url":"https://avatars.githubusercontent.com/u/4714124?v=3","gravatar_id":"","url":"https://api.github.com/users/nachocano","html_url":"https://github.com/nachocano","followers_url":"https://api.github.com/users/nachocano/followers","following_url":"https://api.github.com/users/nachocano/following{/other_user}","gists_url":"https://api.github.com/users/nachocano/gists{/gist_id}","starred_url":"https://api.github.com/users/nachocano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nachocano/subscriptions","organizations_url":"https://api.github.com/users/nachocano/orgs","repos_url":"https://api.github.com/users/nachocano/repos","events_url":"https://api.github.com/users/nachocano/events{/privacy}","received_events_url":"https://api.github.com/users/nachocano/received_events","type":"User","site_admin":false},"body":"You mean a builder or a factory?\r\nThe factory in order to construct this object will need to have path and location as well.\r\n\r\n","created_at":"2015-07-13T18:08:17Z","updated_at":"2015-07-13T18:08:17Z","html_url":"https://github.com/apache/incubator-reef/pull/290#discussion_r34492547","pull_request_url":"https://api.github.com/repos/apache/incubator-reef/pulls/290","_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-reef/pulls/comments/34492547"},"html":{"href":"https://github.com/apache/incubator-reef/pull/290#discussion_r34492547"},"pull_request":{"href":"https://api.github.com/repos/apache/incubator-reef/pulls/290"}}},"pull_request":{"url":"https://api.github.com/repos/apache/incubator-reef/pulls/290","id":39727361,"html_url":"https://github.com/apache/incubator-reef/pull/290","diff_url":"https://github.com/apache/incubator-reef/pull/290.diff","patch_url":"https://github.com/apache/incubator-reef/pull/290.patch","issue_url":"https://api.github.com/repos/apache/incubator-reef/issues/290","number":290,"state":"open","locked":false,"title":"[REEF-469] Assign data splits to specific evaluators","user":{"login":"nachocano","id":4714124,"avatar_url":"https://avatars.githubusercontent.com/u/4714124?v=3","gravatar_id":"","url":"https://api.github.com/users/nachocano","html_url":"https://github.com/nachocano","followers_url":"https://api.github.com/users/nachocano/followers","following_url":"https://api.github.com/users/nachocano/following{/other_user}","gists_url":"https://api.github.com/users/nachocano/gists{/gist_id}","starred_url":"https://api.github.com/users/nachocano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nachocano/subscriptions","organizations_url":"https://api.github.com/users/nachocano/orgs","repos_url":"https://api.github.com/users/nachocano/repos","events_url":"https://api.github.com/users/nachocano/events{/privacy}","received_events_url":"https://api.github.com/users/nachocano/received_events","type":"User","site_admin":false},"body":"This commit allows to assign data splits to the different evaluators using the DataLoadingService.\r\nSeveral changes were done. \r\nThe main one is to inject a strategy into InputFormatLoadingService, which is in charge of assigning splits to evaluators.\r\nNew data types needed to be created. For example, DataPartition, which is just a folder, but has a location field, where the user can specify where she would like to load that data into (in certain node or rack).\r\nWe have LocationAwareJobConfs now, which binds the typical hadoop JobConf and the DataPartition objects.\r\nI had to create external constructors for them. And removed unnecessary ones.\r\nI also removed the EvaluatorToPartitionMapper class, most of its logic has been placed in the AbstractEvaluatorToSplitStrategy one.\r\n\r\nJIRA:\r\n  [REEF-469](https://issues.apache.org/jira/browse/REEF-469)\r\n\r\nPull Request:\r\n  This closes","created_at":"2015-07-10T21:42:44Z","updated_at":"2015-07-13T18:08:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f135907863035ce0a111007991a6be3f4362cb83","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/incubator-reef/pulls/290/commits","review_comments_url":"https://api.github.com/repos/apache/incubator-reef/pulls/290/comments","review_comment_url":"https://api.github.com/repos/apache/incubator-reef/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/incubator-reef/issues/290/comments","statuses_url":"https://api.github.com/repos/apache/incubator-reef/statuses/0a2ada564846a649006318f0b511de85a16604b6","head":{"label":"nachocano:REEF-469-1","ref":"REEF-469-1","sha":"0a2ada564846a649006318f0b511de85a16604b6","user":{"login":"nachocano","id":4714124,"avatar_url":"https://avatars.githubusercontent.com/u/4714124?v=3","gravatar_id":"","url":"https://api.github.com/users/nachocano","html_url":"https://github.com/nachocano","followers_url":"https://api.github.com/users/nachocano/followers","following_url":"https://api.github.com/users/nachocano/following{/other_user}","gists_url":"https://api.github.com/users/nachocano/gists{/gist_id}","starred_url":"https://api.github.com/users/nachocano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nachocano/subscriptions","organizations_url":"https://api.github.com/users/nachocano/orgs","repos_url":"https://api.github.com/users/nachocano/repos","events_url":"https://api.github.com/users/nachocano/events{/privacy}","received_events_url":"https://api.github.com/users/nachocano/received_events","type":"User","site_admin":false},"repo":{"id":37559431,"name":"incubator-reef","full_name":"nachocano/incubator-reef","owner":{"login":"nachocano","id":4714124,"avatar_url":"https://avatars.githubusercontent.com/u/4714124?v=3","gravatar_id":"","url":"https://api.github.com/users/nachocano","html_url":"https://github.com/nachocano","followers_url":"https://api.github.com/users/nachocano/followers","following_url":"https://api.github.com/users/nachocano/following{/other_user}","gists_url":"https://api.github.com/users/nachocano/gists{/gist_id}","starred_url":"https://api.github.com/users/nachocano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nachocano/subscriptions","organizations_url":"https://api.github.com/users/nachocano/orgs","repos_url":"https://api.github.com/users/nachocano/repos","events_url":"https://api.github.com/users/nachocano/events{/privacy}","received_events_url":"https://api.github.com/users/nachocano/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nachocano/incubator-reef","description":"Mirror of Apache REEF (Incubating)","fork":true,"url":"https://api.github.com/repos/nachocano/incubator-reef","forks_url":"https://api.github.com/repos/nachocano/incubator-reef/forks","keys_url":"https://api.github.com/repos/nachocano/incubator-reef/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nachocano/incubator-reef/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nachocano/incubator-reef/teams","hooks_url":"https://api.github.com/repos/nachocano/incubator-reef/hooks","issue_events_url":"https://api.github.com/repos/nachocano/incubator-reef/issues/events{/number}","events_url":"https://api.github.com/repos/nachocano/incubator-reef/events","assignees_url":"https://api.github.com/repos/nachocano/incubator-reef/assignees{/user}","branches_url":"https://api.github.com/repos/nachocano/incubator-reef/branches{/branch}","tags_url":"https://api.github.com/repos/nachocano/incubator-reef/tags","blobs_url":"https://api.github.com/repos/nachocano/incubator-reef/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nachocano/incubator-reef/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nachocano/incubator-reef/git/refs{/sha}","trees_url":"https://api.github.com/repos/nachocano/incubator-reef/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nachocano/incubator-reef/statuses/{sha}","languages_url":"https://api.github.com/repos/nachocano/incubator-reef/languages","stargazers_url":"https://api.github.com/repos/nachocano/incubator-reef/stargazers","contributors_url":"https://api.github.com/repos/nachocano/incubator-reef/contributors","subscribers_url":"https://api.github.com/repos/nachocano/incubator-reef/subscribers","subscription_url":"https://api.github.com/repos/nachocano/incubator-reef/subscription","commits_url":"https://api.github.com/repos/nachocano/incubator-reef/commits{/sha}","git_commits_url":"https://api.github.com/repos/nachocano/incubator-reef/git/commits{/sha}","comments_url":"https://api.github.com/repos/nachocano/incubator-reef/comments{/number}","issue_comment_url":"https://api.github.com/repos/nachocano/incubator-reef/issues/comments{/number}","contents_url":"https://api.github.com/repos/nachocano/incubator-reef/contents/{+path}","compare_url":"https://api.github.com/repos/nachocano/incubator-reef/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nachocano/incubator-reef/merges","archive_url":"https://api.github.com/repos/nachocano/incubator-reef/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nachocano/incubator-reef/downloads","issues_url":"https://api.github.com/repos/nachocano/incubator-reef/issues{/number}","pulls_url":"https://api.github.com/repos/nachocano/incubator-reef/pulls{/number}","milestones_url":"https://api.github.com/repos/nachocano/incubator-reef/milestones{/number}","notifications_url":"https://api.github.com/repos/nachocano/incubator-reef/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nachocano/incubator-reef/labels{/name}","releases_url":"https://api.github.com/repos/nachocano/incubator-reef/releases{/id}","created_at":"2015-06-16T22:30:05Z","updated_at":"2015-06-16T22:30:10Z","pushed_at":"2015-07-13T16:12:49Z","git_url":"git://github.com/nachocano/incubator-reef.git","ssh_url":"git@github.com:nachocano/incubator-reef.git","clone_url":"https://github.com/nachocano/incubator-reef.git","svn_url":"https://github.com/nachocano/incubator-reef","homepage":null,"size":30204,"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":"28e5ec030c3fab0118224a6ad147ffa05de1ead8","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":25623941,"name":"incubator-reef","full_name":"apache/incubator-reef","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-reef","description":"Mirror of Apache REEF (Incubating)","fork":false,"url":"https://api.github.com/repos/apache/incubator-reef","forks_url":"https://api.github.com/repos/apache/incubator-reef/forks","keys_url":"https://api.github.com/repos/apache/incubator-reef/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/incubator-reef/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/incubator-reef/teams","hooks_url":"https://api.github.com/repos/apache/incubator-reef/hooks","issue_events_url":"https://api.github.com/repos/apache/incubator-reef/issues/events{/number}","events_url":"https://api.github.com/repos/apache/incubator-reef/events","assignees_url":"https://api.github.com/repos/apache/incubator-reef/assignees{/user}","branches_url":"https://api.github.com/repos/apache/incubator-reef/branches{/branch}","tags_url":"https://api.github.com/repos/apache/incubator-reef/tags","blobs_url":"https://api.github.com/repos/apache/incubator-reef/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/incubator-reef/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/incubator-reef/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/incubator-reef/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/incubator-reef/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/incubator-reef/languages","stargazers_url":"https://api.github.com/repos/apache/incubator-reef/stargazers","contributors_url":"https://api.github.com/repos/apache/incubator-reef/contributors","subscribers_url":"https://api.github.com/repos/apache/incubator-reef/subscribers","subscription_url":"https://api.github.com/repos/apache/incubator-reef/subscription","commits_url":"https://api.github.com/repos/apache/incubator-reef/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/incubator-reef/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/incubator-reef/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/incubator-reef/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/incubator-reef/contents/{+path}","compare_url":"https://api.github.com/repos/apache/incubator-reef/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/incubator-reef/merges","archive_url":"https://api.github.com/repos/apache/incubator-reef/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/incubator-reef/downloads","issues_url":"https://api.github.com/repos/apache/incubator-reef/issues{/number}","pulls_url":"https://api.github.com/repos/apache/incubator-reef/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/incubator-reef/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/incubator-reef/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/incubator-reef/labels{/name}","releases_url":"https://api.github.com/repos/apache/incubator-reef/releases{/id}","created_at":"2014-10-23T07:00:10Z","updated_at":"2015-07-03T08:22:28Z","pushed_at":"2015-07-13T18:07:15Z","git_url":"git://github.com/apache/incubator-reef.git","ssh_url":"git@github.com:apache/incubator-reef.git","clone_url":"https://github.com/apache/incubator-reef.git","svn_url":"https://github.com/apache/incubator-reef","homepage":null,"size":41952,"stargazers_count":23,"watchers_count":23,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":28,"mirror_url":"git://git.apache.org/incubator-reef.git","open_issues_count":8,"forks":28,"open_issues":8,"watchers":23,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-reef/pulls/290"},"html":{"href":"https://github.com/apache/incubator-reef/pull/290"},"issue":{"href":"https://api.github.com/repos/apache/incubator-reef/issues/290"},"comments":{"href":"https://api.github.com/repos/apache/incubator-reef/issues/290/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/incubator-reef/pulls/290/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/incubator-reef/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/incubator-reef/pulls/290/commits"},"statuses":{"href":"https://api.github.com/repos/apache/incubator-reef/statuses/0a2ada564846a649006318f0b511de85a16604b6"}}}}