Examples of ExistsResponse


Examples of org.apache.zookeeper_voltpatches.proto.ExistsResponse

                if (path.indexOf('\0') != -1) {
                    throw new KeeperException.BadArgumentsException();
                }
                Stat stat = getZKDatabase().statNode(path,
                        existsRequest.getWatch() ? cnxn : null);
                rsp = new ExistsResponse(stat);
                break;
            }
            case OpCode.getData: {
                lastOp = "GETD";
                GetDataRequest getDataRequest = new GetDataRequest();
View Full Code Here

Examples of org.apache.zookeeper_voltpatches.proto.ExistsResponse

  }
  public int compareTo (Object peer_) throws ClassCastException {
    if (!(peer_ instanceof ExistsResponse)) {
      throw new ClassCastException("Comparing different types of records.");
    }
    ExistsResponse peer = (ExistsResponse) peer_;
    int ret = 0;
    ret = stat.compareTo(peer.stat);
    if (ret != 0) return ret;
     return ret;
  }
View Full Code Here

Examples of org.apache.zookeeper_voltpatches.proto.ExistsResponse

      return false;
    }
    if (peer_ == this) {
      return true;
    }
    ExistsResponse peer = (ExistsResponse) peer_;
    boolean ret = false;
    ret = stat.equals(peer.stat);
    if (!ret) return ret;
     return ret;
  }
View Full Code Here

Examples of org.elasticsearch.action.exists.ExistsResponse

            // randomPreference should not start with '_' (reserved for known preference types (e.g. _shards, _primary)
            while (randomPreference.startsWith("_")) {
                randomPreference = randomUnicodeOfLengthBetween(0, 4);
            }
            // id is not indexed, but lets see that we automatically convert to
            ExistsResponse existsResponse = client().prepareExists().setQuery(QueryBuilders.matchAllQuery()).setPreference(randomPreference).get();
            assertExists(existsResponse, true);
        }
    }
View Full Code Here

Examples of org.elasticsearch.action.exists.ExistsResponse

                        .endObject().endObject().endObject())
                .execute().actionGet();

        client().prepareIndex("test", "type1", "1").setSource("from", "192.168.0.5", "to", "192.168.0.10").setRefresh(true).execute().actionGet();

        ExistsResponse existsResponse = client().prepareExists()
                .setQuery(boolQuery().must(rangeQuery("from").lt("192.168.0.7")).must(rangeQuery("to").gt("192.168.0.7"))).get();

        assertExists(existsResponse, true);

        existsResponse = client().prepareExists().setQuery(boolQuery().must(rangeQuery("from").lt("192.168.0.4")).must(rangeQuery("to").gt("192.168.0.11"))).get();
View Full Code Here

Examples of org.elasticsearch.action.exists.ExistsResponse

    public void simpleIdTests() {
        createIndex("test");

        client().prepareIndex("test", "type", "XXX1").setSource("field", "value").setRefresh(true).execute().actionGet();
        // id is not indexed, but lets see that we automatically convert to
        ExistsResponse existsResponse = client().prepareExists().setQuery(QueryBuilders.termQuery("_id", "XXX1")).execute().actionGet();
        assertExists(existsResponse, true);

        existsResponse = client().prepareExists().setQuery(QueryBuilders.queryString("_id:XXX1")).execute().actionGet();
        assertExists(existsResponse, true);
View Full Code Here

Examples of org.elasticsearch.action.exists.ExistsResponse

        createIndex("test");
        client().prepareIndex("test", "type1", "1").setSource("field", "2010-01-05T02:00").execute().actionGet();
        client().prepareIndex("test", "type1", "2").setSource("field", "2010-01-06T02:00").execute().actionGet();
        ensureGreen();
        refresh();
        ExistsResponse existsResponse = client().prepareExists("test").setQuery(QueryBuilders.rangeQuery("field").gte("2010-01-03||+2d").lte("2010-01-04||+2d")).execute().actionGet();
        assertExists(existsResponse, true);

        existsResponse = client().prepareExists("test").setQuery(QueryBuilders.queryString("field:[2010-01-03||+2d TO 2010-01-04||+2d]")).execute().actionGet();
        assertExists(existsResponse, true);
    }
View Full Code Here

Examples of org.elasticsearch.action.exists.ExistsResponse

        client().prepareIndex("test", "type1", "1").setSource("field", "2010-01-05T02:00").execute().actionGet();
        client().prepareIndex("test", "type1", "2").setSource("field", "2010-01-06T02:00").execute().actionGet();
        client().prepareIndex("test", "type", "XXX1").setSource("field", "value").execute().actionGet();
        ensureGreen();
        refresh();
        ExistsResponse existsResponse = client().prepareExists("test").setQuery(QueryBuilders.rangeQuery("field").gte("2010-01-07||+2d").lte("2010-01-21||+2d")).execute().actionGet();
        assertExists(existsResponse, false);

        existsResponse = client().prepareExists("test").setQuery(QueryBuilders.queryString("_id:XXY*").lowercaseExpandedTerms(false)).execute().actionGet();
        assertExists(existsResponse, false);
    }
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.