/** * Create an underfs test bed and register the shutdown hook. * * @param baseDir base directory * @param tachyonConf Tachyon configuration * @throws IOException when the operation fails * @return an instance of the UnderFileSystemCluster class */ public static synchronized UnderFileSystemCluster get(String baseDir, TachyonConf tachyonConf) throws IOException { if (sUnderFSCluster == null) { sUnderFSCluster = getUnderFilesystemCluster(baseDir, tachyonConf); } if (!sUnderFSCluster.isStarted()) { sUnderFSCluster.start(); sUnderFSCluster.registerJVMOnExistHook(); } return sUnderFSCluster; }