Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1564 f2212025d -> ee0d601e7


can't really get my head around the best way to do partition attachment.... 
keep playing with different models... each have their problems. Minor commit 
with Partitioner.getPartition(Element) to Partition.find(Element).


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/ee0d601e
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/ee0d601e
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/ee0d601e

Branch: refs/heads/TINKERPOP-1564
Commit: ee0d601e731811a827a408ae91ab27651fca9118
Parents: f221202
Author: Marko A. Rodriguez <okramma...@gmail.com>
Authored: Fri Jan 13 09:58:34 2017 -0700
Committer: Marko A. Rodriguez <okramma...@gmail.com>
Committed: Fri Jan 13 09:58:34 2017 -0700

----------------------------------------------------------------------
 akka-gremlin/conf/akka-tinkerpop-modern.properties             | 6 +++---
 .../gremlin/akka/process/actors/io/gryo/GryoSerializer.java    | 2 +-
 .../process/actors/traversal/TraversalMasterProgram.java       | 4 ++--
 .../process/actors/traversal/TraversalWorkerProgram.java       | 2 +-
 .../org/apache/tinkerpop/gremlin/structure/Partitioner.java    | 4 ++--
 .../gremlin/structure/util/partitioner/GlobalPartitioner.java  | 2 +-
 .../gremlin/structure/util/partitioner/HashPartitioner.java    | 2 +-
 7 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ee0d601e/akka-gremlin/conf/akka-tinkerpop-modern.properties
----------------------------------------------------------------------
diff --git a/akka-gremlin/conf/akka-tinkerpop-modern.properties 
b/akka-gremlin/conf/akka-tinkerpop-modern.properties
index c56408f..47caf49 100644
--- a/akka-gremlin/conf/akka-tinkerpop-modern.properties
+++ b/akka-gremlin/conf/akka-tinkerpop-modern.properties
@@ -26,8 +26,8 @@ 
akka.actor.serializers.gryo=org.apache.tinkerpop.gremlin.akka.process.actors.io.
 akka.actor.serialize-messages=on
 akka.actor.provider=remote
 akka.remote.enabled-transports=akka.remote.netty.tcp
-akka.remote.netty.tcp.hostname="127.0.0.1"
+akka.remote.netty.tcp.hostname=127.0.0.1
 akka.remote.netty.tcp.port=2552
-akka.cluster.seed-nodes="akka.tcp://tinkerpop@127.0.0.1:2552"
+akka.cluster.seed-nodes=akka.tcp://tinkerpop@127.0.0.1:2552
 akka.cluster.auto-down-unreachable-after=10s
-akka.log-dead-letters-during-shutdown="false"
\ No newline at end of file
+akka.log-dead-letters-during-shutdown=false
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ee0d601e/akka-gremlin/src/main/java/org/apache/tinkerpop/gremlin/akka/process/actors/io/gryo/GryoSerializer.java
----------------------------------------------------------------------
diff --git 
a/akka-gremlin/src/main/java/org/apache/tinkerpop/gremlin/akka/process/actors/io/gryo/GryoSerializer.java
 
b/akka-gremlin/src/main/java/org/apache/tinkerpop/gremlin/akka/process/actors/io/gryo/GryoSerializer.java
index 5183e6f..db93128 100644
--- 
a/akka-gremlin/src/main/java/org/apache/tinkerpop/gremlin/akka/process/actors/io/gryo/GryoSerializer.java
+++ 
b/akka-gremlin/src/main/java/org/apache/tinkerpop/gremlin/akka/process/actors/io/gryo/GryoSerializer.java
@@ -103,7 +103,7 @@ public final class GryoSerializer implements Serializer {
                 forEach(clazz -> bindings.put(ClassUtil.getClassName(clazz), 
"gryo"));
         return bindings;
     }
-    
+
     @Override
     public int identifier() {
         return GryoVersion.V3_0.hashCode();

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ee0d601e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/traversal/TraversalMasterProgram.java
----------------------------------------------------------------------
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/traversal/TraversalMasterProgram.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/traversal/TraversalMasterProgram.java
index c011822..c8e3781 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/traversal/TraversalMasterProgram.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/traversal/TraversalMasterProgram.java
@@ -165,7 +165,7 @@ final class TraversalMasterProgram implements 
ActorProgram.Master<Object> {
         if (traverser.isHalted())
             this.results.add(traverser);
         else if (traverser.get() instanceof Element)
-            
this.master.send(this.partitionToWorkerMap.get(this.master.partitioner().getPartition((Element)
 traverser.get())), this.detachTraverser(traverser));
+            
this.master.send(this.partitionToWorkerMap.get(this.master.partitioner().find((Element)
 traverser.get())), this.detachTraverser(traverser));
         else
             this.master.send(this.master.address(), 
this.detachTraverser(traverser));
     }
@@ -185,6 +185,6 @@ final class TraversalMasterProgram implements 
ActorProgram.Master<Object> {
 
     private void attachTraverser(final Traverser.Admin traverser) {
         if (TraversalActorProgram.DETACH && traverser.get() instanceof Element)
-            traverser.attach(this.master.partitioner().getPartition((Element) 
traverser.get()));
+            traverser.attach(this.master.partitioner().find((Element) 
traverser.get()));
     }
 }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ee0d601e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/traversal/TraversalWorkerProgram.java
----------------------------------------------------------------------
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/traversal/TraversalWorkerProgram.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/traversal/TraversalWorkerProgram.java
index abda752..8f66f99 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/traversal/TraversalWorkerProgram.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/actors/traversal/TraversalWorkerProgram.java
@@ -171,7 +171,7 @@ final class TraversalWorkerProgram implements 
ActorProgram.Worker<Object> {
         if (traverser.isHalted())
             this.self.send(this.self.master(), traverser);
         else if (traverser.get() instanceof Element && 
!this.self.partition().contains((Element) traverser.get()))
-            
this.self.send(this.partitionToWorkerMap.get(this.self.partitioner().getPartition((Element)
 traverser.get())), traverser);
+            
this.self.send(this.partitionToWorkerMap.get(this.self.partitioner().find((Element)
 traverser.get())), traverser);
         else
             this.self.send(this.self.address(), traverser);
     }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ee0d601e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Partitioner.java
----------------------------------------------------------------------
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Partitioner.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Partitioner.java
index afd283c..1cebc06 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Partitioner.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Partitioner.java
@@ -28,9 +28,9 @@ public interface Partitioner {
 
     public Graph getGraph();
 
-    public List<Partition> getPartitions();
+    public Partition find(final Element element);
 
-    public Partition getPartition(final Element element);
+    public List<Partition> getPartitions();
 
     public default Partition getPartition(final String id) {
         for (final Partition partition : this.getPartitions()) {

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ee0d601e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/partitioner/GlobalPartitioner.java
----------------------------------------------------------------------
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/partitioner/GlobalPartitioner.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/partitioner/GlobalPartitioner.java
index 73962d3..f7462fd 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/partitioner/GlobalPartitioner.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/partitioner/GlobalPartitioner.java
@@ -58,7 +58,7 @@ public final class GlobalPartitioner implements Partitioner {
     }
 
     @Override
-    public Partition getPartition(final Element element) {
+    public Partition find(final Element element) {
         return this.partition;
     }
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ee0d601e/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/partitioner/HashPartitioner.java
----------------------------------------------------------------------
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/partitioner/HashPartitioner.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/partitioner/HashPartitioner.java
index 3b1459d..53ff716 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/partitioner/HashPartitioner.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/partitioner/HashPartitioner.java
@@ -66,7 +66,7 @@ public final class HashPartitioner implements Partitioner {
     }
 
     @Override
-    public Partition getPartition(final Element element) {
+    public Partition find(final Element element) {
         for (final Partition partition : this.partitions) {
             if (partition.contains(element))
                 return partition;

Reply via email to