Ejemplo n.º 1
0
 public Proxy(string port, int bCount, List <string> nPorts)
 {
     proxyPort   = port;
     bucketCount = bCount;
     nodePorts   = nPorts;
     bst         = new BucketShardTableService();
     bst.LoadCurrentTable();
     kbt = new KeyBucketTableService();
     kbt.LoadCurrentTable();
 }
Ejemplo n.º 2
0
        public void Analize(KeyBucketTableService kbt, BucketShardTableService bst)
        {
            Dictionary <int, string> BSTable = bst.GetNewTable();

            foreach (var row in BSTable)
            {
                if (row.Value != bst.GetTable()[row.Key])
                {
                    Reshard(bst.GetTable()[row.Key], row.Value, FindRowsFromBucket(row.Key, kbt.GetTable()));
                    bst.ChangeShard(row.Key, BSTable[row.Key]);
                }
            }
        }