Merge branch 'web_backend_develope' of https://git.trustie.net/fhx569287825/aggregation-platform into web_backend_develope
	
		
	
				
					
				
			
						commit
						4002c4d74d
					
				| @ -1,49 +1,49 @@ | |||||||
| 
 | 
 | ||||||
| package com.platform.utils; | package com.platform.utils; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| public class Constant { | public class Constant { | ||||||
| 	public static String rootUser = "root"; | 	public static String rootUser = "root"; | ||||||
| 	public static String rootPasswd = "root"; | 	public static String rootPasswd = "root"; | ||||||
| //	public static String hostIp = "192.168.191.23";
 | //	public static String hostIp = "192.168.191.23";
 | ||||||
| 	public static String hostIp = ""; | 	public static String hostIp = ""; | ||||||
| 	public static int port = 22; | 	public static int port = 22; | ||||||
| 	public static String glusterPeerStatus = "gluster peer status"; | 	public static String glusterPeerStatus = "gluster peer status"; | ||||||
| 	public static String glusterVolumeInfo = "gluster volume info "; | 	public static String glusterVolumeInfo = "gluster volume info "; | ||||||
| 	public static String df = "df -k "; | 	public static String df = "df -k "; | ||||||
| 	public static String peerincluster_connected = "PeerinCluster(Connected)"; | 	public static String peerincluster_connected = "PeerinCluster(Connected)"; | ||||||
| 	public static String peerincluster_disconnected = "PeerinCluster(Disconnected)"; | 	public static String peerincluster_disconnected = "PeerinCluster(Disconnected)"; | ||||||
| 	public static String peerNotinCluster = "PeerNotinCluster"; | 	public static String peerNotinCluster = "PeerNotinCluster"; | ||||||
| 	public static String distributed = "distributed"; | 	public static String distributed = "distributed"; | ||||||
| 	public static String replica = "replica"; | 	public static String replica = "replica"; | ||||||
| 	public static String stripe = "stripe"; | 	public static String stripe = "stripe"; | ||||||
| 	public static String noVolume = "No volumes present"; | 	public static String noVolume = "No volumes present"; | ||||||
| 	public static String success = "success"; | 	public static String success = "success"; | ||||||
| 	public static String failed = "failed"; | 	public static String failed = "failed"; | ||||||
| 	public static String noSuchFile = "No such file or directory"; | 	public static String noSuchFile = "No such file or directory"; | ||||||
| 	public static GanymedSSH ganymedSSH = null; | 	public static GanymedSSH ganymedSSH = null; | ||||||
| 	public static String fileGetTreeData = "WebContent\\WEB-INF\\config\\getTreedata.sh"; | 	public static String fileGetTreeData = "WebContent\\WEB-INF\\config\\getTreedata.sh"; | ||||||
| 	public static String AutoMountfile="/gfsAutoMount/AutoRun.sh"; | 	public static String AutoMountfile="/gfsAutoMount/AutoRun.sh"; | ||||||
| 	public static String MountRecord="/gfsAutoMount/mountPoint.record"; | 	public static String MountRecord="/gfsAutoMount/mountPoint.record"; | ||||||
| 	public static String strGetTreeData = "function ergodic(){\n  " | 	public static String strGetTreeData = "function ergodic(){\n  " | ||||||
| 			+ "for file in \\`ls \\$1\\`\n  do\n    if [ \"\\$file\" != \"app\" -a -d \\$1\\\"/\\\"\\$file  ]\n    " | 			+ "for file in \\`ls \\$1\\`\n  do\n    if [ \"\\$file\" != \"app\" -a -d \\$1\\\"/\\\"\\$file  ]\n    " | ||||||
| 			+ "then\n      ergodic \\$1\"/\"\\$file\n    else\n      local path=\\$1\"/\"\\$file\n      " | 			+ "then\n      ergodic \\$1\"/\"\\$file\n    else\n      local path=\\$1\"/\"\\$file\n      " | ||||||
| 			+ "echo \\$path \n    fi\n  done\n}\n\nIFS=\\$\\'\\n\\'                      " | 			+ "echo \\$path \n    fi\n  done\n}\n\nIFS=\\$\\'\\n\\'                      " | ||||||
| 			+ "#这个必须要,否则会在文件名中有空格时出错\nINIT_PATH=\".\";\nergodic \\$1\n"; | 			+ "#这个必须要,否则会在文件名中有空格时出错\nINIT_PATH=\".\";\nergodic \\$1\n"; | ||||||
| 
 | 
 | ||||||
| 	/** | 	/** | ||||||
| 	 * volume 获取的线程休眠时间 | 	 * volume 获取的线程休眠时间 | ||||||
| 	 */ | 	 */ | ||||||
| 	public final static int moveFileMaxNum = 1; | 	public final static int moveFileMaxNum = 1; | ||||||
| 
 | 
 | ||||||
| 		/** | 		/** | ||||||
| 		 * volume 获取的线程休眠时间 | 		 * volume 获取的线程休眠时间 | ||||||
| 		 */ | 		 */ | ||||||
| 		public final static int get_volume_sleep_time = 10000; | 		public final static int get_volume_sleep_time = 10000; | ||||||
| 		 | 		 | ||||||
| 		/** | 		/** | ||||||
| 		 * volume 获取的线程休眠时间 | 		 * volume 获取的线程休眠时间 | ||||||
| 		 */ | 		 */ | ||||||
| 		public final static int update_dataInfo_sleep_time = 1500; | 		public final static int update_dataInfo_sleep_time = 1500; | ||||||
| 
 | 
 | ||||||
| } | } | ||||||
|  | |||||||
| @ -0,0 +1,18 @@ | |||||||
|  | package com.platform.utils; | ||||||
|  | 
 | ||||||
|  | public class ThreadVolumeImm extends Thread{ | ||||||
|  | 	 | ||||||
|  | 	public ThreadVolumeImm() { | ||||||
|  | 		// TODO Auto-generated constructor stub
 | ||||||
|  | 	} | ||||||
|  | 	 | ||||||
|  | 	public ThreadVolumeImm(String name) { | ||||||
|  | 		setName(name); | ||||||
|  | 	} | ||||||
|  | 	 | ||||||
|  | 	@Override | ||||||
|  | 	public void run() { | ||||||
|  | 		new ThreadVolume().getVolumeMsg(); | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | } | ||||||
					Loading…
					
					
				
		Reference in new issue