Search in sources :

Example 1 with NullIndex

use of org.locationtech.geowave.core.store.index.NullIndex in project geowave by locationtech.

the class DataStoreAddTest method addIndex_SameIndexVarArgs.

@Test
public void addIndex_SameIndexVarArgs() {
    final NullIndex index1 = new NullIndex("index1");
    final NullIndex index2 = new NullIndex("index2");
    final MockAbstractDataAdapter adapter = new MockAbstractDataAdapter(MOCK_DATA_TYPE_1);
    dataStore.addType(adapter, index1);
    dataStore.addIndex(MOCK_DATA_TYPE_1, index2, index2, index2);
    assertEquals(2, dataStore.getIndices(MOCK_DATA_TYPE_1).length);
}
Also used : MockAbstractDataAdapter(org.locationtech.geowave.core.store.adapter.MockComponents.MockAbstractDataAdapter) NullIndex(org.locationtech.geowave.core.store.index.NullIndex) Test(org.junit.Test)

Example 2 with NullIndex

use of org.locationtech.geowave.core.store.index.NullIndex in project geowave by locationtech.

the class DataStoreAddTest method addIndex_IndexAlreadyAdded.

@Test
public void addIndex_IndexAlreadyAdded() {
    final NullIndex index1 = new NullIndex("index1");
    final MockAbstractDataAdapter adapter = new MockAbstractDataAdapter(MOCK_DATA_TYPE_1);
    dataStore.addType(adapter, index1);
    dataStore.addIndex(MOCK_DATA_TYPE_1, index1);
    assertEquals(1, dataStore.getIndices(MOCK_DATA_TYPE_1).length);
}
Also used : MockAbstractDataAdapter(org.locationtech.geowave.core.store.adapter.MockComponents.MockAbstractDataAdapter) NullIndex(org.locationtech.geowave.core.store.index.NullIndex) Test(org.junit.Test)

Example 3 with NullIndex

use of org.locationtech.geowave.core.store.index.NullIndex in project geowave by locationtech.

the class DataStoreAddTest method createWriter_SeenTypeWriteNoError.

@Test
public void createWriter_SeenTypeWriteNoError() {
    final NullIndex index = new NullIndex("myIndex");
    final MockAbstractDataAdapter adapter = new MockAbstractDataAdapter(MOCK_DATA_TYPE_1);
    dataStore.addType(adapter, index);
    final Writer<Integer> writer = dataStore.createWriter(MOCK_DATA_TYPE_1);
    writer.write(15);
    writer.write(0);
    writer.close();
}
Also used : MockAbstractDataAdapter(org.locationtech.geowave.core.store.adapter.MockComponents.MockAbstractDataAdapter) NullIndex(org.locationtech.geowave.core.store.index.NullIndex) Test(org.junit.Test)

Example 4 with NullIndex

use of org.locationtech.geowave.core.store.index.NullIndex in project geowave by locationtech.

the class DataStoreAddTest method createWriter_NonNullForSeenType.

@Test
public void createWriter_NonNullForSeenType() {
    final NullIndex index = new NullIndex("myIndex");
    final MockAbstractDataAdapter adapter = new MockAbstractDataAdapter(MOCK_DATA_TYPE_1);
    dataStore.addType(adapter, index);
    final Writer<Integer> writer = dataStore.createWriter(MOCK_DATA_TYPE_1);
    assertNotNull(writer);
}
Also used : MockAbstractDataAdapter(org.locationtech.geowave.core.store.adapter.MockComponents.MockAbstractDataAdapter) NullIndex(org.locationtech.geowave.core.store.index.NullIndex) Test(org.junit.Test)

Example 5 with NullIndex

use of org.locationtech.geowave.core.store.index.NullIndex in project geowave by locationtech.

the class DataStoreAddTest method addType_Basic.

@Test
public void addType_Basic() {
    final NullIndex index = new NullIndex("myIndex");
    final MockAbstractDataAdapter adapter = new MockAbstractDataAdapter(MOCK_DATA_TYPE_1);
    dataStore.addType(adapter, index);
    final DataTypeAdapter<?>[] registeredTypes = dataStore.getTypes();
    assertEquals(1, registeredTypes.length);
    assertTrue(registeredTypes[0] instanceof MockAbstractDataAdapter);
}
Also used : MockAbstractDataAdapter(org.locationtech.geowave.core.store.adapter.MockComponents.MockAbstractDataAdapter) NullIndex(org.locationtech.geowave.core.store.index.NullIndex) Test(org.junit.Test)

Aggregations

NullIndex (org.locationtech.geowave.core.store.index.NullIndex)12 Test (org.junit.Test)11 MockAbstractDataAdapter (org.locationtech.geowave.core.store.adapter.MockComponents.MockAbstractDataAdapter)11 IOException (java.io.IOException)1 AccumuloException (org.apache.accumulo.core.client.AccumuloException)1 AccumuloSecurityException (org.apache.accumulo.core.client.AccumuloSecurityException)1 Connector (org.apache.accumulo.core.client.Connector)1 Index (org.locationtech.geowave.core.store.api.Index)1 IndexStore (org.locationtech.geowave.core.store.index.IndexStore)1 AccumuloRequiredOptions (org.locationtech.geowave.datastore.accumulo.config.AccumuloRequiredOptions)1 AccumuloOperations (org.locationtech.geowave.datastore.accumulo.operations.AccumuloOperations)1