diff --git a/.classpath b/.classpath
index b6aa469c..63b90724 100644
--- a/.classpath
+++ b/.classpath
@@ -14,5 +14,6 @@
+
diff --git a/build/classes/com/platform/controller/DefaultController.class b/build/classes/com/platform/controller/DefaultController.class
index 41222a99..e9becdfc 100644
Binary files a/build/classes/com/platform/controller/DefaultController.class and b/build/classes/com/platform/controller/DefaultController.class differ
diff --git a/src/com/platform/glusterfs/GetTreeData.java b/src/com/platform/glusterfs/GetTreeData.java
index df951cd7..48b2ff05 100644
--- a/src/com/platform/glusterfs/GetTreeData.java
+++ b/src/com/platform/glusterfs/GetTreeData.java
@@ -5,9 +5,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
-import org.apache.log4j.PropertyConfigurator;
import org.junit.Test;
-import org.springframework.stereotype.Service;
import com.platform.entities.FolderNode;
@@ -30,7 +28,10 @@ public class GetTreeData {
* @see [类、类#方法、类#成员]
*/
public FolderNode getDatas(String name) {
- FolderNode fileNode = new FolderNode(name);
+ String names[]=name.split("/");
+ String only_name=names[names.length-1];
+ FolderNode fileNode = new FolderNode(only_name);
+
Map files = showData.showFolderData(name);
if(files==null || files.size()==0){
return fileNode;
@@ -55,28 +56,30 @@ public class GetTreeData {
return fileNode;
}
-// public static void main(String[] args) {
-// GetTreeData getTreeData=new GetTreeData();
-// FileOrFolder fileOrFolder=getTreeData.getDatas("/home");
-// System.out.println(fileOrFolder);
-// }
+ @Test
+ public void test_getTreeData() {
+
+ GetTreeData getTreeData=new GetTreeData();
+ FolderNode fileOrFolder=getTreeData.getDatas("/home");
+ System.out.println(fileOrFolder);
+ }
}
+/*
+class FileOrFolder {
+ String name;
+ int isFolder; // 1 is file and other integer is folder show children number
+ List children;
+
+ public FileOrFolder(String name) {
+ // TODO Auto-generated constructor stub
+ this.name = name;
+ }
-//class FileOrFolder {
-// String name;
-// int isFolder; // 1 is file and other integer is folder show children number
-// List children;
-//
-// public FileOrFolder(String name) {
-// // TODO Auto-generated constructor stub
-// this.name = name;
-// }
-//
-// public FileOrFolder(String name, int isFolder) {
-// // TODO Auto-generated constructor stub
-// this.name = name;
-// this.isFolder = isFolder;
-// }
-//}
+ public FileOrFolder(String name, int isFolder) {
+ // TODO Auto-generated constructor stub
+ this.name = name;
+ this.isFolder = isFolder;
+ }
+}
->>>>>>> 26f098b74e2941e68d0a85c1b9d580a28ed2ac41
+*/
diff --git a/src/com/platform/glusterfs/SetVolume.java b/src/com/platform/glusterfs/SetVolume.java
index d6be2d41..0ea02c92 100644
--- a/src/com/platform/glusterfs/SetVolume.java
+++ b/src/com/platform/glusterfs/SetVolume.java
@@ -108,16 +108,18 @@ public class SetVolume {
return -1;
}
- String mountPoint = new VolumeInfo().getVolumeMountPoint(volumeName);
+ List mountPoints = new VolumeInfo().getVolumeMountPoint(volumeName);
if (stopVolume(volumeName) != 0) {
log.error("3802 " + volumeName + " stop failed !");
return -2;
}
log.info("stop "+volumeName+" successed!");
- if (mountPoint != null) {
- String command = "umount " + mountPoint;
+ for(String mountPoint:mountPoints){
+ if (mountPoint != null) {
+ String command = "umount -l " + mountPoint;
Constant.ganymedSSH.execCmdNoWaitAcquiescent(command);
- log.info("umount "+mountPoint+" successed!");
+ log.info("umount "+mountPoint+" successed!");
+ }
}
String command="echo -e \"y\"| gluster volume delete "+volumeName;
List reStrings=Constant.ganymedSSH.execCmdWaitAcquiescent(command);
diff --git a/src/com/platform/utils/Constant.java b/src/com/platform/utils/Constant.java
index 59c2b5ce..0a72c14d 100644
--- a/src/com/platform/utils/Constant.java
+++ b/src/com/platform/utils/Constant.java
@@ -6,6 +6,7 @@ public class Constant {
public static String rootUser = "root";
public static String rootPasswd = "root";
public static String hostIp = "192.168.0.116";
+// public static String hostIp = "192.168.1.105";
public static int port = 22;
public static String glusterPeerStatus = "gluster peer status";
public static String glusterVolumeInfo = "gluster volume info ";