Exemplo n.º 1
0
        public override void DoJoinFromProxyHandler(JoinMessageReader request)
        {
            Table       Ta   = new Table(request.cellidsA);
            Table       Tb   = new Table(request.cellidsB);
            List <dint> cond = new List <dint>();

            for (int i = 0; i < request.conda.Count; i++)
            {
                cond.Add(new dint(request.conda[i], request.condb[i]));
            }
            JoinResponceWriter msg = new JoinResponceWriter(Global.MyServerId, (Ta.innerJoin(Tb, cond, false)).getCellIds());

            Global.CloudStorage.REdoJoinFromServerToDatabaseProxy(0, msg);
        }
Exemplo n.º 2
0
        public override void JoinFromClientHandler(JoinMessageReader request, JoinResponceWriter response)
        {
            idDict.Clear();
            List <List <List <long> > > classify = Classify(request.cellidsB, request.condb);

            for (int i = 0; i < Global.ServerCount; i++)
            {
                JoinMessageWriter msg = new JoinMessageWriter(request.cellidsA, classify[i], request.conda, request.condb);
                Global.CloudStorage.DoJoinFromProxyToDatabaseServer(i, msg);
            }
            sem.WaitOne();
            response.celllids = new List <List <long> >();
            for (int i = 0; i < Global.ServerCount; i++)
            {
                response.celllids.AddRange(idDict[i]);
            }
            response.serverid = 0;
        }