<commit_before>package roart.config;

import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;

import javax.xml.parsers.ParserConfigurationException;
import javax.xml.xpath.XPathExpressionException;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.xml.sax.SAXException;

import roart.common.constants.Constants;
import roart.common.config.ConfigConstants;
import roart.common.config.MyConfig;
import roart.common.config.NodeConfig;
import roart.common.constants.FileSystemConstants.FileSystemType;
import roart.controller.SimpleController;
import roart.common.util.JarThread;
import roart.common.util.XmlFs;

public class MyXMLConfig {

    protected static Logger log = LoggerFactory.getLogger(MyConfig.class);

    protected static MyXMLConfig instance = null;

    public static MyXMLConfig instance(NodeConfig config) {
        if (instance == null) {
            configInstance = config;
            instance = new MyXMLConfig();
        }
        return instance;
    }

    protected static NodeConfig configInstance = null;

    public MyXMLConfig() {
        try {
            config();
        } catch (Exception e) {
            log.error(Constants.EXCEPTION, e); 
        }
    }

    public NodeConfig mynode() {
        return null;
    }

    public void config() throws XPathExpressionException, ParserConfigurationException, SAXException, IOException {
        String version = "-0.10-SNAPSHOT.jar";
        Map<String, String> map = new HashMap<>();
        map.put(ConfigConstants.DATABASEHBASE, "aether-hbase" + version);
        map.put(ConfigConstants.DATABASECASSANDRA, "aether-cassandra" + version);
        map.put(ConfigConstants.DATABASEDYNAMODB, "aether-dynamodb" + version);
        map.put(ConfigConstants.DATABASEHIBERNATE, "aether-hibernate" + version);
        map.put(ConfigConstants.DATABASEDATANUCLEUS, "aether-datanucleus" + version);
        map.put(ConfigConstants.MACHINELEARNINGMAHOUT, "aether-mahout-mr" + version);
        map.put(ConfigConstants.MACHINELEARNINGMAHOUTSPARK, "aether-mahout-spark" + version);
        map.put(ConfigConstants.MACHINELEARNINGSPARKML, "aether-spark-ml" + version);
        map.put(ConfigConstants.MACHINELEARNINGOPENNLP, "aether-opennlp" + version);
        map.put(ConfigConstants.SEARCHENGINESOLR, "aether-solr" + version);
        map.put(ConfigConstants.SEARCHENGINELUCENE, "aether-lucene" + version);
        map.put(ConfigConstants.SEARCHENGINEELASTIC, "aether-elastic" + version);
        //map.put(ConfigConstants.FILESYSTEMHDFS, "aether-hdfs" + version);
        //map.put(ConfigConstants.FILESYSTEMSWIFT, "aether-swift" + version);

        Map<String, FileSystemType> fsmap = new HashMap<>();
        //fsmap.put(ConfigConstants.FILESYSTEMLOCAL, FileSystemType.HDFS);
        fsmap.put(ConfigConstants.FILESYSTEMHDFS, FileSystemType.HDFS);
        fsmap.put(ConfigConstants.FILESYSTEMSWIFT, FileSystemType.SWIFT);

        for (Entry<String, String> entry : map.entrySet()) {
            String key = entry.getKey();
            Boolean bool = (Boolean) configInstance.getValueOrDefault(key);
            if (bool) {
                String jar = entry.getValue();
                log.info("Starting {}", jar);
                switch (entry.getKey()) {
                // make this oo again
                case ConfigConstants.FILESYSTEMHDFS:
                case ConfigConstants.FILESYSTEMSWIFT:
                    Set<FileSystemType> fileSystems = new HashSet<>();
                    fileSystems.add(fsmap.get(entry.getKey()));
                    String dirlist = (String) configInstance.getValueOrDefault(ConfigConstants.FSDIRLIST);
                    SimpleController.startFsServiceWithDirList(dirlist, fileSystems);
                    break;
                default:
                    Runnable def = new JarThread(jar, null);
                    new Thread(def).start();
                }
            }
        }

    }
}<commit_msg>Temp fix for Hbase upgrade (I11).<commit_after>package roart.config;

import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;

import javax.xml.parsers.ParserConfigurationException;
import javax.xml.xpath.XPathExpressionException;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.xml.sax.SAXException;

import roart.common.constants.Constants;
import roart.common.config.ConfigConstants;
import roart.common.config.MyConfig;
import roart.common.config.NodeConfig;
import roart.common.constants.FileSystemConstants.FileSystemType;
import roart.controller.SimpleController;
import roart.common.util.JarThread;
import roart.common.util.XmlFs;

public class MyXMLConfig {

    protected static Logger log = LoggerFactory.getLogger(MyConfig.class);

    protected static MyXMLConfig instance = null;

    public static MyXMLConfig instance(NodeConfig config) {
        if (instance == null) {
            configInstance = config;
            instance = new MyXMLConfig();
        }
        return instance;
    }

    protected static NodeConfig configInstance = null;

    public MyXMLConfig() {
        try {
            config();
        } catch (Exception e) {
            log.error(Constants.EXCEPTION, e); 
        }
    }

    public NodeConfig mynode() {
        return null;
    }

    public void config() throws XPathExpressionException, ParserConfigurationException, SAXException, IOException {
        String version = "-0.10-SNAPSHOT.jar";
        Map<String, String> map = new HashMap<>();
        map.put(ConfigConstants.DATABASEHBASE, "aether-hbase" + version);
        map.put(ConfigConstants.DATABASECASSANDRA, "aether-cassandra" + version);
        map.put(ConfigConstants.DATABASEDYNAMODB, "aether-dynamodb" + version);
        map.put(ConfigConstants.DATABASEHIBERNATE, "aether-hibernate" + version);
        map.put(ConfigConstants.DATABASEDATANUCLEUS, "aether-datanucleus" + version);
        map.put(ConfigConstants.MACHINELEARNINGMAHOUT, "aether-mahout-mr" + version);
        map.put(ConfigConstants.MACHINELEARNINGMAHOUTSPARK, "aether-mahout-spark" + version);
        map.put(ConfigConstants.MACHINELEARNINGSPARKML, "aether-spark-ml" + version);
        map.put(ConfigConstants.MACHINELEARNINGOPENNLP, "aether-opennlp" + version);
        map.put(ConfigConstants.SEARCHENGINESOLR, "aether-solr" + version);
        map.put(ConfigConstants.SEARCHENGINELUCENE, "aether-lucene" + version);
        map.put(ConfigConstants.SEARCHENGINEELASTIC, "aether-elastic" + version);
        //map.put(ConfigConstants.FILESYSTEMHDFS, "aether-hdfs" + version);
        //map.put(ConfigConstants.FILESYSTEMSWIFT, "aether-swift" + version);

        Map<String, FileSystemType> fsmap = new HashMap<>();
        //fsmap.put(ConfigConstants.FILESYSTEMLOCAL, FileSystemType.HDFS);
        fsmap.put(ConfigConstants.FILESYSTEMHDFS, FileSystemType.HDFS);
        fsmap.put(ConfigConstants.FILESYSTEMSWIFT, FileSystemType.SWIFT);

        for (Entry<String, String> entry : map.entrySet()) {
            String key = entry.getKey();
            Boolean bool = (Boolean) configInstance.getValueOrDefault(key);
            if (bool) {
                String jar = entry.getValue();
                log.info("Starting {}", jar);
                switch (entry.getKey()) {
                // make this oo again
                case ConfigConstants.FILESYSTEMHDFS:
                case ConfigConstants.FILESYSTEMSWIFT:
                    Set<FileSystemType> fileSystems = new HashSet<>();
                    fileSystems.add(fsmap.get(entry.getKey()));
                    String dirlist = (String) configInstance.getValueOrDefault(ConfigConstants.FSDIRLIST);
                    SimpleController.startFsServiceWithDirList(dirlist, fileSystems);
                    break;
                case ConfigConstants.DATABASEHBASE:
                    Runnable def2 = new JarThread(jar, new String[] { "--add-opens", "java.base/java.nio=ALL-UNNAMED" });
                    new Thread(def2).start();
                    break;
                default:
                    Runnable def = new JarThread(jar, null);
                    new Thread(def).start();
                }
            }
        }

    }
}
{'fraction_non_alphanumeric': 0.10680876258140912, 'fraction_numerical': 0.0016577856719952634, 'mean_word_length': 2.797661870503597, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '7487443', 'n_tokens_mistral': 2518, 'n_tokens_neox': 2448, 'n_words': 436}