Examples of nodeId()


Examples of org.elasticsearch.search.SearchShardTarget.nodeId()

        fetchResults = newHashMap();
        for (Map.Entry<SearchShardTarget, ExtTIntArrayList> entry : docIdsToLoad.entrySet()) {
            SearchShardTarget shardTarget = entry.getKey();
            ExtTIntArrayList docIds = entry.getValue();
            FetchSearchResult fetchResult = nodeToSearchService.get(shardTarget.nodeId()).executeFetchPhase(new FetchSearchRequest(queryResults.get(shardTarget).queryResult().id(), docIds));
            fetchResults.put(fetchResult.shardTarget(), fetchResult.initCounter());
        }

        hits = searchPhaseController.merge(sortedShardList, queryResults, fetchResults).hits();
        assertThat(hits.totalHits(), equalTo(100l));
View Full Code Here

Examples of org.elasticsearch.search.SearchShardTarget.nodeId()

        fetchResults = newHashMap();
        for (Map.Entry<SearchShardTarget, ExtTIntArrayList> entry : docIdsToLoad.entrySet()) {
            SearchShardTarget shardTarget = entry.getKey();
            ExtTIntArrayList docIds = entry.getValue();
            FetchSearchResult fetchResult = nodeToSearchService.get(shardTarget.nodeId()).executeFetchPhase(new FetchSearchRequest(queryResults.get(shardTarget).queryResult().id(), docIds));
            fetchResults.put(fetchResult.shardTarget(), fetchResult.initCounter());
        }

        hits = searchPhaseController.merge(sortedShardList, queryResults, fetchResults).hits();
        assertThat(hits.totalHits(), equalTo(100l));
View Full Code Here

Examples of org.elasticsearch.search.SearchShardTarget.nodeId()

        Map<SearchShardTarget, FetchSearchResult> fetchResults = newHashMap();
        for (Map.Entry<SearchShardTarget, ExtTIntArrayList> entry : docIdsToLoad.entrySet()) {
            SearchShardTarget shardTarget = entry.getKey();
            ExtTIntArrayList docIds = entry.getValue();
            FetchSearchResult fetchResult = nodeToSearchService.get(shardTarget.nodeId()).executeFetchPhase(new FetchSearchRequest(queryResults.get(shardTarget).queryResult().id(), docIds));
            fetchResults.put(fetchResult.shardTarget(), fetchResult.initCounter());
        }

        InternalSearchResponse searchResponse = searchPhaseController.merge(sortedShardList, queryResults, fetchResults);
        assertThat(searchResponse.hits().totalHits(), equalTo(100l));
View Full Code Here

Examples of org.elasticsearch.search.SearchShardTarget.nodeId()

            for (final Map.Entry<SearchShardTarget, ExtTIntArrayList> entry : docIdsToLoad.entrySet()) {
                SearchShardTarget shardTarget = entry.getKey();
                ExtTIntArrayList docIds = entry.getValue();
                FetchSearchRequest fetchSearchRequest = new FetchSearchRequest(queryResults.get(shardTarget).id(), docIds);
                DiscoveryNode node = nodes.get(shardTarget.nodeId());
                searchService.sendExecuteFetch(node, fetchSearchRequest, new SearchServiceListener<FetchSearchResult>() {
                    @Override public void onResult(FetchSearchResult result) {
                        result.shardTarget(entry.getKey());
                        fetchResults.put(result.shardTarget(), result);
                        if (counter.decrementAndGet() == 0) {
View Full Code Here

Examples of org.elasticsearch.search.SearchShardTarget.nodeId()

        }).when(searchPhaseController).fillDocIdsToLoad(any(AtomicArray.class), any(ScoreDoc[].class));

        QuerySearchResult queryResult = mock(QuerySearchResult.class, Answers.RETURNS_DEEP_STUBS.get());

        SearchShardTarget target = mock(SearchShardTarget.class);
        when(target.nodeId()).thenReturn("node_1");
        when(queryResult.shardTarget()).thenReturn(target);

        queryThenFetchTask.start();
        verify(transportQueryShardAction).execute(anyString(), any(QueryShardRequest.class), responseListener.capture());
        responseListener.getValue().onResponse(queryResult);
View Full Code Here

Examples of org.tmatesoft.hg.internal.ManifestRevision.nodeid()

          ca = new HgFileRevision(hgRepo, nidCA, null, pathPool.path(r[4]));
        }
        HgFileRevision p2;
        if (!wcp2.isNull() || !r[6].equals(r[4])) {
          final Path p2fname = pathPool.path(r[6]);
          Nodeid nidP2 = m2.nodeid(p2fname);
          if (nidP2 == null) {
            assert false : "There's not enough information (or I don't know where to look) in merge/state to find out what's the second parent";
            nidP2 = NULL;
          }
          p2 = new HgFileRevision(hgRepo, nidP2, m2.flags(p2fname), p2fname);
View Full Code Here

Examples of org.tmatesoft.hg.internal.ManifestRevision.nodeid()

    for (Path r2fname : r2.files()) {
      if (!scope.accept(r2fname)) {
        continue;
      }
      if (r1Files.remove(r2fname)) {
        Nodeid nidR1 = r1.nodeid(r2fname);
        Nodeid nidR2 = r2.nodeid(r2fname);
        HgManifest.Flags flagsR1 = r1.flags(r2fname);
        HgManifest.Flags flagsR2 = r2.flags(r2fname);
        if (nidR1.equals(nidR2) && flagsR2 == flagsR1) {
          inspector.clean(r2fname);
View Full Code Here

Examples of org.tmatesoft.hg.internal.ManifestRevision.nodeid()

      ResolverImpl resolver = new ResolverImpl(implRepo, dirstateBuilder, mergeStateBuilder);
      try {
        for (Path f : m1.files()) {
          Nodeid fileRevBase, fileRevA, fileRevB;
          if (m2.contains(f)) {
            fileRevA = m1.nodeid(f);
            fileRevB = m2.nodeid(f);
            fileRevBase = ma.contains(f) ? ma.nodeid(f) : null;
            if (fileRevA.equals(fileRevB)) {
              HgFileRevision fr = new HgFileRevision(repo, fileRevA, m1.flags(f), f);
              resolver.presentState(f, fr, fr, null);
View Full Code Here

Examples of org.tmatesoft.hg.internal.ManifestRevision.nodeid()

              resolver.presentState(f, frFirst, frSecond, frBase);
              mediator.resolve(frBase, frFirst, frSecond, resolver);
            }
          } else {
            // m2 doesn't contain the file, either new in m1, or deleted in m2
            HgFileRevision frFirst = new HgFileRevision(repo, m1.nodeid(f), m1.flags(f), f);
            if (ma.contains(f)) {
              // deleted in m2
              HgFileRevision frBase = new HgFileRevision(repo, ma.nodeid(f), ma.flags(f), f);
              resolver.presentState(f, frFirst, null, frBase);
              mediator.onlyA(frBase, frFirst, resolver);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.