static void Check2NodeValue(string n1, string n2, long val) { if (n1 == n2) { return; } var secondVal = ThriftTool.GetSingleCounter(ThriftTool.ToByte(n2), "M01UserRelaction", n1); var org1 = n1; var org2 = n2; //save N1>N2 if (Int32.Parse(n2) > Int32.Parse(n1)) { Utility.Swap(ref n1, ref n2); } var key = n1 + "_" + n2; var sum = val + secondVal; Utility.Logging("\tKey: " + key, Utility.DebugLevel.Info); Utility.Logging("\tsecondVal: " + secondVal, Utility.DebugLevel.Info); Utility.Logging("\tsum: " + sum, Utility.DebugLevel.Info); Utility.Logging("\t" + org1 + ">" + org2 + ": " + val, Utility.DebugLevel.Info); Utility.Logging("\t" + org2 + ">" + org1 + ": " + secondVal, Utility.DebugLevel.Info); //ThriftTool.CounterAdd(key, "M01UserRelactionN2", "sum", val + secondVal); //ThriftTool.CounterAdd(key, "M01UserRelactionN2", org1 + " > " + org2, val); //ThriftTool.CounterAdd(key, "M01UserRelactionN2", org2 + " > " + org1, secondVal); }
static long Get2NodeValue(string n1, string n2) { if (int.Parse(n2) > int.Parse(n1)) { Utility.Swap(ref n1, ref n2); } return(ThriftTool.GetSingleCounter(ThriftTool.ToByte(n1 + "_" + n2), "M01UserRelactionN2", "sum")); }