Source:
<code>public Factory(FileSystemContext context, WorkerNetAddress address, long blockId, long localReaderChunkSize, InStreamOptions options) throws IOException { AlluxioConfiguration conf = context.getClusterConf(); mBlockId = blockId; mLocalReaderChunkSize = localReaderChunkSize; mReadBufferSize = conf.getInt(PropertyKey.USER_STREAMING_READER_BUFFER_SIZE_MESSAGES); mDataTimeoutMs = conf.getMs(PropertyKey.USER_STREAMING_DATA_TIMEOUT); boolean isDirectMemoryIOEnabled = conf.getBoolean(PropertyKey.USER_DIRECT_MEMORY_IO_ENABLED); if (isDirectMemoryIOEnabled) { mBlockWorker = null; mStream = null; PropertyKey tierDirPathConf = PropertyKey.Template.WORKER_TIERED_STORE_LEVEL_DIRS_PATH.format(0); String ramdiskPath = conf.get(tierDirPathConf).split(",")[0]; String workerDir = conf.get(PropertyKey.WORKER_DATA_FOLDER); <START> mPath = Paths.get(ramdiskPath, workerDir, Long.toString(blockId)).toString(); <END> return; } boolean isPromote = ReadType.fromProto(options.getOptions().getReadType()).isPromote(); OpenLocalBlockRequest request = OpenLocalBlockRequest.newBuilder() .setBlockId(mBlockId).setPromote(isPromote).build(); mBlockWorker = context.acquireBlockWorkerClient(address); try { mStream = new GrpcBlockingStream<>(mBlockWorker.get()::openLocalBlock, mReadBufferSize, MoreObjects.toStringHelper(LocalFileDataReader.class) .add("request", request) .add("address", address) .toString()); mStream.send(request, mDataTimeoutMs); OpenLocalBlockResponse response = mStream.receive(mDataTimeoutMs); Preconditions.checkState(response.hasPath()); mPath = response.getPath(); } catch (Exception e) { mBlockWorker.close(); throw e; } }</code><technical_language>Is required this path is ramdisk? SSD top-tier</technical_language>

Target:
public Factory(FileSystemContext context, WorkerNetAddress address, long blockId, long localReaderChunkSize, InStreamOptions options) throws IOException { AlluxioConfiguration conf = context.getClusterConf(); mBlockId = blockId; mLocalReaderChunkSize = localReaderChunkSize; mReadBufferSize = conf.getInt(PropertyKey.USER_STREAMING_READER_BUFFER_SIZE_MESSAGES); mDataTimeoutMs = conf.getMs(PropertyKey.USER_STREAMING_DATA_TIMEOUT); if (conf.getBoolean(PropertyKey.USER_DIRECT_MEMORY_IO_ENABLED)) { mBlockWorker = null; mStream = null; PropertyKey tierDirPathConf = PropertyKey.Template.WORKER_TIERED_STORE_LEVEL_DIRS_PATH.format(0); String storageDir = conf.get(tierDirPathConf).split(",")[0]; String workerDir = conf.get(PropertyKey.WORKER_DATA_FOLDER); mPath = Paths.get(storageDir, workerDir, Long.toString(blockId)).toString(); return; } boolean isPromote = ReadType.fromProto(options.getOptions().getReadType()).isPromote(); OpenLocalBlockRequest request = OpenLocalBlockRequest.newBuilder() .setBlockId(mBlockId).setPromote(isPromote).build(); mBlockWorker = context.acquireBlockWorkerClient(address); try { mStream = new GrpcBlockingStream<>(mBlockWorker.get()::openLocalBlock, mReadBufferSize, MoreObjects.toStringHelper(LocalFileDataReader.class) .add("request", request) .add("address", address) .toString()); mStream.send(request, mDataTimeoutMs); OpenLocalBlockResponse response = mStream.receive(mDataTimeoutMs); Preconditions.checkState(response.hasPath()); mPath = response.getPath(); } catch (Exception e) { mBlockWorker.close(); throw e; } }