Package com.mapr.franz.server

Examples of com.mapr.franz.server.ProtoLogger


    // TODO implement some sort of statistics that records (a) number of
    // clients, (b) transactions per topic, (c) bytes per topic

    public SimpleCatcherService(int port, String basePath) throws FileNotFoundException, SocketException {
        logger = new ProtoLogger(basePath);
        recorder = new History(1, 10, 60, 300)
                .logTicks()
                .addListener(new History.Listener() {
                    @Override
                    public void tick(double t, int interval, int uniqueTopics, int messages) {
View Full Code Here


        // this is evil because it prevents running more than one server per JVM
        CatcherImpl.serverId = us.getProto().getServerId();
        this.us = us;
        this.instance = instance;
        this.basePath = basePath;
        logger = new ProtoLogger(this.basePath);
    }
View Full Code Here

    @Test
    public void testFileRollover() throws IOException {
        Path homeDir = Files.createTempDirectory("logger");
        Path statusPath = Files.createTempFile("status", "dat");

        ProtoLogger p = new ProtoLogger(homeDir.toString());
        p.setMaxLogFile(500);

        for (int i = 0; i < 1000; i++) {
            p.write("topic-1", ByteString.copyFromUtf8(i + ""));
        }
        p.close();


        ProtoSpout ps = new ProtoSpout(new ProtoSpout.TupleParser() {
            @Override
            public List<Object> parse(ByteString buffer) {
View Full Code Here

TOP

Related Classes of com.mapr.franz.server.ProtoLogger

Copyright © 2018 www.massapicom. 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.