Examples of nextInput()


Examples of com.mapr.storm.DirectoryScanner.nextInput()

        // add some files
        Files.append("4\n5\n6\n", new File(tempDir, "x-2"), Charsets.UTF_8);
        Files.append("1\n2\n3\n", new File(tempDir, "x-1"), Charsets.UTF_8);

        // verify we read both files in order
        List<String> lines1 = CharStreams.readLines(new InputStreamReader(scanner.nextInput()));
        assertEquals(3, lines1.size());
        assertEquals("[1, 2, 3]", lines1.toString());

        List<String> lines2 = CharStreams.readLines(new InputStreamReader(scanner.nextInput()));
        assertEquals(3, lines2.size());
View Full Code Here

Examples of com.mapr.storm.DirectoryScanner.nextInput()

        // verify we read both files in order
        List<String> lines1 = CharStreams.readLines(new InputStreamReader(scanner.nextInput()));
        assertEquals(3, lines1.size());
        assertEquals("[1, 2, 3]", lines1.toString());

        List<String> lines2 = CharStreams.readLines(new InputStreamReader(scanner.nextInput()));
        assertEquals(3, lines2.size());
        assertEquals("[4, 5, 6]", lines2.toString());

        // verify that we get empty records for a bit
        FileInputStream in = scanner.nextInput();
View Full Code Here

Examples of com.mapr.storm.DirectoryScanner.nextInput()

        List<String> lines2 = CharStreams.readLines(new InputStreamReader(scanner.nextInput()));
        assertEquals(3, lines2.size());
        assertEquals("[4, 5, 6]", lines2.toString());

        // verify that we get empty records for a bit
        FileInputStream in = scanner.nextInput();
        Assert.assertNull(in);

        in = scanner.nextInput();
        Assert.assertNull(in);
View Full Code Here

Examples of com.mapr.storm.DirectoryScanner.nextInput()

        // verify that we get empty records for a bit
        FileInputStream in = scanner.nextInput();
        Assert.assertNull(in);

        in = scanner.nextInput();
        Assert.assertNull(in);

        // add another file
        Files.append("7\n8\n", new File(tempDir, "x-3"), Charsets.UTF_8);
View Full Code Here

Examples of com.mapr.storm.DirectoryScanner.nextInput()

        Assert.assertNull(in);

        // add another file
        Files.append("7\n8\n", new File(tempDir, "x-3"), Charsets.UTF_8);

        List<String> lines3 = CharStreams.readLines(new InputStreamReader(scanner.nextInput()));
        assertEquals(2, lines3.size());
        assertEquals("[7, 8]", lines3.toString());

        // delete an old file without a problem
        new File(tempDir, "x-1").delete();
View Full Code Here

Examples of com.mapr.storm.DirectoryScanner.nextInput()

        assertEquals("[7, 8]", lines3.toString());

        // delete an old file without a problem
        new File(tempDir, "x-1").delete();

        in = scanner.nextInput();
        Assert.assertNull(in);

        // add a file that doesn't match the pattern without impact
        Files.append("9\n10\n", new File(tempDir, "y-1"), Charsets.UTF_8);
View Full Code Here

Examples of com.mapr.storm.DirectoryScanner.nextInput()

        Assert.assertNull(in);

        // add a file that doesn't match the pattern without impact
        Files.append("9\n10\n", new File(tempDir, "y-1"), Charsets.UTF_8);

        in = scanner.nextInput();
        Assert.assertNull(in);

        // out of order collation
        Files.append("9\n10\n", new File(tempDir, "x-10"), Charsets.UTF_8);
View Full Code Here

Examples of com.mapr.storm.DirectoryScanner.nextInput()

        Assert.assertNull(in);

        // out of order collation
        Files.append("9\n10\n", new File(tempDir, "x-10"), Charsets.UTF_8);

        List<String> lines4 = CharStreams.readLines(new InputStreamReader(scanner.nextInput()));
        assertEquals(2, lines4.size());
        assertEquals("[9, 10]", lines4.toString());
    }
}
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.