Search in sources :

Example 1 with DataSequence

use of org.apache.phoenix.pherf.configuration.DataSequence in project phoenix by apache.

the class RuleGeneratorTest method testSequentialDataSequence.

@Test
public void testSequentialDataSequence() throws Exception {
    XMLConfigParser parser = new XMLConfigParser(matcherScenario);
    DataModel model = parser.getDataModels().get(0);
    WriteWorkload loader = new WriteWorkload(parser);
    RulesApplier rulesApplier = loader.getRulesApplier();
    Column targetColumn = null;
    for (Column column : model.getDataMappingColumns()) {
        DataSequence sequence = column.getDataSequence();
        if (sequence == DataSequence.SEQUENTIAL) {
            targetColumn = column;
            break;
        }
    }
    assertNotNull("Could not find a DataSequence.SEQENTIAL rule.", targetColumn);
    assertMultiThreadedIncrementValue(targetColumn, rulesApplier);
}
Also used : RulesApplier(org.apache.phoenix.pherf.rules.RulesApplier) Column(org.apache.phoenix.pherf.configuration.Column) DataModel(org.apache.phoenix.pherf.configuration.DataModel) WriteWorkload(org.apache.phoenix.pherf.workload.WriteWorkload) XMLConfigParser(org.apache.phoenix.pherf.configuration.XMLConfigParser) DataSequence(org.apache.phoenix.pherf.configuration.DataSequence) Test(org.junit.Test)

Aggregations

Column (org.apache.phoenix.pherf.configuration.Column)1 DataModel (org.apache.phoenix.pherf.configuration.DataModel)1 DataSequence (org.apache.phoenix.pherf.configuration.DataSequence)1 XMLConfigParser (org.apache.phoenix.pherf.configuration.XMLConfigParser)1 RulesApplier (org.apache.phoenix.pherf.rules.RulesApplier)1 WriteWorkload (org.apache.phoenix.pherf.workload.WriteWorkload)1 Test (org.junit.Test)1