internal ShardingInfo GetLatestShardingInfo(string vertexName) { ShardingInfo result = new ShardingInfo(); if (ShardedVertexTable.GetEntriesForVertex(_shardedVertexTable, vertexName).Count() == 0) { return(result); } var entry = ShardedVertexTable.GetLatestEntryForVertex(_shardedVertexTable, vertexName); result.AllShards = entry.AllShards.Split(';').Select(e => Int32.Parse(e)).ToArray(); result.RemovedShards = new int[0]; if (entry.RemovedShards != "") { result.RemovedShards = entry.RemovedShards.Split(';').Select(e => Int32.Parse(e)).ToArray(); } result.AddedShards = new int[0]; if (entry.AddedShards != "") { result.AddedShards = entry.AddedShards.Split(';').Select(e => Int32.Parse(e)).ToArray(); } result.ShardLocator = entry.GetShardLocatorExpr(); return(result); }
internal void GetLatestShardedVertex(string vertexName, out List <string> AllInstances, out List <int> AllShards, out List <int> RemovedShards, out List <int> AddedShards) { var entry = ShardedVertexTable.GetLatestEntryForVertex(_shardedVertexTable, vertexName); AllInstances = entry.AllInstances.Split(';').ToList(); AllShards = entry.AllShards.Split(';').Select(e => Int32.Parse(e)).ToList(); RemovedShards = entry.RemovedShards.Split(';').Select(e => Int32.Parse(e)).ToList(); AddedShards = entry.AddedShards.Split(';').Select(e => Int32.Parse(e)).ToList(); }