Browse Source

add comments

pull/7526/head
chrislu 7 days ago
parent
commit
c86177e063
  1. 5
      other/java/hdfs2/src/main/java/seaweed/hdfs/SeaweedFileSystem.java
  2. 5
      other/java/hdfs3/src/main/java/seaweed/hdfs/SeaweedFileSystem.java

5
other/java/hdfs2/src/main/java/seaweed/hdfs/SeaweedFileSystem.java

@ -105,7 +105,10 @@ public class SeaweedFileSystem extends FileSystem {
// default, 3) null -> HDFS replication // default, 3) null -> HDFS replication
String replicaPlacement = this.getConf().get(FS_SEAWEED_REPLICATION); String replicaPlacement = this.getConf().get(FS_SEAWEED_REPLICATION);
if (replicaPlacement == null) { if (replicaPlacement == null) {
// Not configured, use HDFS replication parameter
// Not configured, use HDFS replication parameter. This creates a "00N"
// replication string,
// placing N (replication-1) extra replicas on different servers in the same
// rack.
replicaPlacement = String.format("%03d", replication - 1); replicaPlacement = String.format("%03d", replication - 1);
} }
int seaweedBufferSize = this.getConf().getInt(FS_SEAWEED_BUFFER_SIZE, FS_SEAWEED_DEFAULT_BUFFER_SIZE); int seaweedBufferSize = this.getConf().getInt(FS_SEAWEED_BUFFER_SIZE, FS_SEAWEED_DEFAULT_BUFFER_SIZE);

5
other/java/hdfs3/src/main/java/seaweed/hdfs/SeaweedFileSystem.java

@ -105,7 +105,10 @@ public class SeaweedFileSystem extends FileSystem {
// default, 3) null -> HDFS replication // default, 3) null -> HDFS replication
String replicaPlacement = this.getConf().get(FS_SEAWEED_REPLICATION); String replicaPlacement = this.getConf().get(FS_SEAWEED_REPLICATION);
if (replicaPlacement == null) { if (replicaPlacement == null) {
// Not configured, use HDFS replication parameter
// Not configured, use HDFS replication parameter. This creates a "00N"
// replication string,
// placing N (replication-1) extra replicas on different servers in the same
// rack.
replicaPlacement = String.format("%03d", replication - 1); replicaPlacement = String.format("%03d", replication - 1);
} }
int seaweedBufferSize = this.getConf().getInt(FS_SEAWEED_BUFFER_SIZE, FS_SEAWEED_DEFAULT_BUFFER_SIZE); int seaweedBufferSize = this.getConf().getInt(FS_SEAWEED_BUFFER_SIZE, FS_SEAWEED_DEFAULT_BUFFER_SIZE);

Loading…
Cancel
Save