public PartitionData(Partition partition, JournalMetadata metadata, ColumnStorage journalStorage, string journalPath) { Partition = partition; Metadata = metadata; JournalStorage = journalStorage; JournalPath = journalPath; }
private PartitionManager CreatePartitionManager(JournalMetadata meta, string partitionString) { string defPath = meta.Settings.DefaultPath; if (!Directory.Exists(defPath)) { Directory.CreateDirectory(defPath); } string pfile = Path.Combine(defPath, MetadataConstants.PARTITION_TYPE_FILENAME); File.WriteAllText(pfile, partitionString); return(new PartitionManager(meta, EFileAccess.ReadWrite, new CompositeFileFactory(), new Mock <IJournalServer>().Object)); }
private PartitionManager CreatePartitionManager <T>(EPartitionType pariPartitionType, DisposableTempDir dir, ICompositeFileFactory compositeFileFactory, EFileAccess access, string[] paritions, params string[] symbols) { CreateSubDirs(paritions, dir.DirName); JournalMetadata meta = CreateMetadata <T>(pariPartitionType, dir.DirName, symbols); var txLog = new Mock <ITxLog>(); txLog.Setup(s => s.Get()).Returns(new TxRec { JournalMaxRowID = RowIDUtil.ToRowID(1, 10) }); var part = new PartitionManager(meta, access, compositeFileFactory, new AsyncJournalServer(TimeSpan.FromSeconds(1)), txLog.Object); return(part); }
private PartitionManager CreatePartitionManager(JournalMetadata meta, ICompositeFileFactory compositeFileFactory, EFileAccess access = EFileAccess.ReadWrite) { return(new PartitionManager(meta, access, compositeFileFactory, new Mock <IJournalServer>().Object)); }