Github user LosD commented on a diff in the pull request:
https://github.com/apache/metamodel/pull/36#discussion_r35971009
--- Diff: hadoop/src/main/java/org/apache/metamodel/util/HdfsResource.java
---
@@ -338,4 +386,26 @@ public boolean equals(Object obj) {
return false;
return true;
}
+
+ public boolean getOverwriteIfExits() {
+ return _overwriteIfExists;
+ }
+
+ public void setOverwriteIfExits(boolean overwriteIfExits) {
+ _overwriteIfExists = overwriteIfExits;
+ }
+
+ public void setHadoopConfiguration(Configuration hadoopConfiguration) {
+ _hadoopConfiguration = hadoopConfiguration;
+ }
+
+ public void replicateFile(int replicationFactor) {
+ try {
+ final FileSystem fs = getHadoopFileSystem();
+ fs.setReplication(getHadoopPath(), (short) replicationFactor);
+ } catch (IOException e) {
+ throw new MetaModelException("Could not create replicas for
Hdfs file : " + getHadoopFileSystem() + " "
+ + e.getMessage(), e);
+ }
+ }
--- End diff --
Shouldn't this update the Hadoop configuration as well?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---