[ https://issues.apache.org/jira/browse/TINKERPOP-1166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15172607#comment-15172607 ]
ASF GitHub Bot commented on TINKERPOP-1166: ------------------------------------------- Github user okram commented on the pull request: https://github.com/apache/incubator-tinkerpop/pull/243#issuecomment-190388717 ``` [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] Apache TinkerPop .................................. SUCCESS [3.658s] [INFO] Apache TinkerPop :: Gremlin Shaded ................ SUCCESS [2.210s] [INFO] Apache TinkerPop :: Gremlin Core .................. SUCCESS [35.088s] [INFO] Apache TinkerPop :: Gremlin Test .................. SUCCESS [10.526s] [INFO] Apache TinkerPop :: Gremlin Groovy ................ SUCCESS [38.056s] [INFO] Apache TinkerPop :: Gremlin Groovy Test ........... SUCCESS [5.694s] [INFO] Apache TinkerPop :: TinkerGraph Gremlin ........... SUCCESS [3:08.700s] [INFO] Apache TinkerPop :: Hadoop Gremlin ................ SUCCESS [4:58.574s] [INFO] Apache TinkerPop :: Spark Gremlin ................. SUCCESS [6:52.110s] [INFO] Apache TinkerPop :: Giraph Gremlin ................ SUCCESS [2:18:15.161s] [INFO] Apache TinkerPop :: Neo4j Gremlin ................. SUCCESS [18:09.462s] [INFO] Apache TinkerPop :: Gremlin Driver ................ SUCCESS [8.172s] [INFO] Apache TinkerPop :: Gremlin Server ................ SUCCESS [11:11.713s] [INFO] Apache TinkerPop :: Gremlin Console ............... SUCCESS [1:08.896s] [INFO] Apache TinkerPop :: Gremlin Archetype ............. SUCCESS [0.083s] [INFO] Apache TinkerPop :: Archetype - TinkerGraph ....... SUCCESS [5.695s] [INFO] Apache TinkerPop :: Archetype - Server ............ SUCCESS [10.165s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3:05:44.437s [INFO] Finished at: Mon Feb 29 14:01:04 MST 2016 [INFO] Final Memory: 97M/810M [INFO] ------------------------------------------------------------------------ ``` VOTE +1. > Add Memory.reduce() as option to Memory implementations. > -------------------------------------------------------- > > Key: TINKERPOP-1166 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1166 > Project: TinkerPop > Issue Type: Improvement > Components: hadoop, process, tinkergraph > Affects Versions: 3.1.2-incubating > Reporter: Marko A. Rodriguez > Labels: breaking > > Currently {{Memory}} supports {{incr}}, {{and}}, {{or}}, ... These are great > and what people will typically use. However, we should also provide the > generalization which is simply {{Memory.reduce}}. In this situation, > {{incr}}, {{or}}, {{and}}, etc. are just specifications of {{Memory.reduce}}. > How would it work? > When memory is initialized in a {{VertexProgram}}, it would be like this: > {code} > memory.set("myReduction", new MyReducingFunction(0)) > {code} > Then {{ReducingFunction}} would look like this: > {code} > public class ReducingFunction implements UnaryOperator<A> { > public A getInitialValue(); > public A apply(A first, A second); > } > {code} > Easy peasy. Note that both Spark and Giraph support such types of > function-based reduction in their respective "memory engines." > TinkerGraphComputer will, of course, be easy to add this functionality too. > Why do this? For two reasons: > 1. We get extra flexibility in {{Memory}}. > 2. https://issues.apache.org/jira/browse/TINKERPOP-1164 -- This message was sent by Atlassian JIRA (v6.3.4#6332)