Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
sunxiaojian committed May 5, 2023
1 parent 08b5196 commit fb5e6be
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,7 @@ public void initialize(Map<String, Object> configuration) {
STORAGE_TYPE_KEY, FileConfiguration.HDFS.toString()));
this.fileConfiguration = FileConfiguration.valueOf(storageType.toUpperCase());
// build configuration
AbstractConfiguration fileConfiguration =
this.fileConfiguration.getConfiguration(storageType);
AbstractConfiguration fileConfiguration = this.fileConfiguration.getConfiguration();

Configuration hadoopConf = fileConfiguration.buildConfiguration(configuration);
this.conf = hadoopConf;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public enum FileConfiguration {
this.configuration = configuration;
}

public AbstractConfiguration getConfiguration(String name) {
public AbstractConfiguration getConfiguration() {
return configuration;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@

public class HdfsWriter implements IFileWriter<IMapFileData> {

FSDataOutputStream out;
private FSDataOutputStream out;

Serializer serializer;
private Serializer serializer;

@Override
public String identifier() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@

@Slf4j
public class OssWriter implements IFileWriter<IMapFileData> {
FileSystem fs;
Path parentPath;
Path path;
Serializer serializer;
private FileSystem fs;
private Path parentPath;
private Path path;
private Serializer serializer;

ByteBuf bf = Unpooled.buffer(1024);
private ByteBuf bf = Unpooled.buffer(1024);

// block size
long blockSize = 1024 * 1024;
private long blockSize = 1024 * 1024;

AtomicLong index = new AtomicLong(0);
private AtomicLong index = new AtomicLong(0);

@Override
public void initialize(FileSystem fs, Path parentPath, Serializer serializer)
Expand Down Expand Up @@ -114,7 +114,6 @@ public Path createNewPath() {

@Override
public void close() throws Exception {
// No-op
bf.clear();
this.bf = null;
}
Expand Down

0 comments on commit fb5e6be

Please sign in to comment.