Search in sources :

Example 1 with AkStream

use of com.alibaba.alink.common.io.filesystem.AkStream in project Alink by alibaba.

the class FileModelStreamSink method open.

public void open(Timestamp modelId, int subId) throws IOException {
    BaseFileSystem<?> fileSystem = filePath.getFileSystem();
    Path confDirPath = new Path(filePath.getPath(), MODEL_CONF);
    Path fileInProgress = new Path(confDirPath, String.format("%s_%d", ModelStreamUtils.toStringPresentation(modelId), subId));
    collector = new AkStream(new FilePath(fileInProgress, fileSystem), new AkMeta(schemaStr)).getWriter().getCollector();
}
Also used : FilePath(com.alibaba.alink.common.io.filesystem.FilePath) Path(org.apache.flink.core.fs.Path) FilePath(com.alibaba.alink.common.io.filesystem.FilePath) AkStream(com.alibaba.alink.common.io.filesystem.AkStream) AkMeta(com.alibaba.alink.common.io.filesystem.AkUtils.AkMeta)

Aggregations

AkStream (com.alibaba.alink.common.io.filesystem.AkStream)1 AkMeta (com.alibaba.alink.common.io.filesystem.AkUtils.AkMeta)1 FilePath (com.alibaba.alink.common.io.filesystem.FilePath)1 Path (org.apache.flink.core.fs.Path)1