incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [1/6] git commit: Adding in sessions in thrift, this will help with the seperation of query and fetch between the shards and controllers.
Date Wed, 15 May 2013 18:13:32 GMT
Updated Branches:
  refs/heads/0.1.5 e3699254b -> 6a9fde037


Adding in sessions in thrift, this will help with the seperation of query and fetch between
the shards and controllers.


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

Branch: refs/heads/0.1.5
Commit: bd6aaae820dc7ca3c991ee217d40747f2f8e74f7
Parents: e369925
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Tue May 14 15:57:07 2013 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Tue May 14 15:57:07 2013 -0400

----------------------------------------------------------------------
 .../org/apache/blur/server/ShardServerContext.java |    7 +++
 .../blur/server/ShardServerEventHandler.java       |   35 +++++++++++++++
 2 files changed, 42 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/bd6aaae8/src/blur-core/src/main/java/org/apache/blur/server/ShardServerContext.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/server/ShardServerContext.java b/src/blur-core/src/main/java/org/apache/blur/server/ShardServerContext.java
new file mode 100644
index 0000000..3d27cae
--- /dev/null
+++ b/src/blur-core/src/main/java/org/apache/blur/server/ShardServerContext.java
@@ -0,0 +1,7 @@
+package org.apache.blur.server;
+
+import org.apache.thrift.server.ServerContext;
+
+public class ShardServerContext implements ServerContext {
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/bd6aaae8/src/blur-core/src/main/java/org/apache/blur/server/ShardServerEventHandler.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/server/ShardServerEventHandler.java
b/src/blur-core/src/main/java/org/apache/blur/server/ShardServerEventHandler.java
new file mode 100644
index 0000000..e20129e
--- /dev/null
+++ b/src/blur-core/src/main/java/org/apache/blur/server/ShardServerEventHandler.java
@@ -0,0 +1,35 @@
+package org.apache.blur.server;
+
+import org.apache.blur.log.Log;
+import org.apache.blur.log.LogFactory;
+import org.apache.thrift.protocol.TProtocol;
+import org.apache.thrift.server.ServerContext;
+import org.apache.thrift.server.TServerEventHandler;
+import org.apache.thrift.transport.TTransport;
+
+public class ShardServerEventHandler implements TServerEventHandler {
+  
+  private static final Log LOG = LogFactory.getLog(ShardServerEventHandler.class);
+
+  @Override
+  public void preServe() {
+LOG.info("setup");
+  }
+
+  @Override
+  public ServerContext createContext(TProtocol input, TProtocol output) {
+    LOG.info("Client connected");
+    return new ShardServerContext();
+  }
+
+  @Override
+  public void deleteContext(ServerContext serverContext, TProtocol input, TProtocol output)
{
+    LOG.info("Client disconnected");
+  }
+
+  @Override
+  public void processContext(ServerContext serverContext, TTransport inputTransport, TTransport
outputTransport) {
+    LOG.info("Method called");
+  }
+
+}


Mime
View raw message