lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "longkeyy (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-4068) when all of shards 's core died update was not work
Date Tue, 13 Nov 2012 01:20:12 GMT

    [ https://issues.apache.org/jira/browse/SOLR-4068?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13495814#comment-13495814
] 

longkeyy commented on SOLR-4068:
--------------------------------

 private RangeInfo addRangeInfo(String collection) {
    List<Range> ranges;
    RangeInfo rangeInfo;
    rangeInfo = new RangeInfo();
    
    Map<String,Slice> slices = getSlices(collection);
    
    if (slices == null) {
      throw new SolrException(ErrorCode.BAD_REQUEST, "Can not find collection "
          + collection + " in " + this);
    }
    
    Map<String,Slice> newSlices = new LinkedHashMap<String,Slice>();       
    // delete died shards
    for (Slice slice : slices.values()) {      
      Collection<Replica> rep = slice.getReplicas();
      for (Replica replica : rep) {
        for (String liveNode : liveNodes) {
          if (replica.getName().contains(liveNode)) {
            newSlices.put(slice.getName(), slice);
          }
        }
      }
    }
    
    Set<String> shards = newSlices.keySet();
    
    ArrayList<String> shardList = new ArrayList<String>(shards.size());
    shardList.addAll(shards);
    

    Collections.sort(shardList);
    
    ranges = hp.partitionRange(shards.size(), Integer.MIN_VALUE,
        Integer.MAX_VALUE);
    
    rangeInfo.ranges = ranges;
    rangeInfo.shardList = shardList;
    rangeInfos.put(collection, rangeInfo);
    return rangeInfo;
  }
                
> when all of shards 's core died update was not work
> ---------------------------------------------------
>
>                 Key: SOLR-4068
>                 URL: https://issues.apache.org/jira/browse/SOLR-4068
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>    Affects Versions: 4.0
>            Reporter: longkeyy
>              Labels: patch
>             Fix For: 4.0
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> when all of shards 's core died update was not work. then getShardId where got a died
shardId with any live core.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message