use of alluxio.AlluxioURI in project alluxio by Alluxio.
the class FileSystemMasterIntegrationTest method deleteRoot.
@Test
public void deleteRoot() throws Exception {
mThrown.expect(InvalidPathException.class);
mThrown.expectMessage(ExceptionMessage.DELETE_ROOT_DIRECTORY.getMessage());
mFsMaster.delete(new AlluxioURI("/"), DeleteOptions.defaults().setRecursive(true));
}
use of alluxio.AlluxioURI in project alluxio by Alluxio.
the class FileSystemMasterIntegrationTest method lastModificationTimeCompleteFile.
@Test
public void lastModificationTimeCompleteFile() throws Exception {
long fileId = mFsMaster.createFile(new AlluxioURI("/testFile"), CreateFileOptions.defaults());
long opTimeMs = TEST_TIME_MS;
mFsMaster.completeFile(new AlluxioURI("/testFile"), CompleteFileOptions.defaults().setOperationTimeMs(opTimeMs).setUfsLength(0));
FileInfo fileInfo = mFsMaster.getFileInfo(fileId);
Assert.assertEquals(opTimeMs, fileInfo.getLastModificationTimeMs());
}
use of alluxio.AlluxioURI in project alluxio by Alluxio.
the class FileSystemMasterIntegrationTest method notFileCompletion.
@Test
public void notFileCompletion() throws Exception {
mThrown.expect(FileDoesNotExistException.class);
mFsMaster.createDirectory(new AlluxioURI("/testFile"), CreateDirectoryOptions.defaults());
CompleteFileOptions options = CompleteFileOptions.defaults();
mFsMaster.completeFile(new AlluxioURI("/testFile"), options);
}
use of alluxio.AlluxioURI in project alluxio by Alluxio.
the class FileSystemMasterIntegrationTest method createFileInvalidPath.
@Test
public void createFileInvalidPath() throws Exception {
mThrown.expect(InvalidPathException.class);
mFsMaster.createFile(new AlluxioURI("testFile"), CreateFileOptions.defaults());
}
use of alluxio.AlluxioURI in project alluxio by Alluxio.
the class FileSystemMasterIntegrationTest method concurrentCreateJournal.
// TODO(calvin): This test currently relies on the fact the HDFS client is a cached instance to
// avoid invalid lease exception. This should be fixed.
@Ignore
@Test
public void concurrentCreateJournal() throws Exception {
// Makes sure the file id's are the same between a master info and the journal it creates
for (int i = 0; i < 5; i++) {
ConcurrentCreator concurrentCreator = new ConcurrentCreator(DEPTH, CONCURRENCY_DEPTH, ROOT_PATH);
concurrentCreator.call();
FileSystemMaster fsMaster = createFileSystemMasterFromJournal();
for (FileInfo info : mFsMaster.listStatus(new AlluxioURI("/"), ListStatusOptions.defaults())) {
AlluxioURI path = new AlluxioURI(info.getPath());
Assert.assertEquals(mFsMaster.getFileId(path), fsMaster.getFileId(path));
}
before();
}
}
Aggregations