Search in sources :

Example 1 with StandardScanner

use of com.thinkaurelius.titan.diskstorage.keycolumnvalue.scan.StandardScanner in project titan by thinkaurelius.

the class KeyColumnValueStoreTest method scanTestWithSimpleJob.

@Test
public void scanTestWithSimpleJob() throws Exception {
    int keys = 1000, columns = 40;
    String[][] values = KeyValueStoreUtil.generateData(keys, columns);
    //Make it only half the number of columns for every 2nd key
    for (int i = 0; i < values.length; i++) {
        if (i % 2 == 0)
            values[i] = Arrays.copyOf(values[i], columns / 2);
    }
    log.debug("Loading values: " + keys + "x" + columns);
    loadValues(values);
    clopen();
    StandardScanner scanner = new StandardScanner(manager);
    SimpleScanJobRunner runner = (ScanJob job, Configuration jobConf, String rootNSName) -> runSimpleJob(scanner, job, jobConf);
    SimpleScanJob.runBasicTests(keys, columns, runner);
}
Also used : StandardScanner(com.thinkaurelius.titan.diskstorage.keycolumnvalue.scan.StandardScanner) Configuration(com.thinkaurelius.titan.diskstorage.configuration.Configuration) GraphDatabaseConfiguration(com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration) ScanJob(com.thinkaurelius.titan.diskstorage.keycolumnvalue.scan.ScanJob)

Aggregations

Configuration (com.thinkaurelius.titan.diskstorage.configuration.Configuration)1 ScanJob (com.thinkaurelius.titan.diskstorage.keycolumnvalue.scan.ScanJob)1 StandardScanner (com.thinkaurelius.titan.diskstorage.keycolumnvalue.scan.StandardScanner)1 GraphDatabaseConfiguration (com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration)1