Conflicts:
	src/com/platform/glusterfs/CopyData.java
	src/com/platform/utils/Constant.java
web_backend_develope
chenlw 10 years ago
commit 51c06b3a8a

@ -132,7 +132,7 @@ public class CopyData {
createFolders("/aaa/vvv/ddd/www/rrrr");
}
//@Test
public void testCopyFolderFiles() {

File diff suppressed because it is too large Load Diff

@ -52,11 +52,12 @@ public class ShowData {
String command="ls -l "+folderName;
/*
RunCommand runCommand=new RunCommand();
List<String> reStrings=runCommand.runCommandWait(command);
*/
List<String> reStrings = Constant.ganymedSSH.execCmdWait(Constant.hostIp, Constant.rootUser, Constant.rootPasswd, Constant.port, command);
if(reStrings==null){
<<<<<<< HEAD
* RunCommand runCommand=new RunCommand(); List<String>
* reStrings=runCommand.runCommandWait(command);
*/
List<String> reStrings = Constant.ganymedSSH.execCmdWaitAcquiescent(command);
if (reStrings == null) {
log.error("2101 command get result is null");
return null;
}

@ -77,7 +77,7 @@ public class VolumeInfo {
}
/**
* volumevolume <>
* volumevolume
*
* @param volumeName
* @return
@ -257,12 +257,6 @@ public class VolumeInfo {
return null;
}
// char flag = reStrings.get(0).trim().toCharArray()[0];
// if (flag != '/') {
// log.error("11003 get result string wrong");
// return null;
// }
for (String mountPoint : reStrings) {
mountPoint = mountPoint.replaceAll(" ", "");
mountPoints.add(mountPoint);
@ -274,25 +268,15 @@ public class VolumeInfo {
log.info("get one volume MountPoint");
String mountPoint=null;
String cmd=Constant.df + "|grep " + volumeName + "|awk '{print $6}'";
List<String> reStrings = Constant.ganymedSSH.execCmdWaitAcquiescent(cmd);
List<String> mountpoints = getVolumeMountPoint(volumeName);
// System.out.println(reStrings);
if (reStrings == null) {
if (mountpoints == null || mountpoints.size() == 0) {
log.error("11001 get result string wrong");
return null;
}
if (reStrings.size() == 0) {
log.error("11002 " + volumeName + " is not exists or no mountpoint");
return null;
}
// char flag = reStrings.get(0).trim().toCharArray()[0];
// if (flag != '/') {
// log.error("11003 get result string wrong");
// return null;
// }
mountPoint=reStrings.get(0);
mountPoint=mountpoints.get(0);
return mountPoint;
}
@ -377,7 +361,7 @@ public class VolumeInfo {
}
/**
* volumeNametruefalse <>
* volumeNametruefalse
*
* @param volumeName
* @return

@ -1,7 +1,6 @@
package com.platform.utils;
import java.util.List;
public class Constant {
public static String rootUser = "root";
@ -24,6 +23,8 @@ public class Constant {
public static String noSuchFile = "No such file or directory";
public static GanymedSSH ganymedSSH = new GanymedSSH(hostIp, rootUser, rootPasswd, port);
public static String fileGetTreeData = "WebContent\\WEB-INF\\config\\getTreedata.sh";
public static String AutoMountfile="/gfsAutoMount/AutoRun.sh";
public static String MountRecord="/gfsAutoMount/mountPoint.record";
public static String strGetTreeData = "function ergodic(){\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 "
@ -34,8 +35,6 @@ public class Constant {
* volume 线
*/
public final static int moveFileMaxNum = 1;
/**
* volume 线

Loading…
Cancel
Save