Package com.alimama.mdrill.partion.GetShards

Examples of com.alimama.mdrill.partion.GetShards.ShardsList


    JSONObject rtn = new JSONObject();
 
    if(tp==null||tp.equals(FlushType.buffer))
    {
      ShardsList write =null;
      if(islocal)
      {
        ArrayList<ShardsList> list=new ArrayList<GetShards.ShardsList>(cores.length);
        for(ShardsList shard:cores)
        {
View Full Code Here


      ms = cores;
    }
    if (cores != null && cores.length > 0) {
      StringBuffer buff=new StringBuffer();
      for (int i = 0; i < cores.length; i++) {
        ShardsList c = cores[i];
        buff.append(c.randomGet() + "/solr/" + projectName
            + "@_mdrillshard_,");
//        for (String part : partions) {
//          rtn.urlShards += c.randomGet() + "/solr/" + projectName
//              + "@" + part + ",";
//        }
//        count++;
      }
      rtn.urlShards=buff.toString();
    }
   

    if (ms != null && ms.length > 0) {
      int count = 0;
      int r = rdm.nextInt(ms.length);
      int r2 = rdm.nextInt(cores.length);
      for (ShardsList c : ms) {
        if (count == r2) {
          rtn.randomShard = c.randomGet() + "/solr/" + projectName;
        }
        if (count == r) {
          rtn.urlMain = "http://" + c.randomGet() + "/solr/"
              + projectName;
        }
        rtn.urlMSs += c.randomGet() + "/solr/" + projectName + ",";

        count++;
      }
    }
    return rtn;
View Full Code Here

TOP

Related Classes of com.alimama.mdrill.partion.GetShards.ShardsList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.