{"action":"created","comment":{"url":"https://api.github.com/repos/apache/metamodel/pulls/comments/35971009","id":35971009,"diff_hunk":"@@ -338,4 +386,26 @@ public boolean equals(Object obj) {\n             return false;\n         return true;\n     }\n+\n+    public boolean getOverwriteIfExits() {\n+        return _overwriteIfExists;\n+    }\n+\n+    public void setOverwriteIfExits(boolean overwriteIfExits) {\n+        _overwriteIfExists = overwriteIfExits;\n+    }\n+\n+    public void setHadoopConfiguration(Configuration hadoopConfiguration) {\n+        _hadoopConfiguration = hadoopConfiguration;\n+    }\n+\n+    public void replicateFile(int replicationFactor) {\n+        try {\n+            final FileSystem fs = getHadoopFileSystem();\n+            fs.setReplication(getHadoopPath(), (short) replicationFactor);\n+        } catch (IOException e) {\n+            throw new MetaModelException(\"Could not create replicas for Hdfs file  : \" + getHadoopFileSystem() + \" \"\n+                    + e.getMessage(), e);\n+        }\n+    }","path":"hadoop/src/main/java/org/apache/metamodel/util/HdfsResource.java","position":121,"original_position":121,"commit_id":"cb82f181b2bf031f6c6c87c58c4800d06913d092","original_commit_id":"cb82f181b2bf031f6c6c87c58c4800d06913d092","user":{"login":"LosD","id":1282832,"avatar_url":"https://avatars.githubusercontent.com/u/1282832?v=3","gravatar_id":"","url":"https://api.github.com/users/LosD","html_url":"https://github.com/LosD","followers_url":"https://api.github.com/users/LosD/followers","following_url":"https://api.github.com/users/LosD/following{/other_user}","gists_url":"https://api.github.com/users/LosD/gists{/gist_id}","starred_url":"https://api.github.com/users/LosD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LosD/subscriptions","organizations_url":"https://api.github.com/users/LosD/orgs","repos_url":"https://api.github.com/users/LosD/repos","events_url":"https://api.github.com/users/LosD/events{/privacy}","received_events_url":"https://api.github.com/users/LosD/received_events","type":"User","site_admin":false},"body":"Shouldn't this update the Hadoop configuration as well?","created_at":"2015-07-31T13:05:24Z","updated_at":"2015-07-31T13:05:24Z","html_url":"https://github.com/apache/metamodel/pull/36#discussion_r35971009","pull_request_url":"https://api.github.com/repos/apache/metamodel/pulls/36","_links":{"self":{"href":"https://api.github.com/repos/apache/metamodel/pulls/comments/35971009"},"html":{"href":"https://github.com/apache/metamodel/pull/36#discussion_r35971009"},"pull_request":{"href":"https://api.github.com/repos/apache/metamodel/pulls/36"}}},"pull_request":{"url":"https://api.github.com/repos/apache/metamodel/pulls/36","id":41323844,"html_url":"https://github.com/apache/metamodel/pull/36","diff_url":"https://github.com/apache/metamodel/pull/36.diff","patch_url":"https://github.com/apache/metamodel/pull/36.patch","issue_url":"https://api.github.com/repos/apache/metamodel/issues/36","number":36,"state":"open","locked":false,"title":"Changed HdfsResource implemention so that Writing to Hadoop is possible.","user":{"login":"ClaudiaPHI","id":6339923,"avatar_url":"https://avatars.githubusercontent.com/u/6339923?v=3","gravatar_id":"","url":"https://api.github.com/users/ClaudiaPHI","html_url":"https://github.com/ClaudiaPHI","followers_url":"https://api.github.com/users/ClaudiaPHI/followers","following_url":"https://api.github.com/users/ClaudiaPHI/following{/other_user}","gists_url":"https://api.github.com/users/ClaudiaPHI/gists{/gist_id}","starred_url":"https://api.github.com/users/ClaudiaPHI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClaudiaPHI/subscriptions","organizations_url":"https://api.github.com/users/ClaudiaPHI/orgs","repos_url":"https://api.github.com/users/ClaudiaPHI/repos","events_url":"https://api.github.com/users/ClaudiaPHI/events{/privacy}","received_events_url":"https://api.github.com/users/ClaudiaPHI/received_events","type":"User","site_admin":false},"body":"This is a part of the story from DataCleaner https://github.com/datacleaner/DataCleaner/issues/494. \r\n\r\nIn Hadoop the default replication factor is 3. After a file is created and closed, it become immutable, because of the replicas. Basically, it means that append is not allowed.  \r\n\r\nWith this change I made it possible to write to Hadoop a CSV file by setting in the configuration the replication factor 1.\r\n\r\nHowever, writing is very slow because the \"CsvUpdateCallback\"  class appends row by row. It can fail anytime if the Hadoop node is leased or other type of failures occur. \r\n\r\n","created_at":"2015-07-31T09:50:40Z","updated_at":"2015-07-31T13:05:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b6bbc23d1ce33d3f88b8d7704d7dfe2f3bc1499c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/metamodel/pulls/36/commits","review_comments_url":"https://api.github.com/repos/apache/metamodel/pulls/36/comments","review_comment_url":"https://api.github.com/repos/apache/metamodel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/metamodel/issues/36/comments","statuses_url":"https://api.github.com/repos/apache/metamodel/statuses/cb82f181b2bf031f6c6c87c58c4800d06913d092","head":{"label":"ClaudiaPHI:feature/Hdfs-resourse-impl-for-DC-494","ref":"feature/Hdfs-resourse-impl-for-DC-494","sha":"cb82f181b2bf031f6c6c87c58c4800d06913d092","user":{"login":"ClaudiaPHI","id":6339923,"avatar_url":"https://avatars.githubusercontent.com/u/6339923?v=3","gravatar_id":"","url":"https://api.github.com/users/ClaudiaPHI","html_url":"https://github.com/ClaudiaPHI","followers_url":"https://api.github.com/users/ClaudiaPHI/followers","following_url":"https://api.github.com/users/ClaudiaPHI/following{/other_user}","gists_url":"https://api.github.com/users/ClaudiaPHI/gists{/gist_id}","starred_url":"https://api.github.com/users/ClaudiaPHI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClaudiaPHI/subscriptions","organizations_url":"https://api.github.com/users/ClaudiaPHI/orgs","repos_url":"https://api.github.com/users/ClaudiaPHI/repos","events_url":"https://api.github.com/users/ClaudiaPHI/events{/privacy}","received_events_url":"https://api.github.com/users/ClaudiaPHI/received_events","type":"User","site_admin":false},"repo":{"id":39995271,"name":"metamodel","full_name":"ClaudiaPHI/metamodel","owner":{"login":"ClaudiaPHI","id":6339923,"avatar_url":"https://avatars.githubusercontent.com/u/6339923?v=3","gravatar_id":"","url":"https://api.github.com/users/ClaudiaPHI","html_url":"https://github.com/ClaudiaPHI","followers_url":"https://api.github.com/users/ClaudiaPHI/followers","following_url":"https://api.github.com/users/ClaudiaPHI/following{/other_user}","gists_url":"https://api.github.com/users/ClaudiaPHI/gists{/gist_id}","starred_url":"https://api.github.com/users/ClaudiaPHI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClaudiaPHI/subscriptions","organizations_url":"https://api.github.com/users/ClaudiaPHI/orgs","repos_url":"https://api.github.com/users/ClaudiaPHI/repos","events_url":"https://api.github.com/users/ClaudiaPHI/events{/privacy}","received_events_url":"https://api.github.com/users/ClaudiaPHI/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ClaudiaPHI/metamodel","description":"Mirror of Apache Metamodel","fork":true,"url":"https://api.github.com/repos/ClaudiaPHI/metamodel","forks_url":"https://api.github.com/repos/ClaudiaPHI/metamodel/forks","keys_url":"https://api.github.com/repos/ClaudiaPHI/metamodel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ClaudiaPHI/metamodel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ClaudiaPHI/metamodel/teams","hooks_url":"https://api.github.com/repos/ClaudiaPHI/metamodel/hooks","issue_events_url":"https://api.github.com/repos/ClaudiaPHI/metamodel/issues/events{/number}","events_url":"https://api.github.com/repos/ClaudiaPHI/metamodel/events","assignees_url":"https://api.github.com/repos/ClaudiaPHI/metamodel/assignees{/user}","branches_url":"https://api.github.com/repos/ClaudiaPHI/metamodel/branches{/branch}","tags_url":"https://api.github.com/repos/ClaudiaPHI/metamodel/tags","blobs_url":"https://api.github.com/repos/ClaudiaPHI/metamodel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ClaudiaPHI/metamodel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ClaudiaPHI/metamodel/git/refs{/sha}","trees_url":"https://api.github.com/repos/ClaudiaPHI/metamodel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ClaudiaPHI/metamodel/statuses/{sha}","languages_url":"https://api.github.com/repos/ClaudiaPHI/metamodel/languages","stargazers_url":"https://api.github.com/repos/ClaudiaPHI/metamodel/stargazers","contributors_url":"https://api.github.com/repos/ClaudiaPHI/metamodel/contributors","subscribers_url":"https://api.github.com/repos/ClaudiaPHI/metamodel/subscribers","subscription_url":"https://api.github.com/repos/ClaudiaPHI/metamodel/subscription","commits_url":"https://api.github.com/repos/ClaudiaPHI/metamodel/commits{/sha}","git_commits_url":"https://api.github.com/repos/ClaudiaPHI/metamodel/git/commits{/sha}","comments_url":"https://api.github.com/repos/ClaudiaPHI/metamodel/comments{/number}","issue_comment_url":"https://api.github.com/repos/ClaudiaPHI/metamodel/issues/comments{/number}","contents_url":"https://api.github.com/repos/ClaudiaPHI/metamodel/contents/{+path}","compare_url":"https://api.github.com/repos/ClaudiaPHI/metamodel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ClaudiaPHI/metamodel/merges","archive_url":"https://api.github.com/repos/ClaudiaPHI/metamodel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ClaudiaPHI/metamodel/downloads","issues_url":"https://api.github.com/repos/ClaudiaPHI/metamodel/issues{/number}","pulls_url":"https://api.github.com/repos/ClaudiaPHI/metamodel/pulls{/number}","milestones_url":"https://api.github.com/repos/ClaudiaPHI/metamodel/milestones{/number}","notifications_url":"https://api.github.com/repos/ClaudiaPHI/metamodel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ClaudiaPHI/metamodel/labels{/name}","releases_url":"https://api.github.com/repos/ClaudiaPHI/metamodel/releases{/id}","created_at":"2015-07-31T08:31:24Z","updated_at":"2015-07-31T08:31:26Z","pushed_at":"2015-07-31T09:33:49Z","git_url":"git://github.com/ClaudiaPHI/metamodel.git","ssh_url":"git@github.com:ClaudiaPHI/metamodel.git","clone_url":"https://github.com/ClaudiaPHI/metamodel.git","svn_url":"https://github.com/ClaudiaPHI/metamodel","homepage":null,"size":4862,"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":"4cdc4e8c129c4143319fff4348aba35ce62123bd","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":11943595,"name":"metamodel","full_name":"apache/metamodel","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/metamodel","description":"Mirror of Apache Metamodel","fork":false,"url":"https://api.github.com/repos/apache/metamodel","forks_url":"https://api.github.com/repos/apache/metamodel/forks","keys_url":"https://api.github.com/repos/apache/metamodel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/metamodel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/metamodel/teams","hooks_url":"https://api.github.com/repos/apache/metamodel/hooks","issue_events_url":"https://api.github.com/repos/apache/metamodel/issues/events{/number}","events_url":"https://api.github.com/repos/apache/metamodel/events","assignees_url":"https://api.github.com/repos/apache/metamodel/assignees{/user}","branches_url":"https://api.github.com/repos/apache/metamodel/branches{/branch}","tags_url":"https://api.github.com/repos/apache/metamodel/tags","blobs_url":"https://api.github.com/repos/apache/metamodel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/metamodel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/metamodel/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/metamodel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/metamodel/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/metamodel/languages","stargazers_url":"https://api.github.com/repos/apache/metamodel/stargazers","contributors_url":"https://api.github.com/repos/apache/metamodel/contributors","subscribers_url":"https://api.github.com/repos/apache/metamodel/subscribers","subscription_url":"https://api.github.com/repos/apache/metamodel/subscription","commits_url":"https://api.github.com/repos/apache/metamodel/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/metamodel/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/metamodel/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/metamodel/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/metamodel/contents/{+path}","compare_url":"https://api.github.com/repos/apache/metamodel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/metamodel/merges","archive_url":"https://api.github.com/repos/apache/metamodel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/metamodel/downloads","issues_url":"https://api.github.com/repos/apache/metamodel/issues{/number}","pulls_url":"https://api.github.com/repos/apache/metamodel/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/metamodel/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/metamodel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/metamodel/labels{/name}","releases_url":"https://api.github.com/repos/apache/metamodel/releases{/id}","created_at":"2013-08-07T07:00:14Z","updated_at":"2015-07-28T10:13:15Z","pushed_at":"2015-07-31T09:50:41Z","git_url":"git://github.com/apache/metamodel.git","ssh_url":"git@github.com:apache/metamodel.git","clone_url":"https://github.com/apache/metamodel.git","svn_url":"https://github.com/apache/metamodel","homepage":null,"size":4862,"stargazers_count":29,"watchers_count":29,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":27,"mirror_url":"git://git.apache.org/incubator-metamodel.git","open_issues_count":6,"forks":27,"open_issues":6,"watchers":29,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/metamodel/pulls/36"},"html":{"href":"https://github.com/apache/metamodel/pull/36"},"issue":{"href":"https://api.github.com/repos/apache/metamodel/issues/36"},"comments":{"href":"https://api.github.com/repos/apache/metamodel/issues/36/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/metamodel/pulls/36/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/metamodel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/metamodel/pulls/36/commits"},"statuses":{"href":"https://api.github.com/repos/apache/metamodel/statuses/cb82f181b2bf031f6c6c87c58c4800d06913d092"}}}}