t1m avatar t1m committed 1b38502

added 'combiner_function' to InfernoRule - this allows the rule to specify disco's combiner

Comments (0)

Files changed (3)

inferno/lib/job.py

                   map_init=self.rule.map_init_function,
                   save=self.rule.save or self.rule.result_tag is not None,
                   scheduler=self.rule.scheduler,
+                  combiner=self.rule.combiner_function,
                   reduce_output_stream=self.rule.reduce_output_stream,
                   sort=self.rule.sort,
                   profile=self.settings.get('profile'),

inferno/lib/reduce.py

 def keyset_reduce(iter_, params_):
 
     import ujson
-
     import disco.util
 
     class KeysetReduce(object):

inferno/lib/rule.py

                  map_output_stream=(
                      map_output_stream, disco_output_stream),
 
+                 #combine
+                 combiner_function=None,
+
                  # reduce
                  reduce_function=keyset_reduce,
                  reduce_output_stream=(
         self.map_function = map_function
         self.map_input_stream = map_input_stream
         self.map_output_stream = map_output_stream
+        self.combiner_function = combiner_function
 
         # reduce
         self.reduce_function = reduce_function
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.