Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Javascript Prototype Engine - basic operation

The Infinit.e plugin manager Plugin Manager comprises a built-in processing module, the "Javascript Prototype Engine". This module runs javascript entered into the "user arguments" text field.

...

Info

Note that the combine function is normally present for performance and can be discarded without loss of functionality. If the reduce function is ignored then the output of the map is written directly to the output collection (/HDFS directory) - if multiple objects with the same key are emitted from the same map function, only one is preserved. Removing either of the combine/reduce functions must be accompanied by commenting out the corresponding Combiner/Reducer class in the plugin manager GUI.

Javascript Prototype Engine - advanced

Accessing the Hadoop context object

...

Note that many java functions can be called from within javascript to extend the limited built-in functionality. Examples are provided below. The following relevant JARs are available:

...

Due to the slightly non-standard date storage in MongoDB, together with the limitiations of the built-in Date function in Rhino (the javascript engine built into Java), Infinit.eCommunity Edition/MongoDB formatted dates must be parsed in a slightly convoluted way:

...

Due to the slightly non-standard date storage in MongoDB, together with the limitiations of the built-in Date function in Rhino (the javascript engine built into Java), javascript dates must be prepared for being written into Infinit.eCommunity Edition/MongoDB  in a slightly convoluted way:

...