use of alluxio.EmbeddedNoExceptionChannel in project alluxio by Alluxio.
the class DataServerBlockReadHandlerTest method before.
@Before
public void before() throws Exception {
ResourceLeakDetector.setLevel(ResourceLeakDetector.Level.ADVANCED);
mBlockWorker = Mockito.mock(BlockWorker.class);
Mockito.doNothing().when(mBlockWorker).accessBlock(Mockito.anyLong(), Mockito.anyLong());
mChannel = new EmbeddedChannel(new DataServerBlockReadHandler(NettyExecutors.BLOCK_READER_EXECUTOR, mBlockWorker, FileTransferType.MAPPED));
mChannelNoException = new EmbeddedNoExceptionChannel(new DataServerBlockReadHandler(NettyExecutors.BLOCK_READER_EXECUTOR, mBlockWorker, FileTransferType.MAPPED));
}
use of alluxio.EmbeddedNoExceptionChannel in project alluxio by Alluxio.
the class DataServerUFSFileReadHandlerTest method before.
@Before
public void before() throws Exception {
ResourceLeakDetector.setLevel(ResourceLeakDetector.Level.ADVANCED);
mFileSystemWorker = Mockito.mock(FileSystemWorker.class);
mChannel = new EmbeddedChannel(new DataServerUFSFileReadHandler(NettyExecutors.UFS_BLOCK_READER_EXECUTOR, mFileSystemWorker));
mChannelNoException = new EmbeddedNoExceptionChannel(new DataServerUFSFileReadHandler(NettyExecutors.UFS_BLOCK_READER_EXECUTOR, mFileSystemWorker));
}
use of alluxio.EmbeddedNoExceptionChannel in project alluxio by Alluxio.
the class DataServerUFSFileWriteHandlerTest method before.
@Before
public void before() throws Exception {
mFileSystemWorker = Mockito.mock(FileSystemWorker.class);
mFile = mTestFolder.newFile().getPath();
mOutputStream = new FileOutputStream(mFile);
Mockito.when(mFileSystemWorker.getUfsOutputStream(Mockito.anyLong())).thenReturn(mOutputStream);
mChecksum = 0;
mChannel = new EmbeddedChannel(new DataServerUFSFileWriteHandler(NettyExecutors.FILE_WRITER_EXECUTOR, mFileSystemWorker));
mChannelNoException = new EmbeddedNoExceptionChannel(new DataServerUFSFileWriteHandler(NettyExecutors.FILE_WRITER_EXECUTOR, mFileSystemWorker));
}
use of alluxio.EmbeddedNoExceptionChannel in project alluxio by Alluxio.
the class DataServerBlockWriteHandlerTest method before.
@Before
public void before() throws Exception {
mBlockWorker = Mockito.mock(BlockWorker.class);
Mockito.doNothing().when(mBlockWorker).createBlockRemote(Mockito.anyLong(), Mockito.anyLong(), Mockito.anyString(), Mockito.anyLong());
Mockito.doNothing().when(mBlockWorker).requestSpace(Mockito.anyLong(), Mockito.anyLong(), Mockito.anyLong());
mFile = mTestFolder.newFile().getPath();
mBlockWriter = new LocalFileBlockWriter(mFile);
Mockito.when(mBlockWorker.getTempBlockWriterRemote(Mockito.anyLong(), Mockito.anyLong())).thenReturn(mBlockWriter);
mChecksum = 0;
mChannel = new EmbeddedChannel(new DataServerBlockWriteHandler(NettyExecutors.BLOCK_WRITER_EXECUTOR, mBlockWorker));
mChannelNoException = new EmbeddedNoExceptionChannel(new DataServerBlockWriteHandler(NettyExecutors.BLOCK_WRITER_EXECUTOR, mBlockWorker));
}
Aggregations