Package org.neo4j.batchimport.utils

Examples of org.neo4j.batchimport.utils.Chunker.nextWord()


        final BufferedReader reader = new BufferedReader(new StringReader(file));
        final String[] header = reader.readLine().split("\t");
        final Chunker chunker = new Chunker(reader, '\t');
        readLine(header, chunker, "FOO", "42");
        readLine(header, chunker, "", "42");
        assertEquals(Chunker.EOF,chunker.nextWord());
    }

    private void readLine(String[] header, Chunker st, Object...values) throws IOException {
        long from = Long.parseLong(st.nextWord());
        assertEquals(1,from);
View Full Code Here


        final Chunker chunker = new Chunker(reader, '\t');

        int res = 0;
        long time = System.currentTimeMillis();
        String token;
        while ( (token = chunker.nextWord()) != Chunker.EOF)  {
            if (token!=Chunker.NO_VALUE && token != Chunker.EOL) res++;
        }
        time = System.currentTimeMillis() - time;
        System.out.println("time = " + time + " ms.");
        Assert.assertEquals((PerformanceTestFile.ROWS) * PerformanceTestFile.COLS, res);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.