Program: 37520
Project: 37520
Buggy source:
/** 
 * 支持后端指令 ---------------------------------------- USE [POOL_ID] RELOAD USER RELOAD ALL RELOAD FRONT RELOAD PATH RELOAD KAFKA JVM 指令依赖 JAVA_HOME  ---------------------------------------- JVM JSTACK JVM JSTAT JVM JMAP_HISTO JVM JMAP_HEAP JVM PS SHOW USER SHOW USER_NET_IO  SHOW CPU SHOW MEM SHOW QPS SHOW CONN SHOW USER_CONN SHOW BUFFER SHOW BIGKEY SHOW BIGLENGTH SHOW SLOWKEY SHOW CMD SHOW USER_CMD SHOW USER_CMD_DETAIL USER SHOW VER SHOW NET_IO 该指令兼容过去的 SHOW NETBYTES SHOW VM SHOW POOL SHOW COST SHOW USER_DAY_NET_IO SHOW POOL_NET_IO POOLNAME SHOW TOPIC SHOW LOG_ERROR SHOW LOG_WARN SHOW LOG_INFO SHOW LOG_DEBUG
 */
public static byte[] execute(final RedisRequest request,RedisFrontConnection frontCon){
  int numArgs=request.getNumArgs();
  if (numArgs != 2 && numArgs != 3 && numArgs != 4) {
    return "String_Node_Str".getBytes();
  }
  byte[] arg1=request.getArgs()[0];
  String arg2=new String(request.getArgs()[1]);
  if (arg1 == null || arg2 == null) {
    return "String_Node_Str".getBytes();
  }
  if (arg1.length == 3) {
    if ((arg1[0] == 'J' || arg1[0] == 'j') && (arg1[1] == 'V' || arg1[1] == 'v') && (arg1[2] == 'M' || arg1[2] == 'm')) {
      StringBuffer cmdBuffer=new StringBuffer();
      if (JavaUtils.isLinux())       cmdBuffer.append(JAVA_BIN_PATH);
      if (arg2.equalsIgnoreCase("String_Node_Str")) {
        cmdBuffer.append("String_Node_Str").append(JavaUtils.process_pid());
        return encode(getOS_JVM_INFO(cmdBuffer.toString()));
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        cmdBuffer.append("String_Node_Str").append(JavaUtils.process_pid());
        return encode(getOS_JVM_INFO(cmdBuffer.toString()));
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        cmdBuffer.append("String_Node_Str").append(JavaUtils.process_pid());
        return encode(getOS_JVM_INFO(cmdBuffer.toString()));
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        cmdBuffer.append("String_Node_Str").append(JavaUtils.process_pid());
        return encode(getOS_JVM_INFO(cmdBuffer.toString()));
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        String cmd="String_Node_Str" + JavaUtils.process_pid() + "String_Node_Str";
        List<String> line=new ArrayList<String>();
        try {
          line.add(ShellUtils.execCommand("String_Node_Str","String_Node_Str",cmd));
        }
 catch (        IOException e) {
          line.add(e.getMessage());
        }
        return encode(line);
      }
    }
 else     if ((arg1[0] == 'U' || arg1[0] == 'u') && (arg1[1] == 'S' || arg1[1] == 's') && (arg1[2] == 'E' || arg1[2] == 'e')) {
      try {
        int poolId=Integer.parseInt(arg2);
        AbstractPool pool=RedisEngineCtx.INSTANCE().getPoolMap().get(poolId);
        if (pool == null) {
          return "String_Node_Str".getBytes();
        }
 else {
          int poolType=pool.getType();
          frontCon.getUserCfg().setUsePool(poolId,poolType);
          return "String_Node_Str".getBytes();
        }
      }
 catch (      NumberFormatException e) {
        return "String_Node_Str".getBytes();
      }
    }
  }
 else   if (arg1.length == 4) {
    if ((arg1[0] == 'S' || arg1[0] == 's') && (arg1[1] == 'H' || arg1[1] == 'h') && (arg1[2] == 'O' || arg1[2] == 'o')&& (arg1[3] == 'W' || arg1[3] == 'w')) {
      if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=new ArrayList<String>();
        AccessStatInfoResult result=StatUtil.getTotalAccessStatInfo().get(StatUtil.STAT_KEY);
        if (result != null) {
          StringBuffer sBuffer=new StringBuffer();
          sBuffer.append("String_Node_Str").append(result.totalCount).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.slowCount).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.maxCount).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.minCount).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.avgCount).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.procTime).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.created);
          lines.add(sBuffer.toString());
        }
        return encode(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<Object> lines=new ArrayList<Object>();
        long sum=0;
        Set<Entry<String,Command>> entrys=StatUtil.getCommandCountMap().entrySet();
        for (        Entry<String,Command> entry : entrys) {
          Command parent=entry.getValue();
          StringBuffer sBuffer=new StringBuffer();
          sBuffer.append(parent.cmd).append("String_Node_Str").append(parent.count.get());
          if (parent.childs != null) {
            List<String> list=new ArrayList<String>();
            list.add(sBuffer.toString());
            for (            Entry<String,Command> childEntry : parent.childs.entrySet()) {
              Command child=childEntry.getValue();
              StringBuffer sb=new StringBuffer();
              sb.append("String_Node_Str").append(child.cmd).append("String_Node_Str").append(child.count.get());
              list.add(sb.toString());
            }
            lines.add(list);
          }
 else {
            lines.add(sBuffer.toString());
          }
          sum+=parent.count.get();
        }
        StringBuffer sBuffer=new StringBuffer();
        sBuffer.append("String_Node_Str").append("String_Node_Str").append(sum);
        lines.add(sBuffer.toString());
        return encodeObject(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=new ArrayList<String>();
        StringBuffer title=new StringBuffer();
        title.append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str");
        lines.add(title.toString());
        Set<Entry<String,UserCommand>> entrys=StatUtil.getUserCommandCountMap().entrySet();
        for (        Entry<String,UserCommand> entry : entrys) {
          UserCommand userCommand=entry.getValue();
          StringBuffer sBuffer=new StringBuffer();
          sBuffer.append(userCommand.user).append("String_Node_Str").append(userCommand.readComandCount.get()).append("String_Node_Str").append(userCommand.writeCommandCount.get()).append("String_Node_Str").append(userCommand.readComandCount.get() + userCommand.writeCommandCount.get());
          lines.add(sBuffer.toString());
        }
        return encode(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str") && numArgs == 3) {
        String user=new String(request.getArgs()[2]);
        List<String> lines=new ArrayList<String>();
        StringBuffer title=new StringBuffer();
        title.append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str");
        lines.add(title.toString());
        int sum=0;
        ConcurrentHashMap<String,UserCommand> userCommandMap=StatUtil.getUserCommandCountMap();
        UserCommand userCommand=userCommandMap.get(user);
        if (userCommand != null) {
          for (          Entry<String,AtomicLong> entry : userCommand.commandCount.entrySet()) {
            StringBuffer sBuffer=new StringBuffer();
            sBuffer.append(user).append("String_Node_Str").append(entry.getKey()).append("String_Node_Str").append(entry.getValue().get());
            lines.add(sBuffer.toString());
          }
        }
        StringBuffer end=new StringBuffer();
        end.append("String_Node_Str").append("String_Node_Str").append(sum);
        lines.add(end.toString());
        return encode(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=new ArrayList<String>();
        lines.add(Versions.SERVER_VERSION);
        return encode(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=new ArrayList<String>();
        if (JavaUtils.isLinux()) {
          StringBuffer cmdBuffer=new StringBuffer();
          cmdBuffer.append("String_Node_Str").append(JavaUtils.process_pid()).append("String_Node_Str");
          String response;
          try {
            response=ShellUtils.execCommand("String_Node_Str","String_Node_Str",cmdBuffer.toString());
            lines.add(response);
          }
 catch (          IOException e) {
            LOGGER.error("String_Node_Str",e);
            lines.add("String_Node_Str");
          }
        }
 else {
          lines.add("String_Node_Str");
        }
        return encode(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=new ArrayList<String>();
        lines.add("String_Node_Str" + JavaUtils.bytesToString2(Math.round(JavaUtils.getMemUsage())));
        return encode(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        int frontSize=0;
        int backendSize=0;
        ConcurrentMap<Long,AbstractConnection> allConnections=NetSystem.getInstance().getAllConnectios();
        Iterator<Entry<Long,AbstractConnection>> it=allConnections.entrySet().iterator();
        while (it.hasNext()) {
          AbstractConnection c=it.next().getValue();
          if (c instanceof RedisFrontConnection) {
            frontSize++;
          }
 else {
            backendSize++;
          }
        }
        StringBuffer sBuffer=new StringBuffer();
        sBuffer.append("String_Node_Str");
        sBuffer.append("String_Node_Str");
        sBuffer.append("String_Node_Str").append(frontSize).append("String_Node_Str");
        sBuffer.append("String_Node_Str").append(backendSize).append("String_Node_Str");
        return sBuffer.toString().getBytes();
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        Map<String,Integer> userMap=new HashMap<String,Integer>();
        ConcurrentMap<Long,AbstractConnection> allConnections=NetSystem.getInstance().getAllConnectios();
        Iterator<Entry<Long,AbstractConnection>> it=allConnections.entrySet().iterator();
        while (it.hasNext()) {
          AbstractConnection c=it.next().getValue();
          if (c instanceof RedisFrontConnection) {
            userMap.put(((RedisFrontConnection)c).getPassword(),1 + (userMap.get(((RedisFrontConnection)c).getPassword()) == null ? 0 : userMap.get(((RedisFrontConnection)c).getPassword())));
          }
        }
        StringBuffer sBuffer=new StringBuffer();
        sBuffer.append("String_Node_Str");
        sBuffer.append("String_Node_Str");
        Iterator<Entry<String,Integer>> users=userMap.entrySet().iterator();
        while (users.hasNext()) {
          sBuffer.append("String_Node_Str");
          Entry<String,Integer> en=users.next();
          sBuffer.append(en.getKey());
          sBuffer.append("String_Node_Str");
          sBuffer.append(en.getValue());
        }
        sBuffer.append("String_Node_Str");
        return sBuffer.toString().getBytes();
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=new ArrayList<String>();
        ConcurrentHashMap<String,AccessStatInfoResult> results=StatUtil.getTotalAccessStatInfo();
        for (        Map.Entry<String,AccessStatInfoResult> entry : results.entrySet()) {
          AccessStatInfoResult result=entry.getValue();
          StringBuffer sBuffer=new StringBuffer();
          sBuffer.append("String_Node_Str").append(result.key).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.totalCount).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.slowCount).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.maxCount).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.minCount).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.avgCount).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.procTime).append("String_Node_Str");
          sBuffer.append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.netInBytes[1]).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.netInBytes[2]).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.netInBytes[3]).append("String_Node_Str").append("String_Node_Str");
          sBuffer.append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.netOutBytes[1]).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.netOutBytes[2]).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.netOutBytes[3]).append("String_Node_Str").append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.created);
          lines.add(sBuffer.toString());
        }
        return encode(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=new ArrayList<String>();
        ConcurrentMap<Long,AbstractConnection> allConnections=NetSystem.getInstance().getAllConnectios();
        Iterator<Entry<Long,AbstractConnection>> it=allConnections.entrySet().iterator();
        while (it.hasNext()) {
          AbstractConnection c=it.next().getValue();
          if (c instanceof RedisFrontConnection) {
            lines.add(c.toString());
          }
        }
        return encode(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        BufferPool bufferPool=NetSystem.getInstance().getBufferPool();
        long usedBufferSize=bufferPool.getUsedBufferSize().get();
        long maxBufferSize=bufferPool.getMaxBufferSize();
        long minBufferSize=bufferPool.getMinBufferSize();
        long sharedOptsCount=bufferPool.getSharedOptsCount();
        int capacity=0;
        if (bufferPool instanceof BucketBufferPool) {
          BucketBufferPool p=(BucketBufferPool)bufferPool;
          AbstractBucket[] buckets=p.buckets();
          for (          AbstractBucket b : buckets) {
            capacity+=b.getCount();
          }
          int bucketLen=buckets.length;
          StringBuffer sBuffer=new StringBuffer();
          sBuffer.append("String_Node_Str");
          sBuffer.append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(capacity).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(minBufferSize).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(maxBufferSize).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(usedBufferSize).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(bucketLen).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(sharedOptsCount).append("String_Node_Str");
          return sBuffer.toString().getBytes();
        }
 else         if (bufferPool instanceof PageBufferPool) {
          List<String> lines=new ArrayList<String>();
          ConcurrentHashMap<Long,Long> bufferpoolUsageMap=bufferPool.getNetDirectMemoryUsage();
          long usedforNetwork=0;
          for (          Map.Entry<Long,Long> entry : bufferpoolUsageMap.entrySet()) {
            long value=entry.getValue();
            lines.add("String_Node_Str" + entry.getKey() + "String_Node_Str"+ (value > 0 ? JavaUtils.bytesToString2(value) : "String_Node_Str"));
            usedforNetwork=usedforNetwork + value;
          }
          lines.add("String_Node_Str" + JavaUtils.bytesToString2(minBufferSize));
          lines.add("String_Node_Str" + JavaUtils.bytesToString2(maxBufferSize));
          lines.add("String_Node_Str" + JavaUtils.bytesToString2(usedforNetwork));
          return encode(lines);
        }
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=new ArrayList<String>();
        BufferPool bufferPool=NetSystem.getInstance().getBufferPool();
        if (bufferPool instanceof BucketBufferPool) {
          BucketBufferPool p=(BucketBufferPool)bufferPool;
          AbstractBucket[] buckets=p.buckets();
          for (          AbstractBucket b : buckets) {
            StringBuffer sBuffer=new StringBuffer();
            sBuffer.append("String_Node_Str").append(b.getChunkSize()).append("String_Node_Str");
            sBuffer.append("String_Node_Str").append(b.getQueueSize()).append("String_Node_Str");
            sBuffer.append("String_Node_Str").append(b.getCount()).append("String_Node_Str");
            sBuffer.append("String_Node_Str").append(b.getUsedCount()).append("String_Node_Str");
            sBuffer.append("String_Node_Str").append(b.getShared());
            lines.add(sBuffer.toString());
          }
        }
        return encode(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=new ArrayList<String>();
        for (        BigKey bigkey : StatUtil.getBigKeys()) {
          StringBuffer sBuffer=new StringBuffer();
          sBuffer.append(bigkey.cmd).append("String_Node_Str");
          sBuffer.append(bigkey.key).append("String_Node_Str");
          sBuffer.append(bigkey.size).append("String_Node_Str");
          sBuffer.append(bigkey.count.get());
          lines.add(sBuffer.toString());
        }
        return encode(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=new ArrayList<String>();
        Map<String,AtomicInteger> poolConnections=new HashMap<String,AtomicInteger>();
        ConcurrentMap<Long,AbstractConnection> allConnections=NetSystem.getInstance().getAllConnectios();
        Iterator<Entry<Long,AbstractConnection>> it=allConnections.entrySet().iterator();
        while (it.hasNext()) {
          AbstractConnection c=it.next().getValue();
          if (c instanceof RedisBackendConnection) {
            String poolName=((RedisBackendConnection)c).getPhysicalNode().getPoolName();
            AtomicInteger poolConnCount=poolConnections.get(poolName);
            if (poolConnCount == null) {
              poolConnections.put(poolName,new AtomicInteger(1));
            }
 else {
              poolConnCount.incrementAndGet();
            }
            lines.add(c.toString());
          }
 else           if (c instanceof KafkaBackendConnection) {
            String poolName=((KafkaBackendConnection)c).getPhysicalNode().getPoolName();
            AtomicInteger poolConnCount=poolConnections.get(poolName);
            if (poolConnCount == null) {
              poolConnections.put(poolName,new AtomicInteger(1));
            }
 else {
              poolConnCount.incrementAndGet();
            }
            lines.add(c.toString());
          }
        }
        StringBuffer sb=new StringBuffer();
        for (        Map.Entry<String,AtomicInteger> entry : poolConnections.entrySet()) {
          sb.append(entry.getKey()).append("String_Node_Str").append(entry.getValue().get()).append("String_Node_Str");
        }
        lines.add(sb.toString());
        return encode(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str") && numArgs == 3) {
        String poolName=new String(request.getArgs()[2]);
        List<String> lines=new ArrayList<String>();
        ConcurrentMap<Long,AbstractConnection> allConnections=NetSystem.getInstance().getAllConnectios();
        Iterator<Entry<Long,AbstractConnection>> it=allConnections.entrySet().iterator();
        long minStartupTime=-1;
        long maxLastLargeMessageTime=-1;
        long totalLargeCount=0;
        long totalNetInCount=0;
        long totalNetInBytes=0;
        long totalNetOutBytes=0;
        while (it.hasNext()) {
          AbstractConnection c=it.next().getValue();
          if (c instanceof RedisBackendConnection) {
            if (((RedisBackendConnection)c).getPhysicalNode().getPoolName().equals(poolName)) {
              StringBuffer sb=new StringBuffer();
              sb.append("String_Node_Str").append(c.getId()).append("String_Node_Str");
              sb.append("String_Node_Str").append(c.getStartupTime()).append("String_Node_Str");
              sb.append("String_Node_Str").append(c.getLastLargeMessageTime()).append("String_Node_Str");
              sb.append("String_Node_Str").append(c.getLargeCount()).append("String_Node_Str");
              sb.append("String_Node_Str").append(c.getNetInCount()).append("String_Node_Str");
              sb.append("String_Node_Str").append(c.getNetInBytes()).append("String_Node_Str");
              sb.append("String_Node_Str").append(c.getNetOutBytes()).append("String_Node_Str");
              lines.add(sb.toString());
              minStartupTime=minStartupTime < 0 ? c.getStartupTime() : Math.min(minStartupTime,c.getStartupTime());
              maxLastLargeMessageTime=Math.max(maxLastLargeMessageTime,c.getLastLargeMessageTime());
              totalLargeCount=totalLargeCount + c.getLargeCount();
              totalNetInCount=totalNetInCount + c.getNetInCount();
              totalNetInBytes=totalNetInBytes + c.getNetInBytes();
              totalNetOutBytes=totalNetOutBytes + c.getNetOutBytes();
            }
          }
        }
        StringBuffer end=new StringBuffer();
        end.append("String_Node_Str").append(minStartupTime).append("String_Node_Str");
        end.append("String_Node_Str").append(maxLastLargeMessageTime).append("String_Node_Str");
        end.append("String_Node_Str").append(totalLargeCount).append("String_Node_Str");
        end.append("String_Node_Str").append(totalNetInCount).append("String_Node_Str");
        end.append("String_Node_Str").append(totalNetInBytes).append("String_Node_Str");
        end.append("String_Node_Str").append(totalNetOutBytes).append("String_Node_Str");
        lines.add(end.toString());
        return encode(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str") || arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=new ArrayList<String>();
        AccessStatInfoResult result=StatUtil.getTotalAccessStatInfo().get(StatUtil.STAT_KEY);
        if (result != null) {
          StringBuffer line0=new StringBuffer();
          line0.append("String_Node_Str").append("String_Node_Str");
          line0.append("String_Node_Str").append("String_Node_Str");
          line0.append("String_Node_Str").append("String_Node_Str");
          line0.append("String_Node_Str").append("String_Node_Str");
          line0.append("String_Node_Str");
          StringBuffer line1=new StringBuffer();
          line1.append("String_Node_Str").append("String_Node_Str");
          line1.append(result.netInBytes[0]).append("String_Node_Str");
          line1.append(result.netInBytes[1]).append("String_Node_Str");
          line1.append(result.netInBytes[2]).append("String_Node_Str");
          line1.append(result.netInBytes[3]);
          StringBuffer line2=new StringBuffer();
          line2.append("String_Node_Str").append("String_Node_Str");
          line2.append(result.netOutBytes[0]).append("String_Node_Str");
          line2.append(result.netOutBytes[1]).append("String_Node_Str");
          line2.append(result.netOutBytes[2]).append("String_Node_Str");
          line2.append(result.netOutBytes[3]);
          StringBuffer line3=new StringBuffer();
          line3.append(result.created);
          lines.add(line0.toString());
          lines.add(line1.toString());
          lines.add(line2.toString());
          lines.add(line3.toString());
        }
        return encode(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=new ArrayList<String>();
        StringBuffer titleLine=new StringBuffer();
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str");
        lines.add(titleLine.toString());
        for (        Map.Entry<String,AccessStatInfoResult> entry : StatUtil.getTotalAccessStatInfo().entrySet()) {
          if (!StatUtil.STAT_KEY.equals(entry.getKey())) {
            AccessStatInfoResult result=entry.getValue();
            StringBuffer line1=new StringBuffer();
            line1.append(result.key).append("String_Node_Str");
            line1.append("String_Node_Str").append("String_Node_Str");
            line1.append(result.netInBytes[0]).append("String_Node_Str");
            line1.append(result.netInBytes[1]).append("String_Node_Str");
            line1.append(result.netInBytes[2]).append("String_Node_Str");
            line1.append(result.netInBytes[3]);
            StringBuffer line2=new StringBuffer();
            line2.append(result.key).append("String_Node_Str");
            line2.append("String_Node_Str").append("String_Node_Str");
            line2.append(result.netOutBytes[0]).append("String_Node_Str");
            line2.append(result.netOutBytes[1]).append("String_Node_Str");
            line2.append(result.netOutBytes[2]).append("String_Node_Str");
            line2.append(result.netOutBytes[3]);
            StringBuffer line3=new StringBuffer();
            line3.append(result.created);
            lines.add(line1.toString());
            lines.add(line2.toString());
            lines.add(line3.toString());
          }
        }
        return encode(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=new ArrayList<String>();
        StringBuffer titleLine=new StringBuffer();
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str");
        lines.add(titleLine.toString());
        long totalNetIn=0;
        long totalNetOut=0;
        for (        Map.Entry<String,UserNetFlow> entry : StatUtil.getUserFlowMap().entrySet()) {
          if (!StatUtil.STAT_KEY.equals(entry.getKey())) {
            StringBuffer sb=new StringBuffer();
            UserNetFlow userNetIo=entry.getValue();
            sb.append(userNetIo.password).append("String_Node_Str");
            sb.append(JavaUtils.bytesToString2(userNetIo.netIn.get())).append("String_Node_Str");
            sb.append(JavaUtils.bytesToString2(userNetIo.netOut.get()));
            totalNetIn=totalNetIn + userNetIo.netIn.get();
            totalNetOut=totalNetOut + userNetIo.netOut.get();
            lines.add(sb.toString());
          }
        }
        StringBuffer total=new StringBuffer();
        total.append("String_Node_Str").append("String_Node_Str");
        total.append(JavaUtils.bytesToString2(totalNetIn)).append("String_Node_Str");
        total.append(JavaUtils.bytesToString2(totalNetOut));
        lines.add(total.toString());
        return encode(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=showLog(request,"String_Node_Str");
        return encode2(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=showLog(request,"String_Node_Str");
        return encode2(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=showLog(request,"String_Node_Str");
        return encode2(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=showLog(request,"String_Node_Str");
        return encode2(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> ret=new ArrayList<String>();
        try {
          String cmd1=ShellUtils.osType == ShellUtils.OSType.OS_TYPE_MAC ? "String_Node_Str" : "String_Node_Str";
          String cmd2=ShellUtils.osType == ShellUtils.OSType.OS_TYPE_MAC ? "String_Node_Str" : "String_Node_Str";
          String iostatOut=ShellUtils.execCommand("String_Node_Str","String_Node_Str",cmd1);
          String vmstatOut=ShellUtils.execCommand("String_Node_Str","String_Node_Str",cmd2);
          StringBuilder sb=new StringBuilder();
          sb.append(iostatOut);
          sb.append("String_Node_Str");
          sb.append("String_Node_Str");
          sb.append(vmstatOut);
          String[] lines=sb.toString().split("String_Node_Str");
          ret.add("String_Node_Str");
          for (int i=1; i < lines.length; i++) {
            if (lines[i].equals("String_Node_Str"))             continue;
            ret.add(lines[i]);
          }
        }
 catch (        IOException e) {
          LOGGER.error("String_Node_Str",e);
          ret.add("String_Node_Str");
        }
        return encode2(ret);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<Object> list=new ArrayList<Object>();
        Map<Integer,AbstractPool> pools=RedisEngineCtx.INSTANCE().getPoolMap();
        StringBuffer titleLine=new StringBuffer();
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str");
        list.add(titleLine.toString());
        for (        AbstractPool pool : pools.values()) {
          if (pool instanceof RedisStandalonePool) {
            StringBuffer sb=new StringBuffer();
            RedisStandalonePool redisStandalonePool=(RedisStandalonePool)pool;
            PhysicalNode physicalNode=redisStandalonePool.getPhysicalNode();
            if (physicalNode == null)             continue;
            sb.append("String_Node_Str");
            sb.append(redisStandalonePool.getId()).append("String_Node_Str");
            sb.append(physicalNode.getPoolName()).append("String_Node_Str");
            sb.append("String_Node_Str").append("String_Node_Str");
            sb.append(physicalNode.getName()).append("String_Node_Str");
            sb.append(physicalNode.getMinCon()).append("String_Node_Str");
            sb.append(physicalNode.getMaxCon()).append("String_Node_Str");
            sb.append(physicalNode.getIdleCount()).append("String_Node_Str");
            sb.append(physicalNode.getActiveCount());
            list.add(sb.toString());
          }
 else           if (pool instanceof RedisClusterPool) {
            RedisClusterPool redisClusterPool=(RedisClusterPool)pool;
            Map<String,ClusterNode> masters=redisClusterPool.getMasters();
            List<String> clusterInfo=new ArrayList<String>();
            for (            ClusterNode clusterNode : masters.values()) {
              PhysicalNode physicalNode=clusterNode.getPhysicalNode();
              StringBuffer sb=new StringBuffer();
              sb.append(redisClusterPool.getId()).append("String_Node_Str");
              sb.append(physicalNode.getPoolName()).append("String_Node_Str");
              sb.append("String_Node_Str").append("String_Node_Str");
              sb.append(physicalNode.getName()).append("String_Node_Str");
              sb.append(physicalNode.getMinCon()).append("String_Node_Str");
              sb.append(physicalNode.getMaxCon()).append("String_Node_Str");
              sb.append(physicalNode.getIdleCount()).append("String_Node_Str");
              sb.append(physicalNode.getActiveCount()).append("String_Node_Str");
              ;
              sb.append(!clusterNode.isFail());
              clusterInfo.add(sb.toString());
              sb.append(clusterNode.getConnectInfo());
            }
            list.add(clusterInfo);
          }
 else           if (pool instanceof KafkaPool) {
            KafkaPool kafkaPool=(KafkaPool)pool;
            Map<Integer,PhysicalNode> physicalNodes=kafkaPool.getPhysicalNodes();
            for (            PhysicalNode physicalNode : physicalNodes.values()) {
              StringBuffer sb=new StringBuffer();
              sb.append("String_Node_Str");
              sb.append(kafkaPool.getId()).append("String_Node_Str");
              sb.append(physicalNode.getPoolName()).append("String_Node_Str");
              sb.append("String_Node_Str").append("String_Node_Str");
              sb.append(physicalNode.getName()).append("String_Node_Str");
              sb.append(physicalNode.getMinCon()).append("String_Node_Str");
              sb.append(physicalNode.getMaxCon()).append("String_Node_Str");
              sb.append(physicalNode.getIdleCount()).append("String_Node_Str");
              sb.append(physicalNode.getActiveCount());
              list.add(sb.toString());
            }
          }
        }
        return encodeObject(list);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        Collection<Entry<String,AtomicLong>> entrys=StatUtil.getCommandProcTimeMap().entrySet();
        List<String> lines=new ArrayList<String>();
        for (        Entry<String,AtomicLong> entry : entrys) {
          StringBuffer sBuffer=new StringBuffer();
          sBuffer.append(entry.getKey()).append("String_Node_Str").append(entry.getValue().get());
          lines.add(sBuffer.toString());
        }
        return encode(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=new ArrayList<String>();
        StringBuffer titleLine=new StringBuffer();
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str");
        lines.add(titleLine.toString());
        for (        BigLength bigLength : StatUtil.getBigLengthMap().values()) {
          StringBuffer line1=new StringBuffer();
          line1.append(bigLength.cmd).append("String_Node_Str");
          line1.append(bigLength.key).append("String_Node_Str");
          line1.append(bigLength.length.get()).append("String_Node_Str");
          line1.append(bigLength.count_1k.get()).append("String_Node_Str");
          line1.append(bigLength.count_10k.get());
          lines.add(line1.toString());
        }
        return encode(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=new ArrayList<String>();
        StringBuffer titleLine=new StringBuffer();
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str");
        lines.add(titleLine.toString());
        for (        SlowKey slowKey : StatUtil.getSlowKey()) {
          StringBuffer line1=new StringBuffer();
          line1.append(slowKey.cmd).append("String_Node_Str");
          line1.append(slowKey.key).append("String_Node_Str");
          line1.append(slowKey.count);
          lines.add(line1.toString());
        }
        return encode(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str") && (numArgs == 3 || numArgs == 2)) {
        Map<String,KafkaCfg> kafkaMap=RedisEngineCtx.INSTANCE().getKafkaMap();
        List<String> lines=new ArrayList<String>();
        if (numArgs == 2) {
          StringBuffer titleLine=new StringBuffer();
          titleLine.append("String_Node_Str").append("String_Node_Str");
          titleLine.append("String_Node_Str").append("String_Node_Str");
          titleLine.append("String_Node_Str").append("String_Node_Str");
          titleLine.append("String_Node_Str").append("String_Node_Str");
          titleLine.append("String_Node_Str").append("String_Node_Str");
          titleLine.append("String_Node_Str");
          lines.add(titleLine.toString());
          for (          Entry<String,KafkaCfg> entry : kafkaMap.entrySet()) {
            KafkaCfg kafkaCfg=entry.getValue();
            StringBuffer line=new StringBuffer();
            line.append(kafkaCfg.getTopic()).append("String_Node_Str");
            line.append(kafkaCfg.getPoolId()).append("String_Node_Str");
            line.append(kafkaCfg.getPartitions()).append("String_Node_Str");
            line.append(kafkaCfg.getReplicationFactor()).append("String_Node_Str");
            line.append(kafkaCfg.getProducers()).append("String_Node_Str");
            line.append(kafkaCfg.getConsumers());
            lines.add(line.toString());
          }
        }
 else {
          StringBuffer titleLine=new StringBuffer();
          titleLine.append("String_Node_Str").append("String_Node_Str");
          titleLine.append("String_Node_Str").append("String_Node_Str");
          titleLine.append("String_Node_Str").append("String_Node_Str");
          titleLine.append("String_Node_Str").append("String_Node_Str");
          titleLine.append("String_Node_Str");
          lines.add(titleLine.toString());
          String topic=new String(request.getArgs()[2]);
          KafkaCfg kafkaCfg=kafkaMap.get(topic);
          Map<Integer,MetaDataOffset> offsets=kafkaCfg.getMetaData().getOffsets();
          MetaDataPartition[] partitions=kafkaCfg.getMetaData().getPartitions();
          for (          MetaDataPartition partition : partitions) {
            int pt=partition.getPartition();
            MetaDataOffset offset=offsets.get(pt);
            StringBuffer line=new StringBuffer();
            line.append(kafkaCfg.getTopic()).append("String_Node_Str");
            line.append(partition.getLeader().getHost()).append(partition.getLeader().getPort()).append("String_Node_Str");
            line.append(pt).append("String_Node_Str");
            line.append(offset.getProducerOffset()).append("String_Node_Str");
            line.append(offset.getAllConsumerOffset());
            lines.add(line.toString());
          }
        }
        return encode(lines);
      }
    }
 else     if ((arg1[0] == 'N' || arg1[0] == 'n') && (arg1[1] == 'O' || arg1[1] == 'o') && (arg1[2] == 'D' || arg1[2] == 'd')&& (arg1[3] == 'E' || arg1[3] == 'e')) {
      return "String_Node_Str".getBytes();
    }
  }
 else   if (arg1.length == 6) {
    if ((arg1[0] == 'R' || arg1[0] == 'r') && (arg1[1] == 'E' || arg1[1] == 'e') && (arg1[2] == 'L' || arg1[2] == 'l')&& (arg1[3] == 'O' || arg1[3] == 'o')&& (arg1[4] == 'A' || arg1[4] == 'a')&& (arg1[5] == 'D' || arg1[5] == 'd')) {
      if (arg2.equalsIgnoreCase("String_Node_Str")) {
        byte[] buff=RedisEngineCtx.INSTANCE().reloadAll();
        return buff;
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        byte[] buff=RedisEngineCtx.INSTANCE().reloadUser();
        return buff;
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        ConcurrentMap<Long,AbstractConnection> allConnections=NetSystem.getInstance().getAllConnectios();
        Iterator<Entry<Long,AbstractConnection>> it=allConnections.entrySet().iterator();
        while (it.hasNext()) {
          AbstractConnection c=it.next().getValue();
          if (c instanceof RedisFrontConnection) {
            LOGGER.info("String_Node_Str",c);
            c.close("String_Node_Str");
          }
        }
        return "String_Node_Str".getBytes();
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        JAVA_BIN_PATH=new String(request.getArgs()[2]);
        return "String_Node_Str".getBytes();
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        byte[] buff=KafkaLoad.instance().reLoad();
        return buff;
      }
    }
  }
 else   if (arg1.length == 2) {
    if ((arg1[0] == 'Z' || arg1[0] == 'z') && (arg1[1] == 'K' || arg1[1] == 'k')) {
      return ZkClientManage.execute(request);
    }
  }
 else   if (arg1.length == 7) {
    if ((arg1[0] == 'C' || arg1[0] == 'c') && (arg1[1] == 'L' || arg1[1] == 'l') && (arg1[2] == 'U' || arg1[2] == 'u')&& (arg1[3] == 'S' || arg1[3] == 's')&& (arg1[4] == 'T' || arg1[4] == 't')&& (arg1[5] == 'E' || arg1[5] == 'e')&& (arg1[6] == 'R' || arg1[6] == 'r')) {
      AbstractPool pool=RedisEngineCtx.INSTANCE().getPoolMap().get(frontCon.getUserCfg().getPoolId());
      if (pool.getType() != 1) {
        return "String_Node_Str".getBytes();
      }
      PhysicalNode pysicalNode=((RedisClusterPool)pool).getPhysicalNodeBySlot(0);
      if (pysicalNode == null) {
        return "String_Node_Str".getBytes();
      }
      try {
        RedisBackendConnection backendCon=(RedisBackendConnection)pysicalNode.getConnection(new DirectTransTofrontCallBack(),frontCon);
        if (backendCon == null) {
          frontCon.writeErrMessage("String_Node_Str");
        }
 else {
          backendCon.write(request.encode());
        }
        return null;
      }
 catch (      IOException e) {
        LOGGER.error("String_Node_Str",e);
      }
    }
  }
  return "String_Node_Str".getBytes();
}

Fixed version (ground truth):
/** 
 * 支持后端指令 ---------------------------------------- USE [POOL_ID] RELOAD USER RELOAD ALL RELOAD FRONT RELOAD PATH RELOAD KAFKA JVM 指令依赖 JAVA_HOME  ---------------------------------------- JVM JSTACK JVM JSTAT JVM JMAP_HISTO JVM JMAP_HEAP JVM PS SHOW USER SHOW USER_NET_IO  SHOW CPU SHOW MEM SHOW QPS SHOW CONN SHOW USER_CONN SHOW BUFFER SHOW BIGKEY SHOW BIGLENGTH SHOW SLOWKEY SHOW CMD SHOW USER_CMD SHOW USER_CMD_DETAIL USER SHOW VER SHOW NET_IO 该指令兼容过去的 SHOW NETBYTES SHOW VM SHOW POOL SHOW COST SHOW USER_DAY_NET_IO SHOW POOL_NET_IO POOLNAME SHOW TOPIC SHOW LOG_ERROR SHOW LOG_WARN SHOW LOG_INFO SHOW LOG_DEBUG
 */
public static byte[] execute(final RedisRequest request,RedisFrontConnection frontCon){
  int numArgs=request.getNumArgs();
  if (numArgs != 2 && numArgs != 3 && numArgs != 4) {
    return "String_Node_Str".getBytes();
  }
  byte[] arg1=request.getArgs()[0];
  String arg2=new String(request.getArgs()[1]);
  if (arg1 == null || arg2 == null) {
    return "String_Node_Str".getBytes();
  }
  if (arg1.length == 3) {
    if ((arg1[0] == 'J' || arg1[0] == 'j') && (arg1[1] == 'V' || arg1[1] == 'v') && (arg1[2] == 'M' || arg1[2] == 'm')) {
      StringBuffer cmdBuffer=new StringBuffer();
      if (JavaUtils.isLinux())       cmdBuffer.append(JAVA_BIN_PATH);
      if (arg2.equalsIgnoreCase("String_Node_Str")) {
        cmdBuffer.append("String_Node_Str").append(JavaUtils.process_pid());
        return encode(getOS_JVM_INFO(cmdBuffer.toString()));
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        cmdBuffer.append("String_Node_Str").append(JavaUtils.process_pid());
        return encode(getOS_JVM_INFO(cmdBuffer.toString()));
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        cmdBuffer.append("String_Node_Str").append(JavaUtils.process_pid());
        return encode(getOS_JVM_INFO(cmdBuffer.toString()));
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        cmdBuffer.append("String_Node_Str").append(JavaUtils.process_pid());
        return encode(getOS_JVM_INFO(cmdBuffer.toString()));
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        String cmd="String_Node_Str" + JavaUtils.process_pid() + "String_Node_Str";
        List<String> line=new ArrayList<String>();
        try {
          line.add(ShellUtils.execCommand("String_Node_Str","String_Node_Str",cmd));
        }
 catch (        IOException e) {
          line.add(e.getMessage());
        }
        return encode(line);
      }
    }
 else     if ((arg1[0] == 'U' || arg1[0] == 'u') && (arg1[1] == 'S' || arg1[1] == 's') && (arg1[2] == 'E' || arg1[2] == 'e')) {
      try {
        int poolId=Integer.parseInt(arg2);
        AbstractPool pool=RedisEngineCtx.INSTANCE().getPoolMap().get(poolId);
        if (pool == null) {
          return "String_Node_Str".getBytes();
        }
 else {
          int poolType=pool.getType();
          frontCon.getUserCfg().setUsePool(poolId,poolType);
          return "String_Node_Str".getBytes();
        }
      }
 catch (      NumberFormatException e) {
        return "String_Node_Str".getBytes();
      }
    }
  }
 else   if (arg1.length == 4) {
    if ((arg1[0] == 'S' || arg1[0] == 's') && (arg1[1] == 'H' || arg1[1] == 'h') && (arg1[2] == 'O' || arg1[2] == 'o')&& (arg1[3] == 'W' || arg1[3] == 'w')) {
      if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=new ArrayList<String>();
        AccessStatInfoResult result=StatUtil.getTotalAccessStatInfo().get(StatUtil.STAT_KEY);
        if (result != null) {
          StringBuffer sBuffer=new StringBuffer();
          sBuffer.append("String_Node_Str").append(result.totalCount).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.slowCount).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.maxCount).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.minCount).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.avgCount).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.procTime).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.created);
          lines.add(sBuffer.toString());
        }
        return encode(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<Object> lines=new ArrayList<Object>();
        long sum=0;
        Set<Entry<String,Command>> entrys=StatUtil.getCommandCountMap().entrySet();
        for (        Entry<String,Command> entry : entrys) {
          Command parent=entry.getValue();
          StringBuffer sBuffer=new StringBuffer();
          sBuffer.append(parent.cmd).append("String_Node_Str").append(parent.count.get());
          if (parent.childs != null) {
            List<String> list=new ArrayList<String>();
            list.add(sBuffer.toString());
            for (            Entry<String,Command> childEntry : parent.childs.entrySet()) {
              Command child=childEntry.getValue();
              StringBuffer sb=new StringBuffer();
              sb.append("String_Node_Str").append(child.cmd).append("String_Node_Str").append(child.count.get());
              list.add(sb.toString());
            }
            lines.add(list);
          }
 else {
            lines.add(sBuffer.toString());
          }
          sum+=parent.count.get();
        }
        StringBuffer sBuffer=new StringBuffer();
        sBuffer.append("String_Node_Str").append("String_Node_Str").append(sum);
        lines.add(sBuffer.toString());
        return encodeObject(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=new ArrayList<String>();
        StringBuffer title=new StringBuffer();
        title.append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str");
        lines.add(title.toString());
        Set<Entry<String,UserCommand>> entrys=StatUtil.getUserCommandCountMap().entrySet();
        for (        Entry<String,UserCommand> entry : entrys) {
          UserCommand userCommand=entry.getValue();
          StringBuffer sBuffer=new StringBuffer();
          sBuffer.append(userCommand.user).append("String_Node_Str").append(userCommand.readComandCount.get()).append("String_Node_Str").append(userCommand.writeCommandCount.get()).append("String_Node_Str").append(userCommand.readComandCount.get() + userCommand.writeCommandCount.get());
          lines.add(sBuffer.toString());
        }
        return encode(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str") && numArgs == 3) {
        String user=new String(request.getArgs()[2]);
        List<String> lines=new ArrayList<String>();
        StringBuffer title=new StringBuffer();
        title.append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str");
        lines.add(title.toString());
        int sum=0;
        ConcurrentHashMap<String,UserCommand> userCommandMap=StatUtil.getUserCommandCountMap();
        UserCommand userCommand=userCommandMap.get(user);
        if (userCommand != null) {
          for (          Entry<String,AtomicLong> entry : userCommand.commandCount.entrySet()) {
            StringBuffer sBuffer=new StringBuffer();
            sBuffer.append(user).append("String_Node_Str").append(entry.getKey()).append("String_Node_Str").append(entry.getValue().get());
            lines.add(sBuffer.toString());
          }
        }
        StringBuffer end=new StringBuffer();
        end.append("String_Node_Str").append("String_Node_Str").append(sum);
        lines.add(end.toString());
        return encode(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=new ArrayList<String>();
        lines.add(Versions.SERVER_VERSION);
        return encode(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=new ArrayList<String>();
        if (JavaUtils.isLinux()) {
          StringBuffer cmdBuffer=new StringBuffer();
          cmdBuffer.append("String_Node_Str").append(JavaUtils.process_pid()).append("String_Node_Str");
          String response;
          try {
            response=ShellUtils.execCommand("String_Node_Str","String_Node_Str",cmdBuffer.toString());
            lines.add(response);
          }
 catch (          IOException e) {
            LOGGER.error("String_Node_Str",e);
            lines.add("String_Node_Str");
          }
        }
 else {
          lines.add("String_Node_Str");
        }
        return encode(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=new ArrayList<String>();
        lines.add("String_Node_Str" + JavaUtils.bytesToString2(Math.round(JavaUtils.getMemUsage())));
        return encode(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        int frontSize=0;
        int backendSize=0;
        ConcurrentMap<Long,AbstractConnection> allConnections=NetSystem.getInstance().getAllConnectios();
        Iterator<Entry<Long,AbstractConnection>> it=allConnections.entrySet().iterator();
        while (it.hasNext()) {
          AbstractConnection c=it.next().getValue();
          if (c instanceof RedisFrontConnection) {
            frontSize++;
          }
 else {
            backendSize++;
          }
        }
        StringBuffer sBuffer=new StringBuffer();
        sBuffer.append("String_Node_Str");
        sBuffer.append("String_Node_Str");
        sBuffer.append("String_Node_Str").append(frontSize).append("String_Node_Str");
        sBuffer.append("String_Node_Str").append(backendSize).append("String_Node_Str");
        return sBuffer.toString().getBytes();
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        Map<String,Integer> userMap=new HashMap<String,Integer>();
        ConcurrentMap<Long,AbstractConnection> allConnections=NetSystem.getInstance().getAllConnectios();
        Iterator<Entry<Long,AbstractConnection>> it=allConnections.entrySet().iterator();
        while (it.hasNext()) {
          AbstractConnection c=it.next().getValue();
          if (c instanceof RedisFrontConnection) {
            userMap.put(((RedisFrontConnection)c).getPassword(),1 + (userMap.get(((RedisFrontConnection)c).getPassword()) == null ? 0 : userMap.get(((RedisFrontConnection)c).getPassword())));
          }
        }
        StringBuffer sBuffer=new StringBuffer();
        sBuffer.append("String_Node_Str");
        sBuffer.append("String_Node_Str");
        Iterator<Entry<String,Integer>> users=userMap.entrySet().iterator();
        while (users.hasNext()) {
          sBuffer.append("String_Node_Str");
          Entry<String,Integer> en=users.next();
          sBuffer.append(en.getKey());
          sBuffer.append("String_Node_Str");
          sBuffer.append(en.getValue());
        }
        sBuffer.append("String_Node_Str");
        return sBuffer.toString().getBytes();
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=new ArrayList<String>();
        ConcurrentHashMap<String,AccessStatInfoResult> results=StatUtil.getTotalAccessStatInfo();
        for (        Map.Entry<String,AccessStatInfoResult> entry : results.entrySet()) {
          AccessStatInfoResult result=entry.getValue();
          StringBuffer sBuffer=new StringBuffer();
          sBuffer.append("String_Node_Str").append(result.key).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.totalCount).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.slowCount).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.maxCount).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.minCount).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.avgCount).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.procTime).append("String_Node_Str");
          sBuffer.append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.netInBytes[1]).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.netInBytes[2]).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.netInBytes[3]).append("String_Node_Str").append("String_Node_Str");
          sBuffer.append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.netOutBytes[1]).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.netOutBytes[2]).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.netOutBytes[3]).append("String_Node_Str").append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(result.created);
          lines.add(sBuffer.toString());
        }
        return encode(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=new ArrayList<String>();
        ConcurrentMap<Long,AbstractConnection> allConnections=NetSystem.getInstance().getAllConnectios();
        Iterator<Entry<Long,AbstractConnection>> it=allConnections.entrySet().iterator();
        while (it.hasNext()) {
          AbstractConnection c=it.next().getValue();
          if (c instanceof RedisFrontConnection) {
            lines.add(c.toString());
          }
        }
        return encode(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        BufferPool bufferPool=NetSystem.getInstance().getBufferPool();
        long usedBufferSize=bufferPool.getUsedBufferSize().get();
        long maxBufferSize=bufferPool.getMaxBufferSize();
        long minBufferSize=bufferPool.getMinBufferSize();
        long sharedOptsCount=bufferPool.getSharedOptsCount();
        int capacity=0;
        if (bufferPool instanceof BucketBufferPool) {
          BucketBufferPool p=(BucketBufferPool)bufferPool;
          AbstractBucket[] buckets=p.buckets();
          for (          AbstractBucket b : buckets) {
            capacity+=b.getCount();
          }
          int bucketLen=buckets.length;
          StringBuffer sBuffer=new StringBuffer();
          sBuffer.append("String_Node_Str");
          sBuffer.append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(capacity).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(minBufferSize).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(maxBufferSize).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(usedBufferSize).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(bucketLen).append("String_Node_Str");
          sBuffer.append("String_Node_Str").append(sharedOptsCount).append("String_Node_Str");
          return sBuffer.toString().getBytes();
        }
 else         if (bufferPool instanceof PageBufferPool) {
          List<String> lines=new ArrayList<String>();
          ConcurrentHashMap<Long,Long> bufferpoolUsageMap=bufferPool.getNetDirectMemoryUsage();
          long usedforNetwork=0;
          for (          Map.Entry<Long,Long> entry : bufferpoolUsageMap.entrySet()) {
            long value=entry.getValue();
            lines.add("String_Node_Str" + entry.getKey() + "String_Node_Str"+ (value > 0 ? JavaUtils.bytesToString2(value) : "String_Node_Str"));
            usedforNetwork=usedforNetwork + value;
          }
          lines.add("String_Node_Str" + JavaUtils.bytesToString2(minBufferSize));
          lines.add("String_Node_Str" + JavaUtils.bytesToString2(maxBufferSize));
          lines.add("String_Node_Str" + JavaUtils.bytesToString2(usedforNetwork));
          return encode(lines);
        }
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=new ArrayList<String>();
        BufferPool bufferPool=NetSystem.getInstance().getBufferPool();
        if (bufferPool instanceof BucketBufferPool) {
          BucketBufferPool p=(BucketBufferPool)bufferPool;
          AbstractBucket[] buckets=p.buckets();
          for (          AbstractBucket b : buckets) {
            StringBuffer sBuffer=new StringBuffer();
            sBuffer.append("String_Node_Str").append(b.getChunkSize()).append("String_Node_Str");
            sBuffer.append("String_Node_Str").append(b.getQueueSize()).append("String_Node_Str");
            sBuffer.append("String_Node_Str").append(b.getCount()).append("String_Node_Str");
            sBuffer.append("String_Node_Str").append(b.getUsedCount()).append("String_Node_Str");
            sBuffer.append("String_Node_Str").append(b.getShared());
            lines.add(sBuffer.toString());
          }
        }
        return encode(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=new ArrayList<String>();
        for (        BigKey bigkey : StatUtil.getBigKeys()) {
          StringBuffer sBuffer=new StringBuffer();
          sBuffer.append(bigkey.cmd).append("String_Node_Str");
          sBuffer.append(bigkey.key).append("String_Node_Str");
          sBuffer.append(bigkey.size).append("String_Node_Str");
          sBuffer.append(bigkey.count.get());
          lines.add(sBuffer.toString());
        }
        return encode(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=new ArrayList<String>();
        Map<String,AtomicInteger> poolConnections=new HashMap<String,AtomicInteger>();
        ConcurrentMap<Long,AbstractConnection> allConnections=NetSystem.getInstance().getAllConnectios();
        Iterator<Entry<Long,AbstractConnection>> it=allConnections.entrySet().iterator();
        while (it.hasNext()) {
          AbstractConnection c=it.next().getValue();
          if (c instanceof RedisBackendConnection) {
            String poolName=((RedisBackendConnection)c).getPhysicalNode().getPoolName();
            AtomicInteger poolConnCount=poolConnections.get(poolName);
            if (poolConnCount == null) {
              poolConnections.put(poolName,new AtomicInteger(1));
            }
 else {
              poolConnCount.incrementAndGet();
            }
            lines.add(c.toString());
          }
 else           if (c instanceof KafkaBackendConnection) {
            String poolName=((KafkaBackendConnection)c).getPhysicalNode().getPoolName();
            AtomicInteger poolConnCount=poolConnections.get(poolName);
            if (poolConnCount == null) {
              poolConnections.put(poolName,new AtomicInteger(1));
            }
 else {
              poolConnCount.incrementAndGet();
            }
            lines.add(c.toString());
          }
        }
        StringBuffer sb=new StringBuffer();
        for (        Map.Entry<String,AtomicInteger> entry : poolConnections.entrySet()) {
          sb.append(entry.getKey()).append("String_Node_Str").append(entry.getValue().get()).append("String_Node_Str");
        }
        lines.add(sb.toString());
        return encode(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str") && numArgs == 3) {
        String poolName=new String(request.getArgs()[2]);
        List<String> lines=new ArrayList<String>();
        ConcurrentMap<Long,AbstractConnection> allConnections=NetSystem.getInstance().getAllConnectios();
        Iterator<Entry<Long,AbstractConnection>> it=allConnections.entrySet().iterator();
        long minStartupTime=-1;
        long maxLastLargeMessageTime=-1;
        long totalLargeCount=0;
        long totalNetInCount=0;
        long totalNetInBytes=0;
        long totalNetOutBytes=0;
        while (it.hasNext()) {
          AbstractConnection c=it.next().getValue();
          if (c instanceof RedisBackendConnection) {
            if (((RedisBackendConnection)c).getPhysicalNode().getPoolName().equals(poolName)) {
              StringBuffer sb=new StringBuffer();
              sb.append("String_Node_Str").append(c.getId()).append("String_Node_Str");
              sb.append("String_Node_Str").append(c.getStartupTime()).append("String_Node_Str");
              sb.append("String_Node_Str").append(c.getLastLargeMessageTime()).append("String_Node_Str");
              sb.append("String_Node_Str").append(c.getLargeCount()).append("String_Node_Str");
              sb.append("String_Node_Str").append(c.getNetInCount()).append("String_Node_Str");
              sb.append("String_Node_Str").append(c.getNetInBytes()).append("String_Node_Str");
              sb.append("String_Node_Str").append(c.getNetOutBytes()).append("String_Node_Str");
              lines.add(sb.toString());
              minStartupTime=minStartupTime < 0 ? c.getStartupTime() : Math.min(minStartupTime,c.getStartupTime());
              maxLastLargeMessageTime=Math.max(maxLastLargeMessageTime,c.getLastLargeMessageTime());
              totalLargeCount=totalLargeCount + c.getLargeCount();
              totalNetInCount=totalNetInCount + c.getNetInCount();
              totalNetInBytes=totalNetInBytes + c.getNetInBytes();
              totalNetOutBytes=totalNetOutBytes + c.getNetOutBytes();
            }
          }
        }
        StringBuffer end=new StringBuffer();
        end.append("String_Node_Str").append(minStartupTime).append("String_Node_Str");
        end.append("String_Node_Str").append(maxLastLargeMessageTime).append("String_Node_Str");
        end.append("String_Node_Str").append(totalLargeCount).append("String_Node_Str");
        end.append("String_Node_Str").append(totalNetInCount).append("String_Node_Str");
        end.append("String_Node_Str").append(totalNetInBytes).append("String_Node_Str");
        end.append("String_Node_Str").append(totalNetOutBytes).append("String_Node_Str");
        lines.add(end.toString());
        return encode(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str") || arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=new ArrayList<String>();
        AccessStatInfoResult result=StatUtil.getTotalAccessStatInfo().get(StatUtil.STAT_KEY);
        if (result != null) {
          StringBuffer line0=new StringBuffer();
          line0.append("String_Node_Str").append("String_Node_Str");
          line0.append("String_Node_Str").append("String_Node_Str");
          line0.append("String_Node_Str").append("String_Node_Str");
          line0.append("String_Node_Str").append("String_Node_Str");
          line0.append("String_Node_Str");
          StringBuffer line1=new StringBuffer();
          line1.append("String_Node_Str").append("String_Node_Str");
          line1.append(result.netInBytes[0]).append("String_Node_Str");
          line1.append(result.netInBytes[1]).append("String_Node_Str");
          line1.append(result.netInBytes[2]).append("String_Node_Str");
          line1.append(result.netInBytes[3]);
          StringBuffer line2=new StringBuffer();
          line2.append("String_Node_Str").append("String_Node_Str");
          line2.append(result.netOutBytes[0]).append("String_Node_Str");
          line2.append(result.netOutBytes[1]).append("String_Node_Str");
          line2.append(result.netOutBytes[2]).append("String_Node_Str");
          line2.append(result.netOutBytes[3]);
          StringBuffer line3=new StringBuffer();
          line3.append(result.created);
          lines.add(line0.toString());
          lines.add(line1.toString());
          lines.add(line2.toString());
          lines.add(line3.toString());
        }
        return encode(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=new ArrayList<String>();
        StringBuffer titleLine=new StringBuffer();
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str");
        lines.add(titleLine.toString());
        for (        Map.Entry<String,AccessStatInfoResult> entry : StatUtil.getTotalAccessStatInfo().entrySet()) {
          if (!StatUtil.STAT_KEY.equals(entry.getKey())) {
            AccessStatInfoResult result=entry.getValue();
            StringBuffer line1=new StringBuffer();
            line1.append(result.key).append("String_Node_Str");
            line1.append("String_Node_Str").append("String_Node_Str");
            line1.append(result.netInBytes[0]).append("String_Node_Str");
            line1.append(result.netInBytes[1]).append("String_Node_Str");
            line1.append(result.netInBytes[2]).append("String_Node_Str");
            line1.append(result.netInBytes[3]);
            StringBuffer line2=new StringBuffer();
            line2.append(result.key).append("String_Node_Str");
            line2.append("String_Node_Str").append("String_Node_Str");
            line2.append(result.netOutBytes[0]).append("String_Node_Str");
            line2.append(result.netOutBytes[1]).append("String_Node_Str");
            line2.append(result.netOutBytes[2]).append("String_Node_Str");
            line2.append(result.netOutBytes[3]);
            StringBuffer line3=new StringBuffer();
            line3.append(result.created);
            lines.add(line1.toString());
            lines.add(line2.toString());
            lines.add(line3.toString());
          }
        }
        return encode(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=new ArrayList<String>();
        StringBuffer titleLine=new StringBuffer();
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str");
        lines.add(titleLine.toString());
        long totalNetIn=0;
        long totalNetOut=0;
        for (        Map.Entry<String,UserNetFlow> entry : StatUtil.getUserFlowMap().entrySet()) {
          if (!StatUtil.STAT_KEY.equals(entry.getKey())) {
            StringBuffer sb=new StringBuffer();
            UserNetFlow userNetIo=entry.getValue();
            sb.append(userNetIo.password).append("String_Node_Str");
            sb.append(JavaUtils.bytesToString2(userNetIo.netIn.get())).append("String_Node_Str");
            sb.append(JavaUtils.bytesToString2(userNetIo.netOut.get()));
            totalNetIn=totalNetIn + userNetIo.netIn.get();
            totalNetOut=totalNetOut + userNetIo.netOut.get();
            lines.add(sb.toString());
          }
        }
        StringBuffer total=new StringBuffer();
        total.append("String_Node_Str").append("String_Node_Str");
        total.append(JavaUtils.bytesToString2(totalNetIn)).append("String_Node_Str");
        total.append(JavaUtils.bytesToString2(totalNetOut));
        lines.add(total.toString());
        return encode(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=showLog(request,"String_Node_Str");
        return encode2(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=showLog(request,"String_Node_Str");
        return encode2(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=showLog(request,"String_Node_Str");
        return encode2(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=showLog(request,"String_Node_Str");
        return encode2(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> ret=new ArrayList<String>();
        try {
          String cmd1=ShellUtils.osType == ShellUtils.OSType.OS_TYPE_MAC ? "String_Node_Str" : "String_Node_Str";
          String cmd2=ShellUtils.osType == ShellUtils.OSType.OS_TYPE_MAC ? "String_Node_Str" : "String_Node_Str";
          String iostatOut=ShellUtils.execCommand("String_Node_Str","String_Node_Str",cmd1);
          String vmstatOut=ShellUtils.execCommand("String_Node_Str","String_Node_Str",cmd2);
          StringBuilder sb=new StringBuilder();
          sb.append(iostatOut);
          sb.append("String_Node_Str");
          sb.append("String_Node_Str");
          sb.append(vmstatOut);
          String[] lines=sb.toString().split("String_Node_Str");
          ret.add("String_Node_Str");
          for (int i=1; i < lines.length; i++) {
            if (lines[i].equals("String_Node_Str"))             continue;
            ret.add(lines[i]);
          }
        }
 catch (        IOException e) {
          LOGGER.error("String_Node_Str",e);
          ret.add("String_Node_Str");
        }
        return encode2(ret);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<Object> list=new ArrayList<Object>();
        Map<Integer,AbstractPool> pools=RedisEngineCtx.INSTANCE().getPoolMap();
        StringBuffer titleLine=new StringBuffer();
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str");
        list.add(titleLine.toString());
        for (        AbstractPool pool : pools.values()) {
          if (pool instanceof RedisStandalonePool) {
            StringBuffer sb=new StringBuffer();
            RedisStandalonePool redisStandalonePool=(RedisStandalonePool)pool;
            PhysicalNode physicalNode=redisStandalonePool.getPhysicalNode();
            if (physicalNode == null)             continue;
            sb.append("String_Node_Str");
            sb.append(redisStandalonePool.getId()).append("String_Node_Str");
            sb.append(physicalNode.getPoolName()).append("String_Node_Str");
            sb.append("String_Node_Str").append("String_Node_Str");
            sb.append(physicalNode.getName()).append("String_Node_Str");
            sb.append(physicalNode.getMinCon()).append("String_Node_Str");
            sb.append(physicalNode.getMaxCon()).append("String_Node_Str");
            sb.append(physicalNode.getIdleCount()).append("String_Node_Str");
            sb.append(physicalNode.getActiveCount());
            list.add(sb.toString());
          }
 else           if (pool instanceof RedisClusterPool) {
            RedisClusterPool redisClusterPool=(RedisClusterPool)pool;
            Map<String,ClusterNode> masters=redisClusterPool.getMasters();
            List<String> clusterInfo=new ArrayList<String>();
            for (            ClusterNode clusterNode : masters.values()) {
              PhysicalNode physicalNode=clusterNode.getPhysicalNode();
              StringBuffer sb=new StringBuffer();
              sb.append(redisClusterPool.getId()).append("String_Node_Str");
              sb.append(physicalNode.getPoolName()).append("String_Node_Str");
              sb.append("String_Node_Str").append("String_Node_Str");
              sb.append(physicalNode.getName()).append("String_Node_Str");
              sb.append(physicalNode.getMinCon()).append("String_Node_Str");
              sb.append(physicalNode.getMaxCon()).append("String_Node_Str");
              sb.append(physicalNode.getIdleCount()).append("String_Node_Str");
              sb.append(physicalNode.getActiveCount()).append("String_Node_Str");
              ;
              sb.append(!clusterNode.isFail());
              clusterInfo.add(sb.toString());
              sb.append(clusterNode.getConnectInfo());
            }
            list.add(clusterInfo);
          }
 else           if (pool instanceof KafkaPool) {
            KafkaPool kafkaPool=(KafkaPool)pool;
            Map<Integer,PhysicalNode> physicalNodes=kafkaPool.getPhysicalNodes();
            for (            PhysicalNode physicalNode : physicalNodes.values()) {
              StringBuffer sb=new StringBuffer();
              sb.append("String_Node_Str");
              sb.append(kafkaPool.getId()).append("String_Node_Str");
              sb.append(physicalNode.getPoolName()).append("String_Node_Str");
              sb.append("String_Node_Str").append("String_Node_Str");
              sb.append(physicalNode.getName()).append("String_Node_Str");
              sb.append(physicalNode.getMinCon()).append("String_Node_Str");
              sb.append(physicalNode.getMaxCon()).append("String_Node_Str");
              sb.append(physicalNode.getIdleCount()).append("String_Node_Str");
              sb.append(physicalNode.getActiveCount());
              list.add(sb.toString());
            }
          }
        }
        return encodeObject(list);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        Collection<Entry<String,AtomicLong>> entrys=StatUtil.getCommandProcTimeMap().entrySet();
        List<String> lines=new ArrayList<String>();
        for (        Entry<String,AtomicLong> entry : entrys) {
          StringBuffer sBuffer=new StringBuffer();
          sBuffer.append(entry.getKey()).append("String_Node_Str").append(entry.getValue().get());
          lines.add(sBuffer.toString());
        }
        return encode(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=new ArrayList<String>();
        StringBuffer titleLine=new StringBuffer();
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str");
        lines.add(titleLine.toString());
        for (        BigLength bigLength : StatUtil.getBigLengthMap().values()) {
          StringBuffer line1=new StringBuffer();
          line1.append(bigLength.cmd).append("String_Node_Str");
          line1.append(bigLength.key).append("String_Node_Str");
          line1.append(bigLength.length.get()).append("String_Node_Str");
          line1.append(bigLength.count_1k.get()).append("String_Node_Str");
          line1.append(bigLength.count_10k.get());
          lines.add(line1.toString());
        }
        return encode(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        List<String> lines=new ArrayList<String>();
        StringBuffer titleLine=new StringBuffer();
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str").append("String_Node_Str");
        titleLine.append("String_Node_Str");
        lines.add(titleLine.toString());
        for (        SlowKey slowKey : StatUtil.getSlowKey()) {
          StringBuffer line1=new StringBuffer();
          line1.append(slowKey.cmd).append("String_Node_Str");
          line1.append(slowKey.key).append("String_Node_Str");
          line1.append(slowKey.count);
          lines.add(line1.toString());
        }
        return encode(lines);
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str") && (numArgs == 3 || numArgs == 2)) {
        Map<String,KafkaCfg> kafkaMap=RedisEngineCtx.INSTANCE().getKafkaMap();
        List<String> lines=new ArrayList<String>();
        if (numArgs == 2) {
          StringBuffer titleLine=new StringBuffer();
          titleLine.append("String_Node_Str").append("String_Node_Str");
          titleLine.append("String_Node_Str").append("String_Node_Str");
          titleLine.append("String_Node_Str").append("String_Node_Str");
          titleLine.append("String_Node_Str").append("String_Node_Str");
          titleLine.append("String_Node_Str").append("String_Node_Str");
          titleLine.append("String_Node_Str");
          lines.add(titleLine.toString());
          for (          Entry<String,KafkaCfg> entry : kafkaMap.entrySet()) {
            KafkaCfg kafkaCfg=entry.getValue();
            StringBuffer line=new StringBuffer();
            line.append(kafkaCfg.getTopic()).append("String_Node_Str");
            line.append(kafkaCfg.getPoolId()).append("String_Node_Str");
            line.append(kafkaCfg.getPartitions()).append("String_Node_Str");
            line.append(kafkaCfg.getReplicationFactor()).append("String_Node_Str");
            line.append(kafkaCfg.getProducers()).append("String_Node_Str");
            line.append(kafkaCfg.getConsumers());
            lines.add(line.toString());
          }
        }
 else {
          StringBuffer titleLine=new StringBuffer();
          titleLine.append("String_Node_Str").append("String_Node_Str");
          titleLine.append("String_Node_Str").append("String_Node_Str");
          titleLine.append("String_Node_Str").append("String_Node_Str");
          titleLine.append("String_Node_Str").append("String_Node_Str");
          titleLine.append("String_Node_Str");
          lines.add(titleLine.toString());
          String topic=new String(request.getArgs()[2]);
          KafkaCfg kafkaCfg=kafkaMap.get(topic);
          if (kafkaCfg != null) {
            Map<Integer,MetaDataOffset> offsets=kafkaCfg.getMetaData().getOffsets();
            MetaDataPartition[] partitions=kafkaCfg.getMetaData().getPartitions();
            for (            MetaDataPartition partition : partitions) {
              int pt=partition.getPartition();
              MetaDataOffset offset=offsets.get(pt);
              StringBuffer line=new StringBuffer();
              line.append(kafkaCfg.getTopic()).append("String_Node_Str");
              line.append(partition.getLeader().getHost()).append(partition.getLeader().getPort()).append("String_Node_Str");
              line.append(pt).append("String_Node_Str");
              line.append(offset.getProducerOffset()).append("String_Node_Str");
              line.append(offset.getAllConsumerOffset());
              lines.add(line.toString());
            }
          }
        }
        return encode(lines);
      }
    }
 else     if ((arg1[0] == 'N' || arg1[0] == 'n') && (arg1[1] == 'O' || arg1[1] == 'o') && (arg1[2] == 'D' || arg1[2] == 'd')&& (arg1[3] == 'E' || arg1[3] == 'e')) {
      return "String_Node_Str".getBytes();
    }
  }
 else   if (arg1.length == 6) {
    if ((arg1[0] == 'R' || arg1[0] == 'r') && (arg1[1] == 'E' || arg1[1] == 'e') && (arg1[2] == 'L' || arg1[2] == 'l')&& (arg1[3] == 'O' || arg1[3] == 'o')&& (arg1[4] == 'A' || arg1[4] == 'a')&& (arg1[5] == 'D' || arg1[5] == 'd')) {
      if (arg2.equalsIgnoreCase("String_Node_Str")) {
        byte[] buff=RedisEngineCtx.INSTANCE().reloadAll();
        return buff;
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        byte[] buff=RedisEngineCtx.INSTANCE().reloadUser();
        return buff;
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        ConcurrentMap<Long,AbstractConnection> allConnections=NetSystem.getInstance().getAllConnectios();
        Iterator<Entry<Long,AbstractConnection>> it=allConnections.entrySet().iterator();
        while (it.hasNext()) {
          AbstractConnection c=it.next().getValue();
          if (c instanceof RedisFrontConnection) {
            LOGGER.info("String_Node_Str",c);
            c.close("String_Node_Str");
          }
        }
        return "String_Node_Str".getBytes();
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        JAVA_BIN_PATH=new String(request.getArgs()[2]);
        return "String_Node_Str".getBytes();
      }
 else       if (arg2.equalsIgnoreCase("String_Node_Str")) {
        byte[] buff=KafkaLoad.instance().reLoad();
        return buff;
      }
    }
  }
 else   if (arg1.length == 2) {
    if ((arg1[0] == 'Z' || arg1[0] == 'z') && (arg1[1] == 'K' || arg1[1] == 'k')) {
      return ZkClientManage.execute(request);
    }
  }
 else   if (arg1.length == 7) {
    if ((arg1[0] == 'C' || arg1[0] == 'c') && (arg1[1] == 'L' || arg1[1] == 'l') && (arg1[2] == 'U' || arg1[2] == 'u')&& (arg1[3] == 'S' || arg1[3] == 's')&& (arg1[4] == 'T' || arg1[4] == 't')&& (arg1[5] == 'E' || arg1[5] == 'e')&& (arg1[6] == 'R' || arg1[6] == 'r')) {
      AbstractPool pool=RedisEngineCtx.INSTANCE().getPoolMap().get(frontCon.getUserCfg().getPoolId());
      if (pool.getType() != 1) {
        return "String_Node_Str".getBytes();
      }
      PhysicalNode pysicalNode=((RedisClusterPool)pool).getPhysicalNodeBySlot(0);
      if (pysicalNode == null) {
        return "String_Node_Str".getBytes();
      }
      try {
        RedisBackendConnection backendCon=(RedisBackendConnection)pysicalNode.getConnection(new DirectTransTofrontCallBack(),frontCon);
        if (backendCon == null) {
          frontCon.writeErrMessage("String_Node_Str");
        }
 else {
          backendCon.write(request.encode());
        }
        return null;
      }
 catch (      IOException e) {
        LOGGER.error("String_Node_Str",e);
      }
    }
  }
  return "String_Node_Str".getBytes();
}