<commit_before>.. _pydoop_script_guide:

Pydoop Script User Guide
========================

Command Line Tool
-----------------

In the simplest case, Pydoop Script is invoked as::

  pydoop script MODULE INPUT OUTPUT

where ``MODULE`` is the file (on your local file system) containing
your map and reduce functions, in Python, while ``INPUT`` and
``OUTPUT`` are, respectively, the HDFS paths of your input data and
your job's output directory.

Options are shown in the following table.

+--------+--------------------+-----------------------------------------------+
| Short  | Long               | Meaning                                       |
+========+====================+===============================================+
| ``-m`` | ``--map-fn``       | Name of map function within module (default:  |
|        |                    | mapper)                                       |
+--------+--------------------+-----------------------------------------------+
| ``-r`` | ``--reduce-fn``    | Name of reduce function within module         |<commit_msg>Insert brief explantion of pydoop script on its usage page<commit_after>.. _pydoop_script_guide:

Pydoop Script User Guide
========================

Pydoop Script is the easiest way to write simple MapReduce programs
for Hadoop.  With Pydoop Script, you only need to write a map and/or a reduce
functions and the system will take care of the rest.

For a full explanation please see the :ref:`tutorial <pydoop_script_tutorial>`.


Command Line Tool
-----------------

In the simplest case, Pydoop Script is invoked as::

  pydoop script MODULE INPUT OUTPUT

where ``MODULE`` is the file (on your local file system) containing
your map and reduce functions, in Python, while ``INPUT`` and
``OUTPUT`` are, respectively, the HDFS paths of your input data and
your job's output directory.

Options are shown in the following table.

+--------+--------------------+-----------------------------------------------+
| Short  | Long               | Meaning                                       |
+========+====================+===============================================+
| ``-m`` | ``--map-fn``       | Name of map function within module (default:  |
|        |                    | mapper)                                       |
+--------+--------------------+-----------------------------------------------+
| ``-r`` | ``--reduce-fn``    | Name of reduce function within module         |
{'fraction_non_alphanumeric': 0.2911392405063291, 'fraction_numerical': 0.0, 'mean_word_length': 1.6543878656554714, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3911561', 'n_tokens_mistral': 566, 'n_tokens_neox': 532, 'n_words': 228}