Search in sources :

Example 1 with OIntegerSerializer

use of com.orientechnologies.common.serialization.types.OIntegerSerializer in project orientdb by orientechnologies.

the class AutoShardingTest method beforeMethod.

@BeforeMethod
public void beforeMethod() throws Exception {
    super.beforeMethod();
    hashFunction.setValueSerializer(new OIntegerSerializer());
    if (database.getMetadata().getSchema().existsClass("AutoShardingTest"))
        database.getMetadata().getSchema().dropClass("AutoShardingTest");
    cls = database.getMetadata().getSchema().createClass("AutoShardingTest");
    cls.createProperty("id", OType.INTEGER);
    idx = cls.createIndex("testAutoSharding", OClass.INDEX_TYPE.NOTUNIQUE.toString(), (OProgressListener) null, (ODocument) null, "AUTOSHARDING", new String[] { "id" });
    clusterIds = cls.getClusterIds();
}
Also used : OIntegerSerializer(com.orientechnologies.common.serialization.types.OIntegerSerializer) OProgressListener(com.orientechnologies.common.listener.OProgressListener) ODocument(com.orientechnologies.orient.core.record.impl.ODocument) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

OProgressListener (com.orientechnologies.common.listener.OProgressListener)1 OIntegerSerializer (com.orientechnologies.common.serialization.types.OIntegerSerializer)1 ODocument (com.orientechnologies.orient.core.record.impl.ODocument)1 BeforeMethod (org.testng.annotations.BeforeMethod)1