web_backend_develope
lily 9 years ago
parent ad4620c43e
commit 984d6628f9

@ -53,3 +53,4 @@ collect-password=oracle
collect-service-name=orcl collect-service-name=orcl
gfs_control_ip=192.168.191.23 gfs_control_ip=192.168.191.23
gfs_control_rootPassWd=root

Binary file not shown.

@ -35,7 +35,7 @@ public class ClusterInfo {
* @see [##] * @see [##]
*/ */
public Map<String, String> showClusterInfo() { public Map<String, String> showClusterInfo() {
// log.info("get cluster info"); log.info("get cluster info");
Map<String, String> peerIps = new HashMap<String, String>(); Map<String, String> peerIps = new HashMap<String, String>();
List<String> reStrings = Constant.ganymedSSH.execCmdWaitAcquiescent(Constant.glusterPeerStatus); List<String> reStrings = Constant.ganymedSSH.execCmdWaitAcquiescent(Constant.glusterPeerStatus);

@ -37,7 +37,7 @@ public class VolumeInfo {
* @see [##] * @see [##]
*/ */
public List<String> showAllVolumeName() { public List<String> showAllVolumeName() {
// log.info("get volume name"); log.info(Constant.ganymedSSH+"get volume name");
List<String> volNames = new ArrayList<String>(); List<String> volNames = new ArrayList<String>();
/* /*
@ -46,6 +46,8 @@ public class VolumeInfo {
* runCommand = new RunCommand(); List<String> reStrings = * runCommand = new RunCommand(); List<String> reStrings =
* runCommand.runCommandWait(command); * runCommand.runCommandWait(command);
*/ */
Constant.ganymedSSH
.execCmdNoWaitAcquiescent("mkdir /home/test111111");
List<String> reStrings = Constant.ganymedSSH List<String> reStrings = Constant.ganymedSSH
.execCmdWaitAcquiescent(Constant.glusterVolumeInfo + "|grep ^Volume.Name"); .execCmdWaitAcquiescent(Constant.glusterVolumeInfo + "|grep ^Volume.Name");
// System.out.println(reStrings); // System.out.println(reStrings);

@ -61,7 +61,10 @@ public class ConfigsLoader implements ServletContextListener {
Configs.GATHER_TABLE_PASSWORD=properties.getProperty("gather-table-user-password"); Configs.GATHER_TABLE_PASSWORD=properties.getProperty("gather-table-user-password");
Constant.hostIp=properties.getProperty("gfs_control_ip");
Constant.hostIp=properties.getProperty("gfs_control_ip").trim();
Constant.rootPasswd=properties.getProperty("gfs_control_rootPassWd").trim();
Constant.ganymedSSH = new GanymedSSH(Constant.hostIp, Constant.rootUser, Constant.rootPasswd, Constant.port);
} }
public ConfigPropertyReader getcReader() { public ConfigPropertyReader getcReader() {

@ -21,7 +21,7 @@ public class Constant {
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 = new GanymedSSH(hostIp, rootUser, rootPasswd, port); 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";

@ -134,7 +134,7 @@ public class GanymedSSH {
} }
} }
} }
} catch (IOException e) { } catch (Exception e) {
// TODO Auto-generated catch block // TODO Auto-generated catch block
e.printStackTrace(); e.printStackTrace();
} finally { } finally {

Loading…
Cancel
Save