public DataBlock(String fileName, StoreConfig storeConfig) throws IOException { this.fileName = fileName; this.fileId = Long.parseLong(fileName.substring(0, fileName.lastIndexOf("."))); this.file = new File(storeConfig.getDataPath(), fileName); this.storeConfig = storeConfig; this.fileSize = storeConfig.getDataBlockFileSize(); this.fileHeader = new DataBlockFileHeader(); this.flushDataService = new FlushDataService(); init(); }
public DataBlock(String fileName, StoreConfig storeConfig) throws IOException { this.fileName = fileName; this.fileId = Long.parseLong(fileName.substring(0, fileName.lastIndexOf("."))); this.file = new File(storeConfig.getDataPath(), fileName); this.storeConfig = storeConfig; this.fileSize = storeConfig.getDataBlockFileSize(); this.fileHeader = new DataBlockFileHeader(); this.flushDataService = new FlushDataService(); init(); }
public DataBlock(String fileName, StoreConfig storeConfig) throws IOException { this.fileName = fileName; this.fileId = Long.parseLong(fileName.substring(0, fileName.lastIndexOf("."))); this.file = new File(storeConfig.getDataPath(), fileName); this.storeConfig = storeConfig; this.fileSize = storeConfig.getDataBlockFileSize(); this.fileHeader = new DataBlockFileHeader(); this.flushDataService = new FlushDataService(); init(); }