Browse Source

上一版本bug修复。

Jay Lee 6 years ago
parent
commit
c99bae89f2

+ 123 - 4
collect/src/main/java/com/saga/main/Main.java

@@ -187,11 +187,22 @@ public class Main {
 
 		for (String db : dbList.keySet()) {
 			try {
+
 				createDB(db);
-				Thread.sleep(Constant.Millisecond.SECOND_1);
-				// dropTB(db);
+				// //V1.0点位日志结构
+				// {
 				// Thread.sleep(Constant.Millisecond.SECOND_1);
-				createTB(db);
+				// // dropTB(db);
+				// // Thread.sleep(Constant.Millisecond.SECOND_1);
+				// createTB(db);
+				// }
+				// V2.0点位日志结构
+				{
+					dropTB2(db);
+					Thread.sleep(Constant.Millisecond.SECOND_1);
+					createTB2(db);
+				}
+
 				Thread.sleep(Constant.Millisecond.SECOND_1);
 			} catch (InterruptedException e) {
 				// TODO Auto-generated catch block
@@ -201,6 +212,114 @@ public class Main {
 		}
 	}
 
+	private static void createTB2(String db) {
+		// TODO Auto-generated method stub
+		try {
+			HBaseUtil.CreateTable(Constant.agent, db, "original_month");
+			Thread.sleep(Constant.Millisecond.SECOND_3);
+			HBaseUtil.CreateTable_present(Constant.agent, db, "original_present");
+			Thread.sleep(Constant.Millisecond.SECOND_3);
+			HBaseUtil.CreateTable_set(Constant.agent, db, "originalset");
+			Thread.sleep(Constant.Millisecond.SECOND_3);
+			HBaseUtil.CreateTable_setpresent(Constant.agent, db, "originalset_present");
+			Thread.sleep(Constant.Millisecond.SECOND_3);
+			// dy_pointlist
+			HBaseUtil.CreateTable_dy_pointlist(Constant.agent, db, "dy_pointlist");
+			Thread.sleep(Constant.Millisecond.SECOND_3);
+
+			// ps_physical_status
+			HBaseUtil.CreateTable_ps_physical_status(Constant.agent, db, "ps_physical_status");
+			Thread.sleep(Constant.Millisecond.SECOND_3);
+
+			// ps_physical_log
+			HBaseUtil.CreateTable_ps_physical_log(Constant.agent, db, "ps_physical_log");
+			Thread.sleep(Constant.Millisecond.SECOND_3);
+
+			// ps_virtual_point_status
+			HBaseUtil.CreateTable_ps_virtual_point_status(Constant.agent, db, "ps_virtual_point_status");
+			Thread.sleep(Constant.Millisecond.SECOND_3);
+
+			// ps_virtual_point_log
+			HBaseUtil.CreateTable_ps_virtual_point_log(Constant.agent, db, "ps_virtual_point_log");
+			Thread.sleep(Constant.Millisecond.SECOND_3);
+
+			// ps_virtual_meter_status
+			HBaseUtil.CreateTable_ps_virtual_meter_status(Constant.agent, db, "ps_virtual_meter_status");
+			Thread.sleep(Constant.Millisecond.SECOND_3);
+
+			// ps_virtual_meter_log
+			HBaseUtil.CreateTable_ps_virtual_meter_log(Constant.agent, db, "ps_virtual_meter_log");
+			Thread.sleep(Constant.Millisecond.SECOND_3);
+
+			// ps_virtual_project_status
+			HBaseUtil.CreateTable_ps_virtual_project_status(Constant.agent, db, "ps_virtual_project_status");
+			Thread.sleep(Constant.Millisecond.SECOND_3);
+
+			// ps_virtual_project_log
+			HBaseUtil.CreateTable_ps_virtual_project_log(Constant.agent, db, "ps_virtual_project_log");
+			Thread.sleep(Constant.Millisecond.SECOND_3);
+
+			Thread.sleep(Constant.Millisecond.SECOND_30);
+		} catch (Exception e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+	private static void dropTB2(String db) {
+		// TODO Auto-generated method stub
+		try {
+			Constant.agent.DDL_DropTable(db, "original_month");
+			Thread.sleep(Constant.Millisecond.SECOND_3);
+			Constant.agent.DDL_DropTable(db, "original_present");
+			Thread.sleep(Constant.Millisecond.SECOND_3);
+			Constant.agent.DDL_DropTable(db, "originalset");
+			Thread.sleep(Constant.Millisecond.SECOND_3);
+			Constant.agent.DDL_DropTable(db, "originalset_present");
+			Thread.sleep(Constant.Millisecond.SECOND_3);
+			// dy_pointlist
+			Constant.agent.DDL_DropTable(db, "dy_pointlist");
+			Thread.sleep(Constant.Millisecond.SECOND_3);
+
+			// ps_physical_status
+			Constant.agent.DDL_DropTable(db, "ps_physical_status");
+			Thread.sleep(Constant.Millisecond.SECOND_3);
+
+			// ps_physical_log
+			Constant.agent.DDL_DropTable(db, "ps_physical_log");
+			Thread.sleep(Constant.Millisecond.SECOND_3);
+
+			// ps_virtual_point_status
+			Constant.agent.DDL_DropTable(db, "ps_virtual_point_status");
+			Thread.sleep(Constant.Millisecond.SECOND_3);
+
+			// ps_virtual_point_log
+			Constant.agent.DDL_DropTable(db, "ps_virtual_point_log");
+			Thread.sleep(Constant.Millisecond.SECOND_3);
+
+			// ps_virtual_meter_status
+			Constant.agent.DDL_DropTable(db, "ps_virtual_meter_status");
+			Thread.sleep(Constant.Millisecond.SECOND_3);
+
+			// ps_virtual_meter_log
+			Constant.agent.DDL_DropTable(db, "ps_virtual_meter_log");
+			Thread.sleep(Constant.Millisecond.SECOND_3);
+
+			// ps_virtual_project_status
+			Constant.agent.DDL_DropTable(db, "ps_virtual_project_status");
+			Thread.sleep(Constant.Millisecond.SECOND_3);
+
+			// ps_virtual_project_log
+			Constant.agent.DDL_DropTable(db, "ps_virtual_project_log");
+			Thread.sleep(Constant.Millisecond.SECOND_3);
+
+			Thread.sleep(Constant.Millisecond.SECOND_30);
+		} catch (Exception e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
 	private static void createTB(String db) {
 		// TODO Auto-generated method stub
 		try {
@@ -273,7 +392,7 @@ public class Main {
 			configuration.addResource(new FileInputStream(System.getProperty("user.dir") + resource));
 			String zookeeper_connectionAddress = "zookeeper1:2181,zookeeper2:2181,zookeeper3:2181";
 
-			if ("test".equalsIgnoreCase(args[0])) {
+			if (args != null && args.length > 0 && "test".equalsIgnoreCase(args[0])) {
 				// zookeeper_connectionAddress =
 				// "zk01.td.com:2181,zk02.td.com:2181,zk03.td.com:2181";
 				zookeeper_connectionAddress = "zookeeper1,zookeeper2,zookeeper3";

+ 23 - 23
collect/src/main/java/com/saga/thread/common/CheckThread.java

@@ -61,7 +61,7 @@ public class CheckThread extends Thread {
 			try {
 				// CollectorStatus
 				// LogUtil.info("Constant.nodeList:" + Constant.nodeList);
-				for (Entry<String, Long> node : Constant.nodeList.entrySet()) {
+				for (Entry<String, Long> node : Constant.ps_NodeStatus.entrySet()) {
 					try {
 						String building = node.getKey().split("-")[0];
 						String mac = node.getKey().split("-")[1];
@@ -100,9 +100,9 @@ public class CheckThread extends Thread {
 				// Iterator<Entry<String, Long>> pu =
 				// Constant.pointListUp.entrySet().iterator();
 				Map<String, Long> pu = new HashMap<String, Long>();
-				synchronized (Constant.pointListUp) {
-					if (Constant.pointListUp.size() > 0) {
-						pu.putAll(Constant.pointListUp);
+				synchronized (Constant.ps_PointStatusUp) {
+					if (Constant.ps_PointStatusUp.size() > 0) {
+						pu.putAll(Constant.ps_PointStatusUp);
 					}
 				}
 				for (Entry<String, Long> pointUp : pu.entrySet()) {
@@ -165,15 +165,15 @@ public class CheckThread extends Thread {
 				try {
 					List<String> nk = new ArrayList<String>();
 					List<String> ps = new ArrayList<String>();
-					synchronized (Constant.id2time) {
-						Iterator<Entry<String, Long>> it = Constant.id2time.entrySet().iterator();
+					synchronized (Constant.ps_ID2Time) {
+						Iterator<Entry<String, Long>> it = Constant.ps_ID2Time.entrySet().iterator();
 						while (it.hasNext()) {
 							try {
 								Entry<String, Long> n = it.next();
 
-								String building = Constant.id2point.get(n.getKey()).split("-")[0];
-								String mac = Constant.id2point.get(n.getKey()).split("-")[1];
-								String point = Constant.id2point.get(n.getKey()).split("-")[2];
+								String building = Constant.ps_ID2Point.get(n.getKey()).split("-")[0];
+								String mac = Constant.ps_ID2Point.get(n.getKey()).split("-")[1];
+								String point = Constant.ps_ID2Point.get(n.getKey()).split("-")[2];
 
 								String[] slist = point.split("\\.");
 								StringBuffer sb = new StringBuffer();
@@ -193,7 +193,7 @@ public class CheckThread extends Thread {
 										&& System.currentTimeMillis() - n.getValue() > Constant.Millisecond.SECOND_10) {
 									try {
 										if ("finish:finish:success"
-												.equalsIgnoreCase(Constant.id2status.get(n.getKey()))) {
+												.equalsIgnoreCase(Constant.ps_ID2Status.get(n.getKey()))) {
 											// HBaseUtil.InsertPointStatus(Constant.agent,
 											// Constant.BuildingDB.get(building),
 											// building, this.ip, mac, meter,
@@ -205,8 +205,8 @@ public class CheckThread extends Thread {
 											ps.add(Constant.BuildingDB.get(building) + ";" + building + ";" + this.ip
 													+ ";" + mac + ";" + meter + ";" + funcid + ";" + "down" + ";"
 													+ "conn" + ";"
-													+ Constant.format(new Date(Constant.id2time.get(n.getKey()))) + ";"
-													+ Constant.id2status.get(n.getKey()));
+													+ Constant.format(new Date(Constant.ps_ID2Time.get(n.getKey()))) + ";"
+													+ Constant.ps_ID2Status.get(n.getKey()));
 										} else {
 											// Constant.pointListDown.put(n.getKey(),
 											// null);
@@ -221,8 +221,8 @@ public class CheckThread extends Thread {
 											ps.add(Constant.BuildingDB.get(building) + ";" + building + ";" + this.ip
 													+ ";" + mac + ";" + meter + ";" + funcid + ";" + "down" + ";"
 													+ "disconn" + ";"
-													+ Constant.format(new Date(Constant.id2time.get(n.getKey()))) + ";"
-													+ Constant.id2status.get(n.getKey()));
+													+ Constant.format(new Date(Constant.ps_ID2Time.get(n.getKey()))) + ";"
+													+ Constant.ps_ID2Status.get(n.getKey()));
 										}
 
 									} catch (Exception e) {
@@ -239,24 +239,24 @@ public class CheckThread extends Thread {
 						}
 					}
 
-					synchronized (Constant.id2point) {
+					synchronized (Constant.ps_ID2Point) {
 						for (String k : nk) {
-							if (Constant.id2point.containsKey(k)) {
-								Constant.id2point.remove(k);
+							if (Constant.ps_ID2Point.containsKey(k)) {
+								Constant.ps_ID2Point.remove(k);
 							}
 						}
 					}
-					synchronized (Constant.id2status) {
+					synchronized (Constant.ps_ID2Status) {
 						for (String k : nk) {
-							if (Constant.id2status.containsKey(k)) {
-								Constant.id2status.remove(k);
+							if (Constant.ps_ID2Status.containsKey(k)) {
+								Constant.ps_ID2Status.remove(k);
 							}
 						}
 					}
-					synchronized (Constant.id2function) {
+					synchronized (Constant.ps_ID2Function) {
 						for (String k : nk) {
-							if (Constant.id2function.containsKey(k)) {
-								Constant.id2function.remove(k);
+							if (Constant.ps_ID2Function.containsKey(k)) {
+								Constant.ps_ID2Function.remove(k);
 							}
 						}
 					}

+ 5 - 5
collect/src/main/java/com/saga/thread/common/SaveThread.java

@@ -117,7 +117,7 @@ public class SaveThread extends Thread {
 				}
 				Iterator<String> it = this.streportList.iterator();
 				int c = 0;
-				synchronized (Constant.pointListUp) {
+				synchronized (Constant.ps_PointStatusUp) {
 					while (it.hasNext()) {
 						try {
 							String report = it.next().replace("(", "").replace(")", "").replace(" ", "");
@@ -144,7 +144,7 @@ public class SaveThread extends Thread {
 												record.data = Double.valueOf(rList[8 + 2 * i]);
 												// synchronized
 												// (Constant.pointListUp) {
-												Constant.pointListUp.put(
+												Constant.ps_PointStatusUp.put(
 														building + "-" + mac + "-" + meter + "." + record.funcID,
 														System.currentTimeMillis());
 												// }
@@ -156,7 +156,7 @@ public class SaveThread extends Thread {
 														: (rList[9 + i * 3]);
 												// synchronized
 												// (Constant.pointListUp) {
-												Constant.pointListUp.put(
+												Constant.ps_PointStatusUp.put(
 														building + "-" + mac + "-" + meter + "." + record.funcID,
 														System.currentTimeMillis());
 
@@ -296,7 +296,7 @@ public class SaveThread extends Thread {
 												Constant.collectReportCount++;
 												record.funcID = Integer.valueOf(rList[7 + 2 * i]);
 												record.data = Double.valueOf(rList[8 + 2 * i]);
-												Constant.pointListUp.put(
+												Constant.ps_PointStatusUp.put(
 														building + "-" + mac + "-" + meter + "." + record.funcID,
 														System.currentTimeMillis());
 												// // PointCommunicationLogÌí¼Ó¼Ç¼
@@ -312,7 +312,7 @@ public class SaveThread extends Thread {
 												record.data = Double.valueOf(rList[8 + 3 * i]);
 												record.addtion = "null".equalsIgnoreCase(rList[9 + i * 3]) ? ""
 														: (rList[9 + i * 3]);
-												Constant.pointListUp.put(
+												Constant.ps_PointStatusUp.put(
 														building + "-" + mac + "-" + meter + "." + record.funcID,
 														System.currentTimeMillis());
 												// // PointCommunicationLogÌí¼Ó¼Ç¼

+ 9 - 9
collect/src/main/java/com/saga/thread/down/CollectThread.java

@@ -130,7 +130,7 @@ public class CollectThread extends Thread {
 									String cmd = sb.toString();
 
 									String id = ps.buildingSignUP + "-" + ps.mac + "-" + ps.ID;
-									Constant.id2status.put(id, "processing:sent");
+									Constant.ps_ID2Status.put(id, "processing:sent");
 									HBaseUtil.InsertPointCommunicationLog(Constant.agent,
 											Constant.BuildingDB.get(ps.buildingSignUP), ps.buildingSignUP, this.ip,
 											ps.mac, ps.meterSign, String.valueOf(ps.funcID), "down", "senddownset",
@@ -186,7 +186,7 @@ public class CollectThread extends Thread {
 						// 1101070037;1;report;20010203040506;123;1001;2;11;3.1;12;3.2
 						Constant.pointMAC.put(rList[0] + "-" + rList[5], rList[1]);
 						Constant.collectCount++;
-						Constant.nodeList.put(rList[0] + "-" + rList[1], System.currentTimeMillis());
+						Constant.ps_NodeStatus.put(rList[0] + "-" + rList[1], System.currentTimeMillis());
 						// LogUtil.info("CollectThread Challenge
 						// Constant.CollectReportList begin...");
 						// synchronized (Constant.CollectReportList) {
@@ -236,7 +236,7 @@ public class CollectThread extends Thread {
 					} else if ("reportaddtion".equalsIgnoreCase(rList[2]) && rList.length > 7) {
 						Constant.pointMAC.put(rList[0] + "-" + rList[5], rList[1]);
 						Constant.collectCount++;
-						Constant.nodeList.put(rList[0] + "-" + rList[1], System.currentTimeMillis());
+						Constant.ps_NodeStatus.put(rList[0] + "-" + rList[1], System.currentTimeMillis());
 						// LogUtil.info("CollectThread Challenge
 						// Constant.CollectReportList begin...");
 						// synchronized (Constant.CollectReportList) {
@@ -288,8 +288,8 @@ public class CollectThread extends Thread {
 						// LogUtil.info("handlePacket Ack end...");
 					} else if ("senddownsetack".equalsIgnoreCase(rList[2])) {
 						String id = rList[0] + "-" + rList[1] + "-" + rList[4];
-						synchronized (Constant.id2status) {
-							Constant.id2status.put(id, "processing:finish:" + rList[7]);
+						synchronized (Constant.ps_ID2Status) {
+							Constant.ps_ID2Status.put(id, "processing:finish:" + rList[7]);
 						}
 						this.updatePointSet(rList);
 						// 1101070037;1;senddownsetack;20010203040506;123;1001;11;success
@@ -331,7 +331,7 @@ public class CollectThread extends Thread {
 						// p.address + " " + rList[0] + ";" + rList[1]
 						// + ";" + "connectack" + ";" + Constant.format(new
 						// Date()));
-						Constant.nodeList.put(rList[0] + "-" + rList[1], System.currentTimeMillis());
+						Constant.ps_NodeStatus.put(rList[0] + "-" + rList[1], System.currentTimeMillis());
 						// this.insertCollectorCommunicationLog(rList);
 
 						// 1101070037;1;pointcount;;19317
@@ -350,7 +350,7 @@ public class CollectThread extends Thread {
 						// p.address + " " + rList[0] + ";" + rList[1]
 						// + ";" + "heartack" + ";" + Constant.format(new
 						// Date()));
-						Constant.nodeList.put(rList[0] + "-" + rList[1], System.currentTimeMillis());
+						Constant.ps_NodeStatus.put(rList[0] + "-" + rList[1], System.currentTimeMillis());
 						// this.insertCollectorCommunicationLog(rList);
 						if (this.needGetPointList()) {
 							int id = Constant.getID();
@@ -384,8 +384,8 @@ public class CollectThread extends Thread {
 							String funcid = rList[10 + 2 * i];
 							String key = building + "-" + mac + "-" + meter + "." + funcid;
 							// synchronized (Constant.pointListUp) {
-							if (!Constant.pointListUp.containsKey(key)) {
-								Constant.pointListUp.put(key, null);
+							if (!Constant.ps_PointStatusUp.containsKey(key)) {
+								Constant.ps_PointStatusUp.put(key, null);
 							}
 							// }
 							// if (!Constant.pointListDown.containsKey(key))

+ 12 - 12
collect/src/main/java/com/saga/thread/up/SendThread.java

@@ -114,8 +114,8 @@ public class SendThread extends Thread {
 									Constant.BuildingDB.get(ps.buildingSignUP), ps.buildingSignUP, this.ip, ps.mac,
 									ps.meterSign, String.valueOf(ps.funcID), "down", "pointsetack",
 									String.valueOf(ps.ID), Constant.format(new Date()), "finish:finish:" + ps.status);
-							synchronized (Constant.id2status) {
-								Constant.id2status.put(id, "finish:finish:" + ps.status);
+							synchronized (Constant.ps_ID2Status) {
+								Constant.ps_ID2Status.put(id, "finish:finish:" + ps.status);
 							}
 
 							// CSVUtil.insert(Constant.setlog, new
@@ -150,8 +150,8 @@ public class SendThread extends Thread {
 									String.valueOf(ps.ID), Constant.format(new Date()),
 									"finish:finish:" + "fail:timeout");
 
-							synchronized (Constant.id2status) {
-								Constant.id2status.put(id, "finish:finish:" + "fail:timeout");
+							synchronized (Constant.ps_ID2Status) {
+								Constant.ps_ID2Status.put(id, "finish:finish:" + "fail:timeout");
 							}
 							// LogUtil.info("InsertPointCommunicationLog" + "
 							// end");
@@ -226,17 +226,17 @@ public class SendThread extends Thread {
 
 					if ("pointset".equalsIgnoreCase(rList[2])) {
 						// 1101070037;1;pointset;;123;1001;11;3.1
-						synchronized (Constant.id2time) {
-							Constant.id2time.put(id, System.currentTimeMillis());
+						synchronized (Constant.ps_ID2Time) {
+							Constant.ps_ID2Time.put(id, System.currentTimeMillis());
 						}
-						synchronized (Constant.id2point) {
-							Constant.id2point.put(id, key);
+						synchronized (Constant.ps_ID2Point) {
+							Constant.ps_ID2Point.put(id, key);
 						}
-						synchronized (Constant.id2function) {
-							Constant.id2function.put(id, rList[2]);
+						synchronized (Constant.ps_ID2Function) {
+							Constant.ps_ID2Function.put(id, rList[2]);
 						}
-						synchronized (Constant.id2status) {
-							Constant.id2status.put(id, "processing:rcvd");
+						synchronized (Constant.ps_ID2Status) {
+							Constant.ps_ID2Status.put(id, "processing:rcvd");
 						}
 
 						PointSet ps = new PointSet();

+ 15 - 6
collect/src/main/java/com/saga/util/Constant.java

@@ -52,17 +52,26 @@ public class Constant {
 	public static Map<Integer, String> PortHistory = new HashMap<Integer, String>();
 	public static Map<String, Integer> RecordAddress = new HashMap<String, Integer>();
 	public static List<Record> RecordList = new ArrayList<Record>();
-	public static Map<String, Long> nodeList = new HashMap<String, Long>();
-	public static Map<String, Long> pointListUp = new HashMap<String, Long>();
+
+	public static Map<String, Long> ps_NodeStatus = new HashMap<String, Long>();
+	public static Map<String, Long> ps_PointStatusUp = new HashMap<String, Long>();
+	public static Map<String, Long> ps_PhysicalStatus = new HashMap<String, Long>();
+	public static Map<String, Long> ps_ProjectStatus = new HashMap<String, Long>();
+	public static Map<String, Long> ps_MeterStatusUp = new HashMap<String, Long>();
+
+	public static Map<String, String> ps_PhysicalList = new HashMap<String, String>();
+	public static Map<String, String> ps_ProjectList = new HashMap<String, String>();
+	public static Map<String, String> ps_MeterListUp = new HashMap<String, String>();
+
 	public static Map<String, String> pointInfo = new HashMap<String, String>();
 	public static Map<String, Data> nodeCache = new HashMap<String, Data>();
 	public static Map<String, Data> pointCache = new HashMap<String, Data>();
 	// public static Map<String, Long> pointListDown = new HashMap<String,
 	// Long>();
-	public static Map<String, Long> id2time = new HashMap<String, Long>();
-	public static Map<String, String> id2point = new HashMap<String, String>();
-	public static Map<String, String> id2function = new HashMap<String, String>();
-	public static Map<String, String> id2status = new HashMap<String, String>();
+	public static Map<String, Long> ps_ID2Time = new HashMap<String, Long>();
+	public static Map<String, String> ps_ID2Point = new HashMap<String, String>();
+	public static Map<String, String> ps_ID2Function = new HashMap<String, String>();
+	public static Map<String, String> ps_ID2Status = new HashMap<String, String>();
 	public static int collectRec = 0;
 	public static int collectSend = 0;
 	public static int sendRec = 0;

+ 56 - 2
collect/src/main/java/com/saga/util/HBaseUtil.java

@@ -16,6 +16,60 @@ import com.sagacloud.json.JSONObject;
 import com.zillion.database.agent.ZillionAgent;
 
 public class HBaseUtil {
+	public static void LoadDB2Cache_dy_pointlist(ZillionAgent agent, String db, String tb, String project)
+			throws Exception {
+		// 序号 名称 数据类型 释义 备注
+		// 1 building String 楼号 主键
+		// 2 meter String 表号 主键
+		// 3 funcid Long 功能号 主键
+		// 4 system String 系统
+		// 5 source String 数据来源
+		// 6 address_1 String 一级地址 采集器网关ID
+		// 7 address_2 String 二级地址 总线端口号
+		// 8 address_3 String 三级地址 仪表地址
+		// 9 address_4 String 四级地址
+		// 10 collect_cycle String 采集频率 采集器上传频率
+		// 11 data_type String 点位类型 Acc:累积变量;Inst:瞬时变量;Boolv:通断变量;
+		// Enumv:状态变量;Step:阶跃变量
+	}
+
+	public static void LoadDB2Cache_ps_physical_status(ZillionAgent agent, String db, String tb, String project)
+			throws Exception {
+		// 序号 名称 数据类型 释义 备注
+		// 1 project String 项目名 主键
+		// 2 address_1 String 一级地址 主键
+		// 3 address_2 String 二级地址 主键
+		// 4 address_3 String 三级地址 主键
+		// 5 address_4 String 四级地址 主键
+		// 6 status String 状态 conn/disconn
+		// 7 receivetime String 时间 最近通讯时间
+		// 8 detail String 详情
+		JSONObject Criteria = new JSONObject();
+		Criteria.put("project", project);
+
+		JSONObject wrapperObject = new JSONObject();
+		wrapperObject.put("QueryType", "select");
+		wrapperObject.put("Database", db);
+		wrapperObject.put("Datatable", tb);
+		wrapperObject.put("Criteria", Criteria);
+		LogUtil.info("Reload Project:" + project + "  ps_physical_status Begin...");
+		JSONObject queryResult = agent.Query(wrapperObject);
+		JSONArray resultContent = (JSONArray) queryResult.get("Content");
+		for (int i = 0; i < resultContent.size(); i++) {
+			JSONObject dataItem = (JSONObject) resultContent.get(i);
+			String address_1 = (String) dataItem.get("address_1");
+			String address_2 = (String) dataItem.get("address_2");
+			String address_3 = (String) dataItem.get("address_3");
+			String address_4 = (String) dataItem.get("address_4");
+			String key = project + ";" + address_1 + ";" + address_2 + ";" + address_3 + ";" + address_4;
+			String receivetime = (String) dataItem.get("receivetime");
+			Constant.ps_NodeStatus.put(key, Constant.parse(receivetime).getTime());
+
+		}
+		LogUtil.info("Reload Project:" + project + "  CollectorStatus End...");
+
+	}
+
 	public static void GetCollectorStatus(ZillionAgent agent, String db, String tb, String project) throws Exception {
 
 		JSONObject Criteria = new JSONObject();
@@ -36,7 +90,7 @@ public class HBaseUtil {
 			String node = (String) dataItem.get("gateway");
 			String key = project + "-" + node;
 			String receivetime = (String) dataItem.get("receivetime");
-			Constant.nodeList.put(key, Constant.parse(receivetime).getTime());
+			Constant.ps_NodeStatus.put(key, Constant.parse(receivetime).getTime());
 			LogUtil.info("project " + project + " collector " + Constant.getLocalHostLANAddress().getHostAddress() + ":"
 					+ Constant.TypePort.get("Down") + " gateway " + node + " " + System.currentTimeMillis() + " "
 					+ Constant.parse(receivetime).getTime());
@@ -69,7 +123,7 @@ public class HBaseUtil {
 			if ("up".equalsIgnoreCase(updown)) {
 				String key = project + "-" + node + "-" + meter + "." + funcid;
 				String receivetime = (String) dataItem.get("receivetime");
-				Constant.pointListUp.put(key, Constant.parse(receivetime).getTime());
+				Constant.ps_PointStatusUp.put(key, Constant.parse(receivetime).getTime());
 				LogUtil.info("project " + project + " collector " + Constant.getLocalHostLANAddress().getHostAddress()
 						+ ":" + Constant.TypePort.get("Down") + " gateway " + node + " meter " + meter + " funcid "
 						+ funcid + " " + System.currentTimeMillis() + " " + Constant.parse(receivetime).getTime());