<commit_before>package org.apache.s4.tools;

import java.io.File;

import org.I0Itec.zkclient.IDefaultNameSpace;
import org.I0Itec.zkclient.ZkClient;
import org.I0Itec.zkclient.ZkServer;
import org.apache.commons.io.FileUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.beust.jcommander.Parameter;
import com.beust.jcommander.Parameters;

public class ZKServer {

    static Logger logger = LoggerFactory.getLogger(ZKServer.class);

    public static void main(String[] args) {
        ZKServerArgs zkArgs = new ZKServerArgs();
        Tools.parseArgs(zkArgs, args);
        try {

            logger.info("Starting zookeeper server on port [{}]", zkArgs.zkPort);

            if (zkArgs.clean) {
                logger.info("cleaning existing data in [{}] and [{}]", zkArgs.dataDir, zkArgs.logDir);
                FileUtils.deleteDirectory(new File(zkArgs.dataDir));
                FileUtils.deleteDirectory(new File(zkArgs.logDir));
            }
            IDefaultNameSpace defaultNameSpace = new IDefaultNameSpace() {

                @Override
                public void createDefaultNameSpace(ZkClient zkClient) {

                }
            };

            ZkServer zkServer = new ZkServer(zkArgs.dataDir, zkArgs.logDir, defaultNameSpace);
            zkServer.start();
        } catch (Exception e) {
            logger.error("Cannot initialize zookeeper with specified configuration", e);
        }
    }

    @Parameters(commandNames = "s4 zkServer", separators = "=", commandDescription = "Start Zookeeper server")
    static class ZKServerArgs extends S4ArgsBase {

        @Parameter(names = "-port", description = "Zookeeper port")
        String zkPort = "2181";<commit_msg>fixed port parameter<commit_after>package org.apache.s4.tools;

import java.io.File;

import org.I0Itec.zkclient.IDefaultNameSpace;
import org.I0Itec.zkclient.ZkClient;
import org.I0Itec.zkclient.ZkServer;
import org.apache.commons.io.FileUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.beust.jcommander.Parameter;
import com.beust.jcommander.Parameters;

public class ZKServer {

    static Logger logger = LoggerFactory.getLogger(ZKServer.class);

    public static void main(String[] args) {
        ZKServerArgs zkArgs = new ZKServerArgs();
        Tools.parseArgs(zkArgs, args);
        try {

            logger.info("Starting zookeeper server on port [{}]", zkArgs.zkPort);

            if (zkArgs.clean) {
                logger.info("cleaning existing data in [{}] and [{}]", zkArgs.dataDir, zkArgs.logDir);
                FileUtils.deleteDirectory(new File(zkArgs.dataDir));
                FileUtils.deleteDirectory(new File(zkArgs.logDir));
            }
            IDefaultNameSpace defaultNameSpace = new IDefaultNameSpace() {

                @Override
                public void createDefaultNameSpace(ZkClient zkClient) {

                }
            };

            ZkServer zkServer = new ZkServer(zkArgs.dataDir, zkArgs.logDir, defaultNameSpace, zkArgs.zkPort);
            zkServer.start();
        } catch (Exception e) {
            logger.error("Cannot initialize zookeeper with specified configuration", e);
        }
    }

    @Parameters(commandNames = "s4 zkServer", separators = "=", commandDescription = "Start Zookeeper server")
    static class ZKServerArgs extends S4ArgsBase {

        @Parameter(names = "-port", description = "Zookeeper port")
        int zkPort = 2181;
{'fraction_non_alphanumeric': 0.1033785734911926, 'fraction_numerical': 0.006930407161420733, 'mean_word_length': 2.752979414951246, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2770227', 'n_tokens_mistral': 1060, 'n_tokens_neox': 1012, 'n_words': 212}