<commit_before>package water;

import water.api.CloudV3;
import water.api.H2OErrorV3;
import water.api.TutorialsV3;
import water.api.TypeaheadV3;
import water.nbhm.NonBlockingHashMap;
import water.util.Log;

import java.util.Arrays;

/** Internal H2O class used to build and maintain the cloud-wide type mapping.
 *  Only public to expose a few constants to subpackages.  No exposed user
 *  calls. */
public class TypeMap {
  static public final short NULL, PRIM_B, ICED, H2OCC, C1NCHUNK, FRAME, VECGROUP, KEY;
  static final String BOOTSTRAP_CLASSES[] = {
    " BAD",
    "[B",                               // 1 -
    water.Iced.class.getName(),         // 2 - Base serialization class
    water.H2O.H2OCountedCompleter.class.getName(),  // 3 - Base serialization class
    water.HeartBeat.class.getName(),    // Used to Paxos up a cloud & leader
    water.H2ONode.class.getName(),      // Needed to write H2ONode target/sources
    water.FetchClazz.class.getName(),   // used to fetch IDs from leader
    water.FetchId.class.getName(),      // used to fetch IDs from leader
    water.DTask.class.getName(),        // Needed for those first Tasks
    water.DException.class.getName(),   // Needed for those first Tasks: can pass exceptions

    water.fvec.Chunk.class.getName(),   // parent of Chunk
    water.fvec.C1NChunk.class.getName(),// used as constant in parser
    water.fvec.Frame.class.getName(),   // used in TypeaheadKeys & Exec2
    water.fvec.Vec.VectorGroup.class.getName(), // Used in TestUtil

    // Status pages looked at without locking the cloud
    CloudV3.class.getName(),
    CloudV3.NodeV1.class.getName(),
    water.H2OError.class.getName(),
    H2OErrorV3.class.getName(),
    water.util.IcedHashMap.class.getName(),
    water.util.IcedHashMap.IcedHashMapStringString.class.getName(),
    water.util.IcedHashMap.IcedHashMapStringObject.class.getName(),
    hex.schemas.ModelBuilderSchema.IcedHashMapStringModelBuilderSchema.class.getName(),
    water.api.Schema.class.getName(),
    water.api.Schema.Meta.class.getName(),
    TutorialsV3.class.getName(),
    TypeaheadV3.class.getName(),    // Allow typeahead without locking
    water.Key.class.getName(),

    water.api.AboutHandler.AboutV3.class.getName(),
    water.api.AboutHandler.AboutEntryV3.class.getName(),
    water.api.NodePersistentStorageV1.class.getName(),
    water.api.NodePersistentStorageV1.NodePersistentStorageEntryV1.class.getName(),
    water.api.DocsV1.class.getName(),
    water.api.DocsBase.class.getName(),
    water.api.RouteV1.class.getName(),
    water.api.RouteBase.class.getName(),
  };
  // Class name -> ID mapping
  static private final NonBlockingHashMap<String, Integer> MAP = new NonBlockingHashMap<>();
  // ID -> Class name mapping
  static String[] CLAZZES;
  // ID -> pre-allocated Golden Instance of IcedImpl
  static private Icer[] GOLD;
  // Unique IDs
  static private int IDS;
  // JUnit helper flag
  static public volatile boolean _check_no_locking; // ONLY TOUCH IN AAA_PreCloudLock!
  static {
    CLAZZES = BOOTSTRAP_CLASSES;<commit_msg>PUBDEV-471: move all schemas and endpoints to v3<commit_after>package water;

import water.api.CloudV3;
import water.api.H2OErrorV3;
import water.api.TutorialsV3;
import water.api.TypeaheadV3;
import water.nbhm.NonBlockingHashMap;
import water.util.Log;

import java.util.Arrays;

/** Internal H2O class used to build and maintain the cloud-wide type mapping.
 *  Only public to expose a few constants to subpackages.  No exposed user
 *  calls. */
public class TypeMap {
  static public final short NULL, PRIM_B, ICED, H2OCC, C1NCHUNK, FRAME, VECGROUP, KEY;
  static final String BOOTSTRAP_CLASSES[] = {
    " BAD",
    "[B",                               // 1 -
    water.Iced.class.getName(),         // 2 - Base serialization class
    water.H2O.H2OCountedCompleter.class.getName(),  // 3 - Base serialization class
    water.HeartBeat.class.getName(),    // Used to Paxos up a cloud & leader
    water.H2ONode.class.getName(),      // Needed to write H2ONode target/sources
    water.FetchClazz.class.getName(),   // used to fetch IDs from leader
    water.FetchId.class.getName(),      // used to fetch IDs from leader
    water.DTask.class.getName(),        // Needed for those first Tasks
    water.DException.class.getName(),   // Needed for those first Tasks: can pass exceptions

    water.fvec.Chunk.class.getName(),   // parent of Chunk
    water.fvec.C1NChunk.class.getName(),// used as constant in parser
    water.fvec.Frame.class.getName(),   // used in TypeaheadKeys & Exec2
    water.fvec.Vec.VectorGroup.class.getName(), // Used in TestUtil

    // Status pages looked at without locking the cloud
    CloudV3.class.getName(),
    CloudV3.NodeV1.class.getName(),
    water.H2OError.class.getName(),
    H2OErrorV3.class.getName(),
    water.util.IcedHashMap.class.getName(),
    water.util.IcedHashMap.IcedHashMapStringString.class.getName(),
    water.util.IcedHashMap.IcedHashMapStringObject.class.getName(),
    hex.schemas.ModelBuilderSchema.IcedHashMapStringModelBuilderSchema.class.getName(),
    water.api.Schema.class.getName(),
    water.api.Schema.Meta.class.getName(),
    TutorialsV3.class.getName(),
    TypeaheadV3.class.getName(),    // Allow typeahead without locking
    water.Key.class.getName(),

    water.api.AboutHandler.AboutV3.class.getName(),
    water.api.AboutHandler.AboutEntryV3.class.getName(),
    water.api.NodePersistentStorageV3.class.getName(),
    water.api.NodePersistentStorageV3.NodePersistentStorageEntryV3.class.getName(),
    water.api.DocsV3.class.getName(),
    water.api.DocsBase.class.getName(),
    water.api.RouteV3.class.getName(),
    water.api.RouteBase.class.getName(),
  };
  // Class name -> ID mapping
  static private final NonBlockingHashMap<String, Integer> MAP = new NonBlockingHashMap<>();
  // ID -> Class name mapping
  static String[] CLAZZES;
  // ID -> pre-allocated Golden Instance of IcedImpl
  static private Icer[] GOLD;
  // Unique IDs
  static private int IDS;
  // JUnit helper flag
  static public volatile boolean _check_no_locking; // ONLY TOUCH IN AAA_PreCloudLock!
  static {
    CLAZZES = BOOTSTRAP_CLASSES;
{'fraction_non_alphanumeric': 0.11562753036437247, 'fraction_numerical': 0.011012145748987854, 'mean_word_length': 3.346235045742435, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4879919', 'n_tokens_mistral': 1968, 'n_tokens_neox': 1925, 'n_words': 442}