Examples of entries()


Examples of org.elasticsearch.cluster.metadata.SnapshotMetaData.entries()

            if (snapshotMetaData == null) {
                // Snapshots are not running
                return allocation.decision(Decision.YES, NAME, "no snapshots are currently running");
            }

            for (SnapshotMetaData.Entry snapshot : snapshotMetaData.entries()) {
                SnapshotMetaData.ShardSnapshotStatus shardSnapshotStatus = snapshot.shards().get(shardRouting.shardId());
                if (shardSnapshotStatus != null && !shardSnapshotStatus.state().completed() && shardSnapshotStatus.nodeId() != null && shardSnapshotStatus.nodeId().equals(shardRouting.currentNodeId())) {
                    logger.trace("Preventing snapshotted shard [{}] to be moved from node [{}]", shardRouting.shardId(), shardSnapshotStatus.nodeId());
                    return allocation.decision(Decision.NO, NAME, "snapshot for shard [%s] is currently running on node [%s]",
                            shardRouting.shardId(), shardSnapshotStatus.nodeId());
View Full Code Here

Examples of org.elasticsearch.search.facet.datehistogram.DateHistogramFacet.entries()

            assertThat(facet.name(), equalTo("stats5"));
            assertThat(facet.entries().size(), equalTo(2));
            assertThat(facet.entries().get(0).time(), equalTo(utcTimeInMillis("2009-03-05")));
            assertThat(facet.entries().get(0).count(), equalTo(2l));
            assertThat(facet.entries().get(1).time(), equalTo(utcTimeInMillis("2009-03-06")));
            assertThat(facet.entries().get(1).count(), equalTo(1l));
        }
    }

    @Test public void testTermsStatsFacets() throws Exception {
        try {
View Full Code Here

Examples of org.elasticsearch.search.facet.geodistance.GeoDistanceFacet.entries()

                )
                .execute().actionGet();

        assertThat(searchResponse.hits().totalHits(), equalTo(7l));
        GeoDistanceFacet facet = searchResponse.facets().facet("geo1");
        assertThat(facet.entries().size(), equalTo(4));

        assertThat(facet.entries().get(0).to(), closeTo(2, 0.000001));
        assertThat(facet.entries().get(0).count(), equalTo(4l));
        assertThat(facet.entries().get(0).total(), not(closeTo(0, 0.00001)));
View Full Code Here

Examples of org.elasticsearch.search.facet.histogram.HistogramFacet.entries()

            }
            assertThat(searchResponse.failedShards(), equalTo(0));

            HistogramFacet facet = searchResponse.facets().facet("facet1");
            assertThat(facet.name(), equalTo("facet1"));
            assertThat(facet.entries().size(), equalTo(3));
            assertThat(facet.entries().get(0).key(), equalTo(100l));
            assertThat(facet.entries().get(0).count(), equalTo(1l));
            assertThat(facet.entries().get(1).key(), equalTo(200l));
            assertThat(facet.entries().get(1).count(), equalTo(1l));
            assertThat(facet.entries().get(2).key(), equalTo(300l));
View Full Code Here

Examples of org.elasticsearch.search.facet.range.RangeFacet.entries()

            assertThat(facet.entries().get(1).min(), closeTo(10, 0.000001));
            assertThat(facet.entries().get(1).max(), closeTo(21, 0.000001));
            assertThat(facet.entries().get(2).from(), closeTo(1170, 0.000001));
            assertThat(facet.entries().get(2).count(), equalTo(1l));
            assertThat(facet.entries().get(2).totalCount(), equalTo(2l));
            assertThat(facet.entries().get(2).total(), closeTo(61, 0.000001));
            assertThat(facet.entries().get(2).min(), closeTo(30, 0.000001));
            assertThat(facet.entries().get(2).max(), closeTo(31, 0.000001));

            facet = searchResponse.facets().facet("range4");
            assertThat(facet.name(), equalTo("range4"));
View Full Code Here

Examples of org.elasticsearch.search.facet.terms.TermsFacet.entries()

        Facet facet = facetIter.next();
        if (facet.type().equals(TermsFacet.TYPE)) {
          // we have term facet, create NamedList to store terms
          TermsFacet termFacet = (TermsFacet) facet;
          NamedList<Object> termFacetObj = new SimpleOrderedMap<Object>();
          for (TermsFacet.Entry tfEntry : termFacet.entries()) {
            termFacetObj.add(tfEntry.term(), tfEntry.count());
          }

          termFacets.add(facet.getName(), termFacetObj);
        } else if (facet.type().equals(QueryFacet.TYPE)) {
View Full Code Here

Examples of org.elasticsearch.search.facet.termsstats.TermsStatsFacet.entries()

        assertThat(Arrays.toString(searchResponse.shardFailures()), searchResponse.failedShards(), equalTo(0));
        assertThat(searchResponse.hits().totalHits(), equalTo(2l));

        TermsStatsFacet termsStatsFacet = searchResponse.facets().facet("facet1");
        assertThat(termsStatsFacet.entries().size(), equalTo(4));
        assertThat(termsStatsFacet.entries().get(0).term(), equalTo("blue"));
        assertThat(termsStatsFacet.entries().get(0).count(), equalTo(3l));
        assertThat(termsStatsFacet.entries().get(0).total(), equalTo(8d));
        assertThat(termsStatsFacet.entries().get(1).term(), equalTo("yellow"));
        assertThat(termsStatsFacet.entries().get(1).count(), equalTo(2l));
View Full Code Here

Examples of org.elasticsearch.search.warmer.IndexWarmersMetaData.entries()

            if (warmers == null) {
                continue;
            }

            boolean foundOne = false;
            for (IndexWarmersMetaData.Entry entry : warmers.entries()) {
                if (name == null || Regex.simpleMatch(name, entry.name())) {
                    foundOne = true;
                    break;
                }
            }
View Full Code Here

Examples of org.exist.versioning.svn.internal.wc.admin.SVNAdminArea.entries()

        if (entry != null && entry.getKind() == SVNNodeKind.DIR && depth.compareTo(SVNDepth.EMPTY) > 0) {
            SVNDepth depthBelowHere = depth;
            if (depth == SVNDepth.FILES || depth == SVNDepth.IMMEDIATES) {
                depthBelowHere = SVNDepth.EMPTY;
            }
            for (Iterator entries = dir.entries(false); entries.hasNext();) {
                SVNEntry childEntry = (SVNEntry) entries.next();
                if (dir.getThisDirName().equals(childEntry.getName())) {
                    continue;
                }
                if (depth == SVNDepth.FILES && !childEntry.isFile()) {
View Full Code Here

Examples of org.gatein.common.jar.JarInfo.entries()

      boolean enabled = true;

      //
      Stack stack = new Stack(jarURL, rootEntryInfo);
      for (Iterator<JarEntryInfo> i = jarInfo.entries(); i.hasNext();)
      {
         JarEntryInfo entryInfo = (JarEntryInfo)i.next();

         // Only consider descendant of the root or root itself
         if (entryInfo.equals(rootEntryInfo) || entryInfo.isDescendantOf(rootEntryInfo))
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.