Search in sources :

Example 1 with StorDevicesConfig

use of com.yahoo.vespa.config.storage.StorDevicesConfig in project vespa by vespa-engine.

the class StorageNodeTest method verifyDiskPathConfigIsNotSetForNonHosted.

@Test
public void verifyDiskPathConfigIsNotSetForNonHosted() {
    StorDevicesConfig config = getConfig(false);
    assertEquals(0, config.disk_path().size());
}
Also used : StorDevicesConfig(com.yahoo.vespa.config.storage.StorDevicesConfig) Test(org.junit.Test)

Example 2 with StorDevicesConfig

use of com.yahoo.vespa.config.storage.StorDevicesConfig in project vespa by vespa-engine.

the class StorageClusterTest method testRootFolder.

@Test
public void testRootFolder() throws Exception {
    String xml = "<cluster id=\"storage\">\n" + "  <documents/>" + "  <group>\n" + "    <node distribution-key=\"0\" hostalias=\"mockhost\"/>\n" + "  </group>\n" + "</cluster>";
    ContentCluster cluster = ContentClusterUtils.createCluster(xml, new MockRoot());
    StorageNode node = cluster.getStorageNodes().getChildren().get("0");
    {
        StorDevicesConfig.Builder builder = new StorDevicesConfig.Builder();
        node.getConfig(builder);
        StorDevicesConfig config = new StorDevicesConfig(builder);
        assertEquals(getDefaults().underVespaHome("var/db/vespa/vds/storage/storage/0"), config.root_folder());
    }
    {
        StorServerConfig.Builder builder = new StorServerConfig.Builder();
        cluster.getStorageNodes().getConfig(builder);
        node.getConfig(builder);
        StorServerConfig config = new StorServerConfig(builder);
        assertEquals(getDefaults().underVespaHome("var/db/vespa/vds/storage/storage/0"), config.root_folder());
    }
    {
        StorServerConfig.Builder builder = new StorServerConfig.Builder();
        cluster.getDistributorNodes().getConfig(builder);
        cluster.getDistributorNodes().getChildren().get("0").getConfig(builder);
        StorServerConfig config = new StorServerConfig(builder);
        assertEquals(getDefaults().underVespaHome("var/db/vespa/vds/storage/distributor/0"), config.root_folder());
    }
}
Also used : MockRoot(com.yahoo.config.model.test.MockRoot) StorDevicesConfig(com.yahoo.vespa.config.storage.StorDevicesConfig) StorServerConfig(com.yahoo.vespa.config.content.core.StorServerConfig) ContentCluster(com.yahoo.vespa.model.content.cluster.ContentCluster) Test(org.junit.Test)

Example 3 with StorDevicesConfig

use of com.yahoo.vespa.config.storage.StorDevicesConfig in project vespa by vespa-engine.

the class StorageNodeTest method verifyDiskPathConfigIsSetForVds.

@Test
public void verifyDiskPathConfigIsSetForVds() {
    StorDevicesConfig config = getConfig(true);
    assertEquals(1, config.disk_path().size());
    assertEquals(Defaults.getDefaults().underVespaHome("var/db/vespa/vds/zoo/storage/0/disks/d0"), config.disk_path(0));
}
Also used : StorDevicesConfig(com.yahoo.vespa.config.storage.StorDevicesConfig) Test(org.junit.Test)

Aggregations

StorDevicesConfig (com.yahoo.vespa.config.storage.StorDevicesConfig)3 Test (org.junit.Test)3 MockRoot (com.yahoo.config.model.test.MockRoot)1 StorServerConfig (com.yahoo.vespa.config.content.core.StorServerConfig)1 ContentCluster (com.yahoo.vespa.model.content.cluster.ContentCluster)1