Search in sources :

Example 1 with SimpleFileManager

use of alluxio.hub.agent.util.file.SimpleFileManager in project alluxio by Alluxio.

the class AgentProcessContext method getFileManager.

private FileManager getFileManager(UploadProcessType uploadType) {
    return mFileManager.computeIfAbsent(uploadType, key -> {
        Pair<String, String> processInfo = getProcessInfo(uploadType);
        String rootDir;
        if (key.equals(UploadProcessType.ALLUXIO)) {
            rootDir = PathUtils.concatPath(mConf.get(PropertyKey.CONF_DIR), UPLOAD_SUBDIR);
        } else {
            rootDir = PathUtils.concatPath(mConf.get(PropertyKey.HUB_MANAGER_PRESTO_CONF_PATH), UPLOAD_SUBDIR);
        }
        return new SimpleFileManager(rootDir, processInfo.getFirst(), processInfo.getSecond());
    });
}
Also used : SimpleFileManager(alluxio.hub.agent.util.file.SimpleFileManager) ByteString(com.google.protobuf.ByteString)

Aggregations

SimpleFileManager (alluxio.hub.agent.util.file.SimpleFileManager)1 ByteString (com.google.protobuf.ByteString)1