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");
}
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());
}
Aggregations