Search in sources :

Example 6 with RestTestHarness

use of org.apache.solr.util.RestTestHarness in project lucene-solr by apache.

the class TestConfigReload method setupHarnesses.

private void setupHarnesses() {
    for (final SolrClient client : clients) {
        RestTestHarness harness = new RestTestHarness(() -> ((HttpSolrClient) client).getBaseURL());
        restTestHarnesses.add(harness);
    }
}
Also used : RestTestHarness(org.apache.solr.util.RestTestHarness) SolrClient(org.apache.solr.client.solrj.SolrClient) HttpSolrClient(org.apache.solr.client.solrj.impl.HttpSolrClient)

Example 7 with RestTestHarness

use of org.apache.solr.util.RestTestHarness in project lucene-solr by apache.

the class TestUseDocValuesAsStored2 method testSchemaAPI.

public void testSchemaAPI() throws Exception {
    RestTestHarness harness = restTestHarness;
    String payload = "{\n" + "          'add-field' : {\n" + "                       'name':'a1',\n" + "                       'type': 'string',\n" + "                       'stored':false,\n" + "                       'docValues':true,\n" + "                       'indexed':false\n" + "                       },\n" + "          'add-field' : {\n" + "                       'name':'a2',\n" + "                       'type': 'string',\n" + "                       'stored':false,\n" + "                       'useDocValuesAsStored':true,\n" + "                       'docValues':true,\n" + "                       'indexed':true\n" + "                       },\n" + "          'add-field' : {\n" + "                       'name':'a3',\n" + "                       'type': 'string',\n" + "                       'stored':false,\n" + "                       'useDocValuesAsStored':false,\n" + "                       'docValues':true,\n" + "                       'indexed':true\n" + "                       }\n" + "          }\n";
    String response = harness.post("/schema?wt=json", json(payload));
    Map m = (Map) ObjectBuilder.getVal(new JSONParser(new StringReader(response)));
    assertNull(response, m.get("errors"));
    // default value of useDocValuesAsStored
    m = TestBulkSchemaAPI.getObj(harness, "a1", "fields");
    assertNotNull("field a1 not created", m);
    assertNull(m.get("useDocValuesAsStored"));
    // useDocValuesAsStored=true
    m = TestBulkSchemaAPI.getObj(harness, "a2", "fields");
    assertNotNull("field a2 not created", m);
    assertEquals(Boolean.TRUE, m.get("useDocValuesAsStored"));
    // useDocValuesAsStored=false
    m = TestBulkSchemaAPI.getObj(harness, "a3", "fields");
    assertNotNull("field a3 not created", m);
    assertEquals(Boolean.FALSE, m.get("useDocValuesAsStored"));
    // Index documents to check the effect
    assertU(adoc("id", "myid1", "a1", "1", "a2", "2", "a3", "3"));
    assertU(commit());
    RestTestBase.assertJQ("/select?q=id:myid*&fl=*", "/response/docs==[{'id':'myid1', 'a1':'1', 'a2':'2'}]");
    RestTestBase.assertJQ("/select?q=id:myid*&fl=id,a1,a2,a3", "/response/docs==[{'id':'myid1', 'a1':'1', 'a2':'2', 'a3':'3'}]");
    RestTestBase.assertJQ("/select?q=id:myid*&fl=a3", "/response/docs==[{'a3':'3'}]");
    // this will return a3 because it is explicitly requested even if '*' is specified
    RestTestBase.assertJQ("/select?q=id:myid*&fl=*,a3", "/response/docs==[{'id':'myid1', 'a1':'1', 'a2':'2', 'a3':'3'}]");
    // this will not return a3 because the glob 'a*' will match only stored + useDocValuesAsStored=true fields
    RestTestBase.assertJQ("/select?q=id:myid*&fl=id,a*", "/response/docs==[{'id':'myid1', 'a1':'1', 'a2':'2'}]");
    // Test replace-field
    // Explicitly set useDocValuesAsStored to false
    payload = "{\n" + "          'replace-field' : {\n" + "                       'name':'a1',\n" + "                       'type': 'string',\n" + "                       'stored':false,\n" + "                       'useDocValuesAsStored':false,\n" + "                       'docValues':true,\n" + "                       'indexed':false\n" + "                       }}";
    response = harness.post("/schema?wt=json", json(payload));
    m = TestBulkSchemaAPI.getObj(harness, "a1", "fields");
    assertNotNull("field a1 doesn't exist any more", m);
    assertEquals(Boolean.FALSE, m.get("useDocValuesAsStored"));
    // Explicitly set useDocValuesAsStored to true
    payload = "{\n" + "          'replace-field' : {\n" + "                       'name':'a1',\n" + "                       'type': 'string',\n" + "                       'stored':false,\n" + "                       'useDocValuesAsStored':true,\n" + "                       'docValues':true,\n" + "                       'indexed':false\n" + "                       }}";
    response = harness.post("/schema?wt=json", json(payload));
    m = TestBulkSchemaAPI.getObj(harness, "a1", "fields");
    assertNotNull("field a1 doesn't exist any more", m);
    assertEquals(Boolean.TRUE, m.get("useDocValuesAsStored"));
    // add a field which is stored as well as docvalues
    payload = "{          'add-field' : {\n" + "                       'name':'a4',\n" + "                       'type': 'string',\n" + "                       'stored':true,\n" + "                       'useDocValuesAsStored':true,\n" + "                       'docValues':true,\n" + "                       'indexed':true\n" + "                       }}";
    response = harness.post("/schema?wt=json", json(payload));
    m = TestBulkSchemaAPI.getObj(harness, "a4", "fields");
    assertNotNull("field a4 not found", m);
    assertEquals(Boolean.TRUE, m.get("useDocValuesAsStored"));
    assertU(adoc("id", "myid1", "a1", "1", "a2", "2", "a3", "3", "a4", "4"));
    assertU(commit());
    RestTestBase.assertJQ("/select?q=id:myid*&fl=*", "/response/docs==[{'id':'myid1', 'a1':'1', 'a2':'2', 'a4':'4'}]");
}
Also used : RestTestHarness(org.apache.solr.util.RestTestHarness) StringReader(java.io.StringReader) JSONParser(org.noggit.JSONParser) Map(java.util.Map)

Example 8 with RestTestHarness

use of org.apache.solr.util.RestTestHarness in project lucene-solr by apache.

the class TestCryptoKeys method test.

@Test
public void test() throws Exception {
    System.setProperty("enable.runtime.lib", "true");
    setupHarnesses();
    String pk1sig = "G8LEW7uJ1is81Aqqfl3Sld3qDtOxPuVFeTLJHFJWecgDvUkmJNFXmf7nkHOVlXnDWahp1vqZf0W02VHXg37lBw==";
    String pk2sig = "pCyBQycB/0YvLVZfKLDIIqG1tFwM/awqzkp2QNpO7R3ThTqmmrj11wEJFDRLkY79efuFuQPHt40EE7jrOKoj9jLNELsfEqvU3jw9sZKiDONY+rV9Bj9QPeW8Pgt+F9Y1";
    String wrongKeySig = "xTk2hTipfpb+J5s4x3YZGOXkmHWtnJz05Vvd8RTm/Q1fbQVszR7vMk6dQ1URxX08fcg4HvxOo8g9bG2TSMOGjg==";
    String result = null;
    CryptoKeys cryptoKeys = null;
    SolrZkClient zk = getCommonCloudSolrClient().getZkStateReader().getZkClient();
    cryptoKeys = new CryptoKeys(CloudUtil.getTrustedKeys(zk, "exe"));
    ByteBuffer samplefile = ByteBuffer.wrap(readFile("cryptokeys/samplefile.bin"));
    //there are no keys yet created in ZK
    result = cryptoKeys.verify(pk1sig, samplefile);
    assertNull(result);
    zk.makePath("/keys/exe", true);
    zk.create("/keys/exe/pubk1.der", readFile("cryptokeys/pubk1.der"), CreateMode.PERSISTENT, true);
    zk.create("/keys/exe/pubk2.der", readFile("cryptokeys/pubk2.der"), CreateMode.PERSISTENT, true);
    Map<String, byte[]> trustedKeys = CloudUtil.getTrustedKeys(zk, "exe");
    cryptoKeys = new CryptoKeys(trustedKeys);
    result = cryptoKeys.verify(pk2sig, samplefile);
    assertEquals("pubk2.der", result);
    result = cryptoKeys.verify(pk1sig, samplefile);
    assertEquals("pubk1.der", result);
    try {
        result = cryptoKeys.verify(wrongKeySig, samplefile);
        assertNull(result);
    } catch (Exception e) {
    //pass
    }
    try {
        result = cryptoKeys.verify("SGVsbG8gV29ybGQhCg==", samplefile);
        assertNull(result);
    } catch (Exception e) {
    //pass
    }
    HttpSolrClient randomClient = (HttpSolrClient) clients.get(random().nextInt(clients.size()));
    String baseURL = randomClient.getBaseURL();
    baseURL = baseURL.substring(0, baseURL.lastIndexOf('/'));
    TestBlobHandler.createSystemCollection(getHttpSolrClient(baseURL, randomClient.getHttpClient()));
    waitForRecoveriesToFinish(".system", true);
    ByteBuffer jar = TestDynamicLoading.getFileContent("runtimecode/runtimelibs.jar.bin");
    String blobName = "signedjar";
    TestBlobHandler.postAndCheck(cloudClient, baseURL, blobName, jar, 1);
    String payload = "{\n" + "'create-requesthandler' : { 'name' : '/runtime', 'class': 'org.apache.solr.core.RuntimeLibReqHandler' , 'runtimeLib':true }" + "}";
    RestTestHarness client = restTestHarnesses.get(random().nextInt(restTestHarnesses.size()));
    TestSolrConfigHandler.runConfigCommand(client, "/config?wt=json", payload);
    TestSolrConfigHandler.testForResponseElement(client, null, "/config/overlay?wt=json", null, Arrays.asList("overlay", "requestHandler", "/runtime", "class"), "org.apache.solr.core.RuntimeLibReqHandler", 10);
    payload = "{\n" + "'add-runtimelib' : { 'name' : 'signedjar' ,'version':1}\n" + "}";
    client = restTestHarnesses.get(random().nextInt(restTestHarnesses.size()));
    TestSolrConfigHandler.runConfigCommand(client, "/config?wt=json", payload);
    TestSolrConfigHandler.testForResponseElement(client, null, "/config/overlay?wt=json", null, Arrays.asList("overlay", "runtimeLib", blobName, "version"), 1l, 10);
    Map map = TestSolrConfigHandler.getRespMap("/runtime?wt=json", client);
    String s = (String) Utils.getObjectByPath(map, false, Arrays.asList("error", "msg"));
    assertNotNull(TestBlobHandler.getAsString(map), s);
    assertTrue(TestBlobHandler.getAsString(map), s.contains("should be signed with one of the keys in ZK /keys/exe"));
    String wrongSig = "QKqHtd37QN02iMW9UEgvAO9g9qOOuG5vEBNkbUsN7noc2hhXKic/ABFIOYJA9PKw61mNX2EmNFXOcO3WClYdSw==";
    payload = "{\n" + "'update-runtimelib' : { 'name' : 'signedjar' ,'version':1, 'sig': 'QKqHtd37QN02iMW9UEgvAO9g9qOOuG5vEBNkbUsN7noc2hhXKic/ABFIOYJA9PKw61mNX2EmNFXOcO3WClYdSw=='}\n" + "}";
    client = restTestHarnesses.get(random().nextInt(restTestHarnesses.size()));
    TestSolrConfigHandler.runConfigCommand(client, "/config?wt=json", payload);
    TestSolrConfigHandler.testForResponseElement(client, null, "/config/overlay?wt=json", null, Arrays.asList("overlay", "runtimeLib", blobName, "sig"), wrongSig, 10);
    map = TestSolrConfigHandler.getRespMap("/runtime?wt=json", client);
    s = (String) Utils.getObjectByPath(map, false, Arrays.asList("error", "msg"));
    //No key matched signature for jar
    assertNotNull(TestBlobHandler.getAsString(map), s);
    assertTrue(TestBlobHandler.getAsString(map), s.contains("No key matched signature for jar"));
    String rightSig = "YkTQgOtvcM/H/5EQdABGl3wjjrPhonAGlouIx59vppBy2cZEofX3qX1yZu5sPNRmJisNXEuhHN2149dxeUmk2Q==";
    payload = "{\n" + "'update-runtimelib' : { 'name' : 'signedjar' ,'version':1, 'sig': 'YkTQgOtvcM/H/5EQdABGl3wjjrPhonAGlouIx59vppBy2cZEofX3qX1yZu5sPNRmJisNXEuhHN2149dxeUmk2Q=='}\n" + "}";
    client = restTestHarnesses.get(random().nextInt(restTestHarnesses.size()));
    TestSolrConfigHandler.runConfigCommand(client, "/config?wt=json", payload);
    TestSolrConfigHandler.testForResponseElement(client, null, "/config/overlay?wt=json", null, Arrays.asList("overlay", "runtimeLib", blobName, "sig"), rightSig, 10);
    map = TestSolrConfigHandler.testForResponseElement(client, null, "/runtime?wt=json", null, Arrays.asList("class"), "org.apache.solr.core.RuntimeLibReqHandler", 10);
    compareValues(map, MemClassLoader.class.getName(), asList("loader"));
    rightSig = "VJPMTxDf8Km3IBj2B5HWkIOqeM/o+HHNobOYCNA3WjrEVfOMZbMMqS1Lo7uLUUp//RZwOGkOhrUhuPNY1z2CGEIKX2/m8VGH64L14d52oSvFiwhoTDDuuyjW1TFGu35D";
    payload = "{\n" + "'update-runtimelib' : { 'name' : 'signedjar' ,'version':1, 'sig': 'VJPMTxDf8Km3IBj2B5HWkIOqeM/o+HHNobOYCNA3WjrEVfOMZbMMqS1Lo7uLUUp//RZwOGkOhrUhuPNY1z2CGEIKX2/m8VGH64L14d52oSvFiwhoTDDuuyjW1TFGu35D'}\n" + "}";
    client = restTestHarnesses.get(random().nextInt(restTestHarnesses.size()));
    TestSolrConfigHandler.runConfigCommand(client, "/config?wt=json", payload);
    TestSolrConfigHandler.testForResponseElement(client, null, "/config/overlay?wt=json", null, Arrays.asList("overlay", "runtimeLib", blobName, "sig"), rightSig, 10);
    map = TestSolrConfigHandler.testForResponseElement(client, null, "/runtime?wt=json", null, Arrays.asList("class"), "org.apache.solr.core.RuntimeLibReqHandler", 10);
    compareValues(map, MemClassLoader.class.getName(), asList("loader"));
}
Also used : HttpSolrClient(org.apache.solr.client.solrj.impl.HttpSolrClient) RestTestHarness(org.apache.solr.util.RestTestHarness) CryptoKeys(org.apache.solr.util.CryptoKeys) MemClassLoader(org.apache.solr.core.MemClassLoader) SolrZkClient(org.apache.solr.common.cloud.SolrZkClient) ByteBuffer(java.nio.ByteBuffer) Map(java.util.Map) IOException(java.io.IOException) Test(org.junit.Test)

Example 9 with RestTestHarness

use of org.apache.solr.util.RestTestHarness in project lucene-solr by apache.

the class TestCustomStream method testDynamicLoadingCustomStream.

@Test
public void testDynamicLoadingCustomStream() throws Exception {
    System.setProperty("enable.runtime.lib", "true");
    setupHarnesses();
    String blobName = "colltest";
    HttpSolrClient randomClient = (HttpSolrClient) clients.get(random().nextInt(clients.size()));
    String baseURL = randomClient.getBaseURL();
    baseURL = baseURL.substring(0, baseURL.lastIndexOf('/'));
    TestBlobHandler.createSystemCollection(getHttpSolrClient(baseURL, randomClient.getHttpClient()));
    waitForRecoveriesToFinish(".system", true);
    String payload = "{\n" + "'create-expressible' : { 'name' : 'hello', 'class': 'org.apache.solr.core.HelloStream' }\n" + "}";
    RestTestHarness client = restTestHarnesses.get(random().nextInt(restTestHarnesses.size()));
    TestSolrConfigHandler.runConfigCommand(client, "/config?wt=json", payload);
    TestSolrConfigHandler.testForResponseElement(client, null, "/config/overlay?wt=json", null, Arrays.asList("overlay", "expressible", "hello", "class"), "org.apache.solr.core.HelloStream", 10);
    TestSolrConfigHandler.testForResponseElement(client, null, "/stream?expr=hello()", null, Arrays.asList("result-set", "docs[0]", "msg"), "Hello World!", 10);
}
Also used : HttpSolrClient(org.apache.solr.client.solrj.impl.HttpSolrClient) RestTestHarness(org.apache.solr.util.RestTestHarness) Test(org.junit.Test)

Example 10 with RestTestHarness

use of org.apache.solr.util.RestTestHarness in project lucene-solr by apache.

the class TestDynamicLoading method testDynamicLoading.

@Test
public void testDynamicLoading() throws Exception {
    System.setProperty("enable.runtime.lib", "true");
    setupHarnesses();
    String blobName = "colltest";
    boolean success = false;
    HttpSolrClient randomClient = (HttpSolrClient) clients.get(random().nextInt(clients.size()));
    String baseURL = randomClient.getBaseURL();
    baseURL = baseURL.substring(0, baseURL.lastIndexOf('/'));
    String payload = "{\n" + "'add-runtimelib' : { 'name' : 'colltest' ,'version':1}\n" + "}";
    RestTestHarness client = restTestHarnesses.get(random().nextInt(restTestHarnesses.size()));
    TestSolrConfigHandler.runConfigCommand(client, "/config?wt=json", payload);
    TestSolrConfigHandler.testForResponseElement(client, null, "/config/overlay?wt=json", null, Arrays.asList("overlay", "runtimeLib", blobName, "version"), 1l, 10);
    payload = "{\n" + "'create-requesthandler' : { 'name' : '/test1', 'class': 'org.apache.solr.core.BlobStoreTestRequestHandler' ,registerPath: '/solr,/v2',  'runtimeLib' : true }\n" + "}";
    client = restTestHarnesses.get(random().nextInt(restTestHarnesses.size()));
    TestSolrConfigHandler.runConfigCommand(client, "/config?wt=json", payload);
    TestSolrConfigHandler.testForResponseElement(client, null, "/config/overlay?wt=json", null, Arrays.asList("overlay", "requestHandler", "/test1", "class"), "org.apache.solr.core.BlobStoreTestRequestHandler", 10);
    Map map = TestSolrConfigHandler.getRespMap("/test1?wt=json", client);
    assertNotNull(TestBlobHandler.getAsString(map), map = (Map) map.get("error"));
    assertTrue(TestBlobHandler.getAsString(map), map.get("msg").toString().contains(".system collection not available"));
    TestBlobHandler.createSystemCollection(getHttpSolrClient(baseURL, randomClient.getHttpClient()));
    waitForRecoveriesToFinish(".system", true);
    map = TestSolrConfigHandler.getRespMap("/test1?wt=json", client);
    assertNotNull(map = (Map) map.get("error"));
    assertTrue("full output " + TestBlobHandler.getAsString(map), map.get("msg").toString().contains("no such blob or version available: colltest/1"));
    payload = " {\n" + "  'set' : {'watched': {" + "                    'x':'X val',\n" + "                    'y': 'Y val'}\n" + "             }\n" + "  }";
    TestSolrConfigHandler.runConfigCommand(client, "/config/params?wt=json", payload);
    TestSolrConfigHandler.testForResponseElement(client, null, "/config/params?wt=json", cloudClient, Arrays.asList("response", "params", "watched", "x"), "X val", 10);
    for (int i = 0; i < 100; i++) {
        map = TestSolrConfigHandler.getRespMap("/test1?wt=json", client);
        if ("X val".equals(map.get("x"))) {
            success = true;
            break;
        }
        Thread.sleep(100);
    }
    ByteBuffer jar = null;
    //     jar = persistZip("/tmp/runtimelibs.jar.bin", TestDynamicLoading.class, RuntimeLibReqHandler.class, RuntimeLibResponseWriter.class, RuntimeLibSearchComponent.class);
    //    if(true) return;
    jar = getFileContent("runtimecode/runtimelibs.jar.bin");
    TestBlobHandler.postAndCheck(cloudClient, baseURL, blobName, jar, 1);
    payload = "{\n" + "'create-requesthandler' : { 'name' : '/runtime', 'class': 'org.apache.solr.core.RuntimeLibReqHandler' , 'runtimeLib':true }," + "'create-searchcomponent' : { 'name' : 'get', 'class': 'org.apache.solr.core.RuntimeLibSearchComponent' , 'runtimeLib':true }," + "'create-queryResponseWriter' : { 'name' : 'json1', 'class': 'org.apache.solr.core.RuntimeLibResponseWriter' , 'runtimeLib':true }" + "}";
    client = restTestHarnesses.get(random().nextInt(restTestHarnesses.size()));
    TestSolrConfigHandler.runConfigCommand(client, "/config?wt=json", payload);
    Map result = TestSolrConfigHandler.testForResponseElement(client, null, "/config/overlay?wt=json", null, Arrays.asList("overlay", "requestHandler", "/runtime", "class"), "org.apache.solr.core.RuntimeLibReqHandler", 10);
    compareValues(result, "org.apache.solr.core.RuntimeLibResponseWriter", asList("overlay", "queryResponseWriter", "json1", "class"));
    compareValues(result, "org.apache.solr.core.RuntimeLibSearchComponent", asList("overlay", "searchComponent", "get", "class"));
    result = TestSolrConfigHandler.testForResponseElement(client, null, "/runtime?wt=json", null, Arrays.asList("class"), "org.apache.solr.core.RuntimeLibReqHandler", 10);
    compareValues(result, MemClassLoader.class.getName(), asList("loader"));
    result = TestSolrConfigHandler.testForResponseElement(client, null, "/runtime?wt=json1", null, Arrays.asList("wt"), "org.apache.solr.core.RuntimeLibResponseWriter", 10);
    compareValues(result, MemClassLoader.class.getName(), asList("loader"));
    result = TestSolrConfigHandler.testForResponseElement(client, null, "/get?abc=xyz", null, Arrays.asList("get"), "org.apache.solr.core.RuntimeLibSearchComponent", 10);
    compareValues(result, MemClassLoader.class.getName(), asList("loader"));
    jar = getFileContent("runtimecode/runtimelibs_v2.jar.bin");
    TestBlobHandler.postAndCheck(cloudClient, baseURL, blobName, jar, 2);
    payload = "{\n" + "'update-runtimelib' : { 'name' : 'colltest' ,'version':2}\n" + "}";
    client = restTestHarnesses.get(random().nextInt(restTestHarnesses.size()));
    TestSolrConfigHandler.runConfigCommand(client, "/config?wt=json", payload);
    TestSolrConfigHandler.testForResponseElement(client, null, "/config/overlay?wt=json", null, Arrays.asList("overlay", "runtimeLib", blobName, "version"), 2l, 10);
    result = TestSolrConfigHandler.testForResponseElement(client, null, "/get?abc=xyz", null, Arrays.asList("Version"), "2", 10);
    payload = " {\n" + "  'set' : {'watched': {" + "                    'x':'X val',\n" + "                    'y': 'Y val'}\n" + "             }\n" + "  }";
    TestSolrConfigHandler.runConfigCommand(client, "/config/params?wt=json", payload);
    TestSolrConfigHandler.testForResponseElement(client, null, "/config/params?wt=json", cloudClient, Arrays.asList("response", "params", "watched", "x"), "X val", 10);
    result = TestSolrConfigHandler.testForResponseElement(client, null, "/test1?wt=json", cloudClient, Arrays.asList("x"), "X val", 10);
    payload = " {\n" + "  'set' : {'watched': {" + "                    'x':'X val changed',\n" + "                    'y': 'Y val'}\n" + "             }\n" + "  }";
    TestSolrConfigHandler.runConfigCommand(client, "/config/params?wt=json", payload);
    result = TestSolrConfigHandler.testForResponseElement(client, null, "/test1?wt=json", cloudClient, Arrays.asList("x"), "X val changed", 10);
}
Also used : HttpSolrClient(org.apache.solr.client.solrj.impl.HttpSolrClient) RestTestHarness(org.apache.solr.util.RestTestHarness) Map(java.util.Map) ByteBuffer(java.nio.ByteBuffer) Test(org.junit.Test)

Aggregations

RestTestHarness (org.apache.solr.util.RestTestHarness)40 Map (java.util.Map)19 HttpSolrClient (org.apache.solr.client.solrj.impl.HttpSolrClient)15 StringReader (java.io.StringReader)12 JSONParser (org.noggit.JSONParser)12 SolrClient (org.apache.solr.client.solrj.SolrClient)11 ArrayList (java.util.ArrayList)9 HashSet (java.util.HashSet)6 List (java.util.List)6 TestBlobHandler.getAsString (org.apache.solr.handler.TestBlobHandler.getAsString)6 Test (org.junit.Test)6 CloudSolrClient (org.apache.solr.client.solrj.impl.CloudSolrClient)5 Replica (org.apache.solr.common.cloud.Replica)4 Slice (org.apache.solr.common.cloud.Slice)4 HashMap (java.util.HashMap)3 SortedMap (java.util.SortedMap)3 TreeMap (java.util.TreeMap)3 DocCollection (org.apache.solr.common.cloud.DocCollection)3 ValidatingJsonMap (org.apache.solr.common.util.ValidatingJsonMap)3 ByteBuffer (java.nio.ByteBuffer)2