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