<commit_before>(ns forma.hadoop.cluster
  (:import [forma FloatsSerialization IntsSerialization]
           [cascading.tuple.hadoop BytesSerialization TupleSerialization]
           [org.apache.hadoop.io.serializer WritableSerialization JavaSerialization]))

;; Nothing here, yet!
;;
;; Returns a sequence of the classnames of all serializers used in
;; Forma.

(def serializers
  (let [class-seq (for [cls [FloatsSerialization IntsSerialization
                             BytesSerialization TupleSerialization
                             WritableSerialization JavaSerialization]]
                    (.getName cls))]
    (apply str (interpose "," class-seq))))

(def forma-config
  {:core-site {:io.serializations serializers}})<commit_msg>added notes to cluster.clj.<commit_after>;; Very much a work in progress...
;;
;; TODO: Get pallet cluster configuration stuff into here, so we can
;; use job specific cluster definitions.

(ns forma.hadoop.cluster
  (:import [forma FloatsSerialization IntsSerialization]
           [cascading.tuple.hadoop BytesSerialization TupleSerialization]
           [org.apache.hadoop.io.serializer WritableSerialization JavaSerialization]))

;; Returns a sequence of the classnames of all serializers used in
;; Forma.
;;
;; TODO: make sure these are in the proper order.

(def serializers
  (let [class-seq (for [cls [FloatsSerialization IntsSerialization
                             BytesSerialization TupleSerialization
                             WritableSerialization JavaSerialization]]
                    (.getName cls))]
    (apply str (interpose "," class-seq))))

(def forma-config
  {:core-site {:io.serializations serializers}})
{'fraction_non_alphanumeric': 0.0905300774270399, 'fraction_numerical': 0.0, 'mean_word_length': 3.1176470588235294, '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': '3808975', 'n_tokens_mistral': 418, 'n_tokens_neox': 433, 'n_words': 131}