Search in sources :

Example 1 with InputEntityVisitor

use of org.neo4j.internal.batchimport.input.InputEntityVisitor in project neo4j by neo4j.

the class EagerParserChunker method nextChunk.

@Override
public boolean nextChunk(Chunk chunk) throws IOException {
    InputEntityArray entities = new InputEntityArray(chunkSize);
    InputEntityVisitor decorated = decorator.apply(entities);
    int cursor = 0;
    for (; cursor < chunkSize && parser.next(decorated); cursor++) {
    // just loop through and parse
    }
    if (cursor > 0) {
        ((EagerCsvInputChunk) chunk).initialize(entities.toArray());
        return true;
    }
    return false;
}
Also used : InputEntityVisitor(org.neo4j.internal.batchimport.input.InputEntityVisitor)

Aggregations

InputEntityVisitor (org.neo4j.internal.batchimport.input.InputEntityVisitor)1