use of org.apache.rya.accumulo.MiniAccumuloClusterInstance in project incubator-rya by apache.
the class AccumuloRyaDetailsRepositoryIT method isInitialized_true.
@Test
public void isInitialized_true() throws AccumuloException, AccumuloSecurityException, AlreadyInitializedException, RyaDetailsRepositoryException {
final String instanceName = getRyaInstanceName();
// Create the metadata object the repository will be initialized with.
final RyaDetails details = RyaDetails.builder().setRyaInstanceName(instanceName).setRyaVersion("1.2.3.4").setEntityCentricIndexDetails(new EntityCentricIndexDetails(true)).setTemporalIndexDetails(new TemporalIndexDetails(true)).setFreeTextDetails(new FreeTextIndexDetails(true)).setPCJIndexDetails(PCJIndexDetails.builder().setEnabled(true).setFluoDetails(new FluoDetails("test_instance_rya_pcj_updater")).addPCJDetails(PCJDetails.builder().setId("pcj 1").setUpdateStrategy(PCJUpdateStrategy.BATCH).setLastUpdateTime(new Date())).addPCJDetails(PCJDetails.builder().setId("pcj 2"))).setProspectorDetails(new ProspectorDetails(Optional.of(new Date()))).setJoinSelectivityDetails(new JoinSelectivityDetails(Optional.of(new Date()))).build();
// Setup the repository that will be tested using a mini instance of Accumulo.
final MiniAccumuloClusterInstance clusterInstance = getClusterInstance();
final Connector connector = clusterInstance.getConnector();
final RyaDetailsRepository repo = new AccumuloRyaInstanceDetailsRepository(connector, instanceName);
// Initialize the repository
repo.initialize(details);
// Ensure the repository reports that it has been initialized.
assertTrue(repo.isInitialized());
}
Aggregations