Search in sources :

Example 11 with GetInstanceDetails

use of org.apache.rya.api.client.GetInstanceDetails in project incubator-rya by apache.

the class MongoGetInstanceDetailsIT method getDetails_instanceDoesNotExist.

@Test(expected = InstanceDoesNotExistException.class)
public void getDetails_instanceDoesNotExist() throws MongoException, RyaClientException {
    final RyaClient ryaClient = MongoRyaClientFactory.build(getConnectionDetails(), getMongoClient());
    final GetInstanceDetails getInstanceDetails = ryaClient.getGetInstanceDetails();
    getInstanceDetails.getDetails("instance_name");
}
Also used : GetInstanceDetails(org.apache.rya.api.client.GetInstanceDetails) RyaClient(org.apache.rya.api.client.RyaClient) Test(org.junit.Test)

Example 12 with GetInstanceDetails

use of org.apache.rya.api.client.GetInstanceDetails in project incubator-rya by apache.

the class AccumuloGetInstanceDetailsIT method getDetails.

@Test
public void getDetails() throws AccumuloException, AccumuloSecurityException, DuplicateInstanceNameException, RyaClientException {
    // Install an instance of Rya.
    final String instanceName = getRyaInstanceName();
    final InstallConfiguration installConfig = InstallConfiguration.builder().setEnableTableHashPrefix(true).setEnableEntityCentricIndex(true).setEnableFreeTextIndex(true).setEnableTemporalIndex(true).setEnablePcjIndex(true).setEnableGeoIndex(true).build();
    final AccumuloConnectionDetails connectionDetails = new AccumuloConnectionDetails(getUsername(), getPassword().toCharArray(), getInstanceName(), getZookeepers());
    final Install install = new AccumuloInstall(connectionDetails, getConnector());
    install.install(instanceName, installConfig);
    // Verify the correct details were persisted.
    final GetInstanceDetails getInstanceDetails = new AccumuloGetInstanceDetails(connectionDetails, getConnector());
    final Optional<RyaDetails> details = getInstanceDetails.getDetails(instanceName);
    final RyaDetails expectedDetails = RyaDetails.builder().setRyaInstanceName(instanceName).setRyaVersion(details.get().getRyaVersion()).setTemporalIndexDetails(new TemporalIndexDetails(true)).setFreeTextDetails(new FreeTextIndexDetails(true)).setEntityCentricIndexDetails(new EntityCentricIndexDetails(true)).setPCJIndexDetails(PCJIndexDetails.builder().setEnabled(true)).setProspectorDetails(new ProspectorDetails(Optional.<Date>absent())).setJoinSelectivityDetails(new JoinSelectivityDetails(Optional.<Date>absent())).build();
    assertEquals(expectedDetails, details.get());
}
Also used : ProspectorDetails(org.apache.rya.api.instance.RyaDetails.ProspectorDetails) RyaDetails(org.apache.rya.api.instance.RyaDetails) InstallConfiguration(org.apache.rya.api.client.Install.InstallConfiguration) Date(java.util.Date) JoinSelectivityDetails(org.apache.rya.api.instance.RyaDetails.JoinSelectivityDetails) EntityCentricIndexDetails(org.apache.rya.api.instance.RyaDetails.EntityCentricIndexDetails) TemporalIndexDetails(org.apache.rya.api.instance.RyaDetails.TemporalIndexDetails) GetInstanceDetails(org.apache.rya.api.client.GetInstanceDetails) FreeTextIndexDetails(org.apache.rya.api.instance.RyaDetails.FreeTextIndexDetails) Install(org.apache.rya.api.client.Install) Test(org.junit.Test)

Aggregations

GetInstanceDetails (org.apache.rya.api.client.GetInstanceDetails)12 Test (org.junit.Test)10 RyaDetails (org.apache.rya.api.instance.RyaDetails)9 RyaClient (org.apache.rya.api.client.RyaClient)7 AccumuloConnectionDetails (org.apache.rya.api.client.accumulo.AccumuloConnectionDetails)4 SparqlPrompt (org.apache.rya.shell.util.SparqlPrompt)4 Date (java.util.Date)3 EntityCentricIndexDetails (org.apache.rya.api.instance.RyaDetails.EntityCentricIndexDetails)3 FreeTextIndexDetails (org.apache.rya.api.instance.RyaDetails.FreeTextIndexDetails)3 JoinSelectivityDetails (org.apache.rya.api.instance.RyaDetails.JoinSelectivityDetails)3 ProspectorDetails (org.apache.rya.api.instance.RyaDetails.ProspectorDetails)3 TemporalIndexDetails (org.apache.rya.api.instance.RyaDetails.TemporalIndexDetails)3 ConsolePrinter (org.apache.rya.shell.util.ConsolePrinter)3 Install (org.apache.rya.api.client.Install)2 InstallConfiguration (org.apache.rya.api.client.Install.InstallConfiguration)2 RyaClientException (org.apache.rya.api.client.RyaClientException)2 ShellState (org.apache.rya.shell.SharedShellState.ShellState)2 CliAvailabilityIndicator (org.springframework.shell.core.annotation.CliAvailabilityIndicator)2 TableOperations (org.apache.accumulo.core.client.admin.TableOperations)1 FluoDetails (org.apache.rya.api.instance.RyaDetails.PCJIndexDetails.FluoDetails)1