修改ZKCli.sh,加上"-Djute.maxbuffer=49107800" $JAVA "-Dzookeeper.log.dir=${ZOO_LOG_DIR}" "-Dzookeeper.root.logger=${ZOO_LOG4J_PROP}" \
?"-Djute.maxbuffer=49107800" -cp "$CLASSPATH" $CLIENT_JVMFLAGS $JVMFLAGS \
?org.apache.zookeeper.ZooKeeperMain "$@"
改完后rmr /xxx
如果还不行,写代码解决。参考代码如下
package com.xxx.server;
import com.kingdee.bos.qing.dfs.common.util.ZKClientUtil;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.List;
import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.api.DeleteBuilder;
import org.apache.curator.framework.api.GetChildrenBuilder;
public class RMRLock
{
static
{
System.setProperty("zk.server.url", "127.0.0.1:2181");
System.setProperty("jute.maxbuffer", "2097152000");
}
static CuratorFramework zkClient = ZKClientUtil.getClient();
public static List<String> zkNodes = new ArrayList();
public static void main(String[] args)
{
try
{
System.out.println("rmr lock start");
rmrNode("/Lock");
}
catch (Exception e)
{
e.printStackTrace();
}
}
public static void rmrNode(String parentNode)
{
try
{
List<String> tmpList = (List)zkClient.getChildren().forPath(parentNode);
for (String tmp : tmpList)
{
String childNode = parentNode + "/" + tmp;
zkClient.delete().forPath(childNode);
}
}
catch (Exception e)
{
e.printStackTrace();
}
}
}
java -classpath /srv/xxx/libs/*:/srv/xxx/conf/ com.xxx.server.RMRLock
|