Source:
public void start() throws StoreException { synchronized (lock) { if (started) { throw new StoreException("Store already started", StoreErrorCodes.Store_Already_Started); } final Timer.Context context = metrics.storeStartTime.time(); try { File dataFile = new File(dataDir); if (!dataFile.exists()) { logger.info("Store : data directory not found. creating it", dataDir); boolean created = dataFile.mkdir(); if (!created) { throw new StoreException("Failed to create directory for data dir " + dataDir, StoreErrorCodes.Initialization_Error); } } if (!dataFile.isDirectory() || !dataFile.canRead()) { throw new StoreException(dataFile.getAbsolutePath() + " is either not a directory or is not readable", StoreErrorCodes.Initialization_Error); } fileLock = new FileLock(new File(dataDir, LockFile)); if (!fileLock.tryLock()) { throw new StoreException( "Failed to acquire lock on file " + dataDir + ". Another process or thread is using this directory.", StoreErrorCodes.Initialization_Error); } StoreDescriptor storeDescriptor = new StoreDescriptor(dataDir); log = new Log(dataDir, capacityInBytes, config.storeSegmentSizeInBytes, metrics); compactor = new BlobStoreCompactor(dataDir, storeId, factory, config, metrics, diskIOScheduler, log, taskScheduler, recovery, time, sessionId, storeDescriptor.getIncarnationId()); compactor.fixStateIfRequired(); index = new PersistentIndex(dataDir, taskScheduler, log, config, factory, recovery, hardDelete, metrics, time, sessionId, storeDescriptor.getIncarnationId()); compactor.initialize(index); metrics.initializeIndexGauges(index, capacityInBytes); started = true; } catch (Exception e) { metrics.storeStartFailure.inc(); throw new StoreException("Error while starting store for dir " + dataDir, e, StoreErrorCodes.Initialization_Error); } finally { context.stop(); } } }

Target:
public void start() throws StoreException { synchronized (lock) { if (started) { throw new StoreException("Store already started", StoreErrorCodes.Store_Already_Started); } final Timer.Context context = metrics.storeStartTime.time(); try { File dataFile = new File(dataDir); if (!dataFile.exists()) { logger.info("Store : data directory not found. creating it", dataDir); boolean created = dataFile.mkdir(); if (!created) { throw new StoreException("Failed to create directory for data dir " + dataDir, StoreErrorCodes.Initialization_Error); } } if (!dataFile.isDirectory() || !dataFile.canRead()) { throw new StoreException(dataFile.getAbsolutePath() + " is either not a directory or is not readable", StoreErrorCodes.Initialization_Error); } fileLock = new FileLock(new File(dataDir, LockFile)); if (!fileLock.tryLock()) { throw new StoreException( "Failed to acquire lock on file " + dataDir + ". Another process or thread is using this directory.", StoreErrorCodes.Initialization_Error); } StoreDescriptor storeDescriptor = new StoreDescriptor(dataDir); log = new Log(dataDir, capacityInBytes, config.storeSegmentSizeInBytes, metrics); compactor = new BlobStoreCompactor(dataDir, storeId, factory, config, metrics, diskIOScheduler, log, taskScheduler, recovery, time, sessionId, storeDescriptor.getIncarnationId()); index = new PersistentIndex(dataDir, taskScheduler, log, config, factory, recovery, hardDelete, metrics, time, sessionId, storeDescriptor.getIncarnationId()); compactor.initialize(index); metrics.initializeIndexGauges(index, capacityInBytes); blobStoreStats = new BlobStoreStats(index, time, diskIOScheduler); started = true; } catch (Exception e) { metrics.storeStartFailure.inc(); throw new StoreException("Error while starting store for dir " + dataDir, e, StoreErrorCodes.Initialization_Error); } finally { context.stop(); } } }