<commit_before>/*
 * Copyright (C) 2014 Stratio (http://stratio.com)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.stratio.cassandra.lucene.testsAT.util;

import com.datastax.driver.core.ConsistencyLevel;

/**
 * Testing global variables.
 *
 * @author <NAME> {@literal <<EMAIL>>}
 */
class CassandraConfig {

    static final String HOST = getString("host", "127.0.0.1");
    static final String JMX_PORT = getString("jmx_port", "7100");
    static final String[] JMX_SERVICES = getStringArray("jmx_services", HOST + ":" + JMX_PORT);
    static final int REPLICATION = getInt("replication", 1);
    static final ConsistencyLevel CONSISTENCY = ConsistencyLevel.valueOf(getString("consistency", "QUORUM"));
    static final int FETCH = getInt("fetch", 100);
    static final int THREADS = getInt("threads", 0);
    static final int REFRESH = getInt("refresh", 1);
    static final String TABLE = getString("table", "test_table");
    static final String INDEX = getString("index", "test_table_idx");
    static final String COLUMN = getString("column", null);
    static final boolean USE_NEW_QUERY_SYNTAX = getBool("use_new_query_syntax", true);
    static final int LIMIT = getInt("limit", 10000);

    static {
        assert COLUMN != null || USE_NEW_QUERY_SYNTAX;
    }

    private static String getString(String key, String def) {
        return System.getProperty("it." + key, def);
    }

    private static String[] getStringArray(String key, String def) {
        return getString(key, def).split(",");
    }

    private static int getInt(String key, Integer def) {
        return Integer.parseInt(getString(key, def.toString()));
    }

    private static Boolean getBool(String key, Boolean def) {
        return Boolean.parseBoolean(getString(key, def.toString()));
    }
}
<commit_msg>Restore default tests JMX port.<commit_after>/*
 * Copyright (C) 2014 Stratio (http://stratio.com)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.stratio.cassandra.lucene.testsAT.util;

import com.datastax.driver.core.ConsistencyLevel;

/**
 * Testing global variables.
 *
 * @author <NAME> {@literal <<EMAIL>>}
 */
class CassandraConfig {

    static final String HOST = getString("host", "127.0.0.1");
    static final String JMX_PORT = getString("jmx_port", "7199");
    static final String[] JMX_SERVICES = getStringArray("jmx_services", HOST + ":" + JMX_PORT);
    static final int REPLICATION = getInt("replication", 1);
    static final ConsistencyLevel CONSISTENCY = ConsistencyLevel.valueOf(getString("consistency", "QUORUM"));
    static final int FETCH = getInt("fetch", 100);
    static final int THREADS = getInt("threads", 0);
    static final int REFRESH = getInt("refresh", 1);
    static final String TABLE = getString("table", "test_table");
    static final String INDEX = getString("index", "test_table_idx");
    static final String COLUMN = getString("column", null);
    static final boolean USE_NEW_QUERY_SYNTAX = getBool("use_new_query_syntax", true);
    static final int LIMIT = getInt("limit", 10000);

    static {
        assert COLUMN != null || USE_NEW_QUERY_SYNTAX;
    }

    private static String getString(String key, String def) {
        return System.getProperty("it." + key, def);
    }

    private static String[] getStringArray(String key, String def) {
        return getString(key, def).split(",");
    }

    private static int getInt(String key, Integer def) {
        return Integer.parseInt(getString(key, def.toString()));
    }

    private static Boolean getBool(String key, Boolean def) {
        return Boolean.parseBoolean(getString(key, def.toString()));
    }
}

{'fraction_non_alphanumeric': 0.11384023921401111, 'fraction_numerical': 0.012387868432293891, 'mean_word_length': 3.867983367983368, 'pattern_counts': {'":': 2, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 2, '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': '21267', 'n_tokens_mistral': 1389, 'n_tokens_neox': 1330, 'n_words': 448}