public InMemoryFileSystem() { try { Logger.Debug("Starting InMemoryFileSystemconstructor"); this.persistentstoreinteraction = new PersistentStoreInteraction(); InMemoryFileSystem fs = this.persistentstoreinteraction.RestoreCheckPoint(); this.clientToFileSystemMap = fs.clientToFileSystemMap; this.lastcheckpoint = fs.lastcheckpoint; Logger.Debug(this.ToString()); Logger.Debug("XXX : " + Utils.getStringFromByteArray(this.clientToFileSystemMap["piyush"].filemap["x.txt"].filecontent)); } catch (Exception e) { Logger.Debug("Exception caught :" + e); throw e; } }
public InMemoryFileSystem() { this.clientToFileSystemMap = new Dictionary <string, UserFileSystem> (); try { Logger.Debug("Starting InMemoryFileSystemconstructor"); this.persistentstoreinteraction = new PersistentStoreInteraction(); InMemoryFileSystem fs = this.persistentstoreinteraction.RestoreCheckPoint(); this.clientToFileSystemMap = fs.clientToFileSystemMap; foreach (KeyValuePair <string, UserFileSystem> entry in this.clientToFileSystemMap) { foreach (KeyValuePair <string, UserFile> innerEntry in entry.Value.filemap) { innerEntry.Value.initializePrivateLock(); } } this.lastcheckpoint = fs.lastcheckpoint; Logger.Debug(this.ToString()); } catch (Exception e) { Logger.Debug("Exception caught while initiliazing in memory file system constructor:" + e); throw e; } }