incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cr...@apache.org
Subject [36/50] [abbrv] git commit: Adding server side method filtering with an example filter server.
Date Wed, 13 Nov 2013 03:30:55 GMT
Adding server side method filtering with an example filter server.


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

Branch: refs/heads/blur-console-v2
Commit: e0b8264560f746f3d884ffb9d6c31b32ad8940a6
Parents: 6e272a7
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Mon Nov 4 16:11:57 2013 -0500
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Mon Nov 4 16:12:48 2013 -0500

----------------------------------------------------------------------
 .../apache/blur/server/BlurServerContext.java   |  62 +++
 .../blur/server/ControllerServerContext.java    |  37 +-
 .../apache/blur/server/FilteredBlurServer.java  | 200 ++++++++++
 .../apache/blur/server/ShardServerContext.java  |  33 +-
 .../server/example/DisableTableAdminServer.java |  95 +++++
 .../blur/thrift/BlurControllerServer.java       |  14 +-
 .../org/apache/blur/thrift/BlurShardServer.java |   4 +-
 .../blur/thrift/ThriftBlurControllerServer.java |   4 +-
 .../blur/thrift/ThriftBlurShardServer.java      |  10 +-
 .../java/org/apache/blur/utils/BlurUtil.java    |  40 +-
 .../java/org/apache/blur/thrift/BlurClient.java |   5 +-
 .../org/apache/blur/thrift/generated/Blur.java  | 389 +------------------
 .../org/apache/blur/utils/BlurConstants.java    |   3 +
 .../src/main/resources/blur-default.properties  |   6 +-
 .../src/main/scripts/interface/Blur.thrift      |   4 +-
 .../main/scripts/interface/gen-html/Blur.html   |   1 -
 .../org/apache/blur/thrift/generated/Blur.java  | 389 +------------------
 .../src/main/scripts/interface/gen-js/Blur.js   |  54 +--
 .../scripts/interface/gen-perl/Blur/Blur.pm     |  57 +--
 .../src/main/scripts/interface/gen-rb/blur.rb   |  20 +-
 docs/Blur.html                                  |   1 -
 21 files changed, 453 insertions(+), 975 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/e0b82645/blur-core/src/main/java/org/apache/blur/server/BlurServerContext.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/server/BlurServerContext.java b/blur-core/src/main/java/org/apache/blur/server/BlurServerContext.java
new file mode 100644
index 0000000..84ac238
--- /dev/null
+++ b/blur-core/src/main/java/org/apache/blur/server/BlurServerContext.java
@@ -0,0 +1,62 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.blur.server;
+
+import java.net.SocketAddress;
+
+import org.apache.blur.log.Log;
+import org.apache.blur.log.LogFactory;
+import org.apache.blur.thirdparty.thrift_0_9_0.server.ServerContext;
+import org.apache.blur.thrift.generated.User;
+
+public class BlurServerContext implements ServerContext {
+  
+  private static final Log LOG = LogFactory.getLog(BlurServerContext.class);
+  
+  private User _user;
+  private final SocketAddress _localSocketAddress;
+  private final SocketAddress _remoteSocketAddress;
+  private final String _connectionString;
+
+  public BlurServerContext(SocketAddress localSocketAddress, SocketAddress remoteSocketAddress) {
+    _localSocketAddress = localSocketAddress;
+    _remoteSocketAddress = remoteSocketAddress;
+    _connectionString = _localSocketAddress.toString() + "\t" + _remoteSocketAddress.toString();
+  }
+  
+  public void setUser(User user) {
+    LOG.info("User [{0}] for context [{1}]", user, this);
+    _user = user;
+  }
+
+  public User getUser() {
+    return _user;
+  }
+  
+  public SocketAddress getRocalSocketAddress() {
+    return _localSocketAddress;
+  }
+
+  public SocketAddress getRemoteSocketAddress() {
+    return _remoteSocketAddress;
+  }
+
+  public String getConnectionString() {
+    return _connectionString;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/e0b82645/blur-core/src/main/java/org/apache/blur/server/ControllerServerContext.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/server/ControllerServerContext.java b/blur-core/src/main/java/org/apache/blur/server/ControllerServerContext.java
index 73c18bc..5a7c2d1 100644
--- a/blur-core/src/main/java/org/apache/blur/server/ControllerServerContext.java
+++ b/blur-core/src/main/java/org/apache/blur/server/ControllerServerContext.java
@@ -20,28 +20,17 @@ import java.net.SocketAddress;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
-import org.apache.blur.log.Log;
-import org.apache.blur.log.LogFactory;
 import org.apache.blur.thirdparty.thrift_0_9_0.server.ServerContext;
-import org.apache.blur.thrift.generated.User;
 
 /**
  * The thrift session that holds the connection string of the client.
  */
-public class ControllerServerContext implements ServerContext {
-  
-  private static final Log LOG = LogFactory.getLog(ControllerServerContext.class);
+public class ControllerServerContext extends BlurServerContext implements ServerContext {
 
   private final static Map<Thread, ControllerServerContext> _threadsToContext = new ConcurrentHashMap<Thread, ControllerServerContext>();
-  private final SocketAddress _localSocketAddress;
-  private final SocketAddress _remoteSocketAddress;
-  private final String _connectionString;
-  private User _user;
 
   public ControllerServerContext(SocketAddress localSocketAddress, SocketAddress remoteSocketAddress) {
-    _localSocketAddress = localSocketAddress;
-    _remoteSocketAddress = remoteSocketAddress;
-    _connectionString = _localSocketAddress.toString() + "\t" + _remoteSocketAddress.toString();
+    super(localSocketAddress, remoteSocketAddress);
   }
 
   /**
@@ -63,26 +52,4 @@ public class ControllerServerContext implements ServerContext {
     return _threadsToContext.get(Thread.currentThread());
   }
 
-  public SocketAddress getRocalSocketAddress() {
-    return _localSocketAddress;
-  }
-
-  public SocketAddress getRemoteSocketAddress() {
-    return _remoteSocketAddress;
-  }
-
-  public String getConnectionString() {
-    return _connectionString;
-  }
-
-  public void setUser(User user) {
-    LOG.info("User [{0}] for context [{1}]", user, this);
-    _user = user;
-  }
-
-  public User getUser() {
-    return _user;
-  }
-  
-  
 }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/e0b82645/blur-core/src/main/java/org/apache/blur/server/FilteredBlurServer.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/server/FilteredBlurServer.java b/blur-core/src/main/java/org/apache/blur/server/FilteredBlurServer.java
new file mode 100644
index 0000000..98f8605
--- /dev/null
+++ b/blur-core/src/main/java/org/apache/blur/server/FilteredBlurServer.java
@@ -0,0 +1,200 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.blur.server;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.blur.BlurConfiguration;
+import org.apache.blur.thirdparty.thrift_0_9_0.TException;
+import org.apache.blur.thrift.generated.Blur.Iface;
+import org.apache.blur.thrift.generated.BlurException;
+import org.apache.blur.thrift.generated.BlurQuery;
+import org.apache.blur.thrift.generated.BlurQueryStatus;
+import org.apache.blur.thrift.generated.BlurResults;
+import org.apache.blur.thrift.generated.ColumnDefinition;
+import org.apache.blur.thrift.generated.FetchResult;
+import org.apache.blur.thrift.generated.Metric;
+import org.apache.blur.thrift.generated.Query;
+import org.apache.blur.thrift.generated.RowMutation;
+import org.apache.blur.thrift.generated.Schema;
+import org.apache.blur.thrift.generated.Selector;
+import org.apache.blur.thrift.generated.ShardState;
+import org.apache.blur.thrift.generated.TableDescriptor;
+import org.apache.blur.thrift.generated.TableStats;
+import org.apache.blur.thrift.generated.User;
+
+public class FilteredBlurServer implements Iface {
+  
+  protected final Iface _iface;
+  protected final boolean _shard;
+  protected final BlurConfiguration _configuration;
+  
+  public FilteredBlurServer(BlurConfiguration configuration, Iface iface, boolean shard) {
+    _iface = iface;
+    _shard = shard;
+    _configuration = configuration;
+  }
+
+  public void setUser(User user) throws TException {
+    _iface.setUser(user);
+  }
+  
+  public final BlurServerContext getServerContext() {
+    if (_shard) {
+      return ShardServerContext.getShardServerContext();
+    } else {
+      return ControllerServerContext.getControllerServerContext();
+    }
+  }
+
+  public void createTable(TableDescriptor tableDescriptor) throws BlurException, TException {
+    _iface.createTable(tableDescriptor);
+  }
+
+  public void enableTable(String table) throws BlurException, TException {
+    _iface.enableTable(table);
+  }
+
+  public void disableTable(String table) throws BlurException, TException {
+    _iface.disableTable(table);
+  }
+
+  public void removeTable(String table, boolean deleteIndexFiles) throws BlurException, TException {
+    _iface.removeTable(table, deleteIndexFiles);
+  }
+
+  public boolean addColumnDefinition(String table, ColumnDefinition columnDefinition) throws BlurException, TException {
+    return _iface.addColumnDefinition(table, columnDefinition);
+  }
+
+  public List<String> tableList() throws BlurException, TException {
+    return _iface.tableList();
+  }
+
+  public List<String> tableListByCluster(String cluster) throws BlurException, TException {
+    return _iface.tableListByCluster(cluster);
+  }
+
+  public TableDescriptor describe(String table) throws BlurException, TException {
+    return _iface.describe(table);
+  }
+
+  public Schema schema(String table) throws BlurException, TException {
+    return _iface.schema(table);
+  }
+
+  public String parseQuery(String table, Query query) throws BlurException, TException {
+    return _iface.parseQuery(table, query);
+  }
+
+  public TableStats tableStats(String table) throws BlurException, TException {
+    return _iface.tableStats(table);
+  }
+
+  public void optimize(String table, int numberOfSegmentsPerShard) throws BlurException, TException {
+    _iface.optimize(table, numberOfSegmentsPerShard);
+  }
+
+  public void createSnapshot(String table, String name) throws BlurException, TException {
+    _iface.createSnapshot(table, name);
+  }
+
+  public void removeSnapshot(String table, String name) throws BlurException, TException {
+    _iface.removeSnapshot(table, name);
+  }
+
+  public Map<String, List<String>> listSnapshots(String table) throws BlurException, TException {
+    return _iface.listSnapshots(table);
+  }
+
+  public BlurResults query(String table, BlurQuery blurQuery) throws BlurException, TException {
+    return _iface.query(table, blurQuery);
+  }
+
+  public FetchResult fetchRow(String table, Selector selector) throws BlurException, TException {
+    return _iface.fetchRow(table, selector);
+  }
+
+  public List<FetchResult> fetchRowBatch(String table, List<Selector> selectors) throws BlurException, TException {
+    return _iface.fetchRowBatch(table, selectors);
+  }
+
+  public void mutate(RowMutation mutation) throws BlurException, TException {
+    _iface.mutate(mutation);
+  }
+
+  public void mutateBatch(List<RowMutation> mutations) throws BlurException, TException {
+    _iface.mutateBatch(mutations);
+  }
+
+  public void cancelQuery(String table, String uuid) throws BlurException, TException {
+    _iface.cancelQuery(table, uuid);
+  }
+
+  public List<String> queryStatusIdList(String table) throws BlurException, TException {
+    return _iface.queryStatusIdList(table);
+  }
+
+  public BlurQueryStatus queryStatusById(String table, String uuid) throws BlurException, TException {
+    return _iface.queryStatusById(table, uuid);
+  }
+
+  public List<String> terms(String table, String columnFamily, String columnName, String startWith, short size)
+      throws BlurException, TException {
+    return _iface.terms(table, columnFamily, columnName, startWith, size);
+  }
+
+  public long recordFrequency(String table, String columnFamily, String columnName, String value) throws BlurException,
+      TException {
+    return _iface.recordFrequency(table, columnFamily, columnName, value);
+  }
+
+  public List<String> shardClusterList() throws BlurException, TException {
+    return _iface.shardClusterList();
+  }
+
+  public List<String> shardServerList(String cluster) throws BlurException, TException {
+    return _iface.shardServerList(cluster);
+  }
+
+  public List<String> controllerServerList() throws BlurException, TException {
+    return _iface.controllerServerList();
+  }
+
+  public Map<String, String> shardServerLayout(String table) throws BlurException, TException {
+    return _iface.shardServerLayout(table);
+  }
+
+  public Map<String, Map<String, ShardState>> shardServerLayoutState(String table) throws BlurException, TException {
+    return _iface.shardServerLayoutState(table);
+  }
+
+  public boolean isInSafeMode(String cluster) throws BlurException, TException {
+    return _iface.isInSafeMode(cluster);
+  }
+
+  public Map<String, String> configuration() throws BlurException, TException {
+    return _iface.configuration();
+  }
+
+  public Map<String, Metric> metrics(Set<String> metrics) throws BlurException, TException {
+    return _iface.metrics(metrics);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/e0b82645/blur-core/src/main/java/org/apache/blur/server/ShardServerContext.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/server/ShardServerContext.java b/blur-core/src/main/java/org/apache/blur/server/ShardServerContext.java
index ee906e0..5ef0fdb 100644
--- a/blur-core/src/main/java/org/apache/blur/server/ShardServerContext.java
+++ b/blur-core/src/main/java/org/apache/blur/server/ShardServerContext.java
@@ -26,7 +26,6 @@ import java.util.concurrent.ConcurrentHashMap;
 import org.apache.blur.log.Log;
 import org.apache.blur.log.LogFactory;
 import org.apache.blur.thirdparty.thrift_0_9_0.server.ServerContext;
-import org.apache.blur.thrift.generated.User;
 import org.apache.hadoop.io.IOUtils;
 
 /**
@@ -35,22 +34,15 @@ import org.apache.hadoop.io.IOUtils;
  * that involve the _threadsToContext map where Thread is the key we don't need
  * to clear or reset threads.
  */
-public class ShardServerContext implements ServerContext {
+public class ShardServerContext extends BlurServerContext implements ServerContext {
 
   private static final Log LOG = LogFactory.getLog(ShardServerContext.class);
 
   private final static Map<Thread, ShardServerContext> _threadsToContext = new ConcurrentHashMap<Thread, ShardServerContext>();
   private final Map<String, IndexSearcherClosable> _indexSearcherMap = new HashMap<String, IndexSearcherClosable>();
-  private final SocketAddress _localSocketAddress;
-  private final SocketAddress _remoteSocketAddress;
-  private final String _connectionString;
-
-  private User _user;
 
   public ShardServerContext(SocketAddress localSocketAddress, SocketAddress remoteSocketAddress) {
-    _localSocketAddress = localSocketAddress;
-    _remoteSocketAddress = remoteSocketAddress;
-    _connectionString = _localSocketAddress.toString() + "\t" + _remoteSocketAddress.toString();
+    super(localSocketAddress, remoteSocketAddress);
   }
 
   /**
@@ -143,25 +135,4 @@ public class ShardServerContext implements ServerContext {
     return table + "/" + shard;
   }
 
-  public SocketAddress getRocalSocketAddress() {
-    return _localSocketAddress;
-  }
-
-  public SocketAddress getRemoteSocketAddress() {
-    return _remoteSocketAddress;
-  }
-
-  public String getConnectionString() {
-    return _connectionString;
-  }
-
-  public void setUser(User user) {
-    LOG.info("User [{0}] for context [{1}]", user, this);
-    _user = user;
-  }
-
-  public User getUser() {
-    return _user;
-  }
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/e0b82645/blur-core/src/main/java/org/apache/blur/server/example/DisableTableAdminServer.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/server/example/DisableTableAdminServer.java b/blur-core/src/main/java/org/apache/blur/server/example/DisableTableAdminServer.java
new file mode 100644
index 0000000..d537f5c
--- /dev/null
+++ b/blur-core/src/main/java/org/apache/blur/server/example/DisableTableAdminServer.java
@@ -0,0 +1,95 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.blur.server.example;
+
+import org.apache.blur.BlurConfiguration;
+import org.apache.blur.server.BlurServerContext;
+import org.apache.blur.server.FilteredBlurServer;
+import org.apache.blur.thirdparty.thrift_0_9_0.TException;
+import org.apache.blur.thrift.generated.Blur.Iface;
+import org.apache.blur.thrift.generated.BlurException;
+import org.apache.blur.thrift.generated.ErrorType;
+import org.apache.blur.thrift.generated.TableDescriptor;
+import org.apache.blur.thrift.generated.User;
+
+public class DisableTableAdminServer extends FilteredBlurServer {
+
+  private static final String SYSTEM = "system";
+
+  public DisableTableAdminServer(BlurConfiguration configuration, Iface iface, boolean shard) {
+    super(configuration, iface, shard);
+  }
+
+  @Override
+  public void createTable(TableDescriptor tableDescriptor) throws BlurException, TException {
+    BlurServerContext serverContext = getServerContext();
+    User user = serverContext.getUser();
+    if (isAllowed(user)) {
+      _iface.createTable(tableDescriptor);
+    } else {
+      throw new BlurException("Action not allowed by this user.", null, ErrorType.UNKNOWN);
+    }
+  }
+
+  @Override
+  public void enableTable(String table) throws BlurException, TException {
+    BlurServerContext serverContext = getServerContext();
+    User user = serverContext.getUser();
+    if (isAllowed(user)) {
+      _iface.enableTable(table);
+    } else {
+      throw new BlurException("Action not allowed by this user.", null, ErrorType.UNKNOWN);
+    }
+  }
+
+  @Override
+  public void disableTable(String table) throws BlurException, TException {
+    BlurServerContext serverContext = getServerContext();
+    User user = serverContext.getUser();
+    if (isAllowed(user)) {
+      _iface.disableTable(table);
+    } else {
+      throw new BlurException("Action not allowed by this user.", null, ErrorType.UNKNOWN);
+    }
+  }
+
+  @Override
+  public void removeTable(String table, boolean deleteIndexFiles) throws BlurException, TException {
+    BlurServerContext serverContext = getServerContext();
+    User user = serverContext.getUser();
+    if (isAllowed(user)) {
+      _iface.removeTable(table, deleteIndexFiles);
+    } else {
+      throw new BlurException("Action not allowed by this user.", null, ErrorType.UNKNOWN);
+    }
+  }
+  
+  private boolean isAllowed(User user) {
+    if (user == null) {
+      return false;
+    }
+    String username = user.getUsername();
+    if (username == null) {
+      return false;
+    }
+    if (username.toLowerCase().equals(SYSTEM)) {
+      return true;
+    }
+    return false;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/e0b82645/blur-core/src/main/java/org/apache/blur/thrift/BlurControllerServer.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/thrift/BlurControllerServer.java b/blur-core/src/main/java/org/apache/blur/thrift/BlurControllerServer.java
index 660b6d0..e2a0072 100644
--- a/blur-core/src/main/java/org/apache/blur/thrift/BlurControllerServer.java
+++ b/blur-core/src/main/java/org/apache/blur/thrift/BlurControllerServer.java
@@ -443,10 +443,10 @@ public class BlurControllerServer extends TableAdmin implements Iface {
     }
     if (selector != null) {
 
-      //Gather client objects and build batches for fetching.
+      // Gather client objects and build batches for fetching.
       IdentityHashMap<Client, List<Selector>> map = new IdentityHashMap<Client, List<Selector>>();
-      
-      //Need to maintain original order.
+
+      // Need to maintain original order.
       final IdentityHashMap<Selector, Integer> indexMap = new IdentityHashMap<Selector, Integer>();
       for (int i = 0; i < results.results.size(); i++) {
         final LazyBlurResult result = (LazyBlurResult) results.results.get(i);
@@ -462,7 +462,7 @@ public class BlurControllerServer extends TableAdmin implements Iface {
         indexMap.put(s, i);
       }
 
-      //Execute batch fetches
+      // Execute batch fetches
       List<Future<Boolean>> futures = new ArrayList<Future<Boolean>>();
       final AtomicReferenceArray<FetchResult> fetchResults = new AtomicReferenceArray<FetchResult>(
           results.results.size());
@@ -482,12 +482,12 @@ public class BlurControllerServer extends TableAdmin implements Iface {
         }));
       }
 
-      //Wait for all parallel calls to finish.
+      // Wait for all parallel calls to finish.
       for (Future<Boolean> future : futures) {
         future.get();
       }
 
-      //Place fetch results into result object for response.
+      // Place fetch results into result object for response.
       for (int i = 0; i < fetchResults.length(); i++) {
         FetchResult fetchResult = fetchResults.get(i);
         BlurResult result = results.results.get(i);
@@ -1174,7 +1174,7 @@ public class BlurControllerServer extends TableAdmin implements Iface {
   }
 
   @Override
-  public void setUser(User user) throws BlurException, TException {
+  public void setUser(User user) throws TException {
     ControllerServerContext context = ControllerServerContext.getControllerServerContext();
     context.setUser(user);
   }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/e0b82645/blur-core/src/main/java/org/apache/blur/thrift/BlurShardServer.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/thrift/BlurShardServer.java b/blur-core/src/main/java/org/apache/blur/thrift/BlurShardServer.java
index bda2482..4dfe043 100644
--- a/blur-core/src/main/java/org/apache/blur/thrift/BlurShardServer.java
+++ b/blur-core/src/main/java/org/apache/blur/thrift/BlurShardServer.java
@@ -482,9 +482,9 @@ public class BlurShardServer extends TableAdmin implements Iface {
   public void setConfiguration(BlurConfiguration conf) {
     _configuration = conf;
   }
-  
+
   @Override
-  public void setUser(User user) throws BlurException, TException {
+  public void setUser(User user) throws TException {
     ShardServerContext context = ShardServerContext.getShardServerContext();
     context.setUser(user);
   }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/e0b82645/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurControllerServer.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurControllerServer.java b/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurControllerServer.java
index e4417ba..91e5d04 100644
--- a/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurControllerServer.java
+++ b/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurControllerServer.java
@@ -133,8 +133,10 @@ public class ThriftBlurControllerServer extends ThriftServer {
     controllerServer.setConfiguration(configuration);
 
     controllerServer.init();
+    
+    Iface iface= BlurUtil.wrapFilteredBlurServer(configuration, controllerServer, false);
 
-    Iface iface = BlurUtil.recordMethodCallsAndAverageTimes(controllerServer, Iface.class, true);
+    iface = BlurUtil.recordMethodCallsAndAverageTimes(iface, Iface.class, true);
 
     int threadCount = configuration.getInt(BLUR_CONTROLLER_SERVER_THRIFT_THREAD_COUNT, 32);
     

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/e0b82645/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurShardServer.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurShardServer.java b/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurShardServer.java
index aff2fd9..f46c975 100644
--- a/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurShardServer.java
+++ b/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurShardServer.java
@@ -206,7 +206,7 @@ public class ThriftBlurShardServer extends ThriftServer {
     int indexManagerThreadCount = configuration.getInt(BLUR_INDEXMANAGER_SEARCH_THREAD_COUNT, 32);
     int mutateThreadCount = configuration.getInt(BLUR_INDEXMANAGER_MUTATE_THREAD_COUNT, 32);
     long statusCleanupTimerDelay = TimeUnit.SECONDS.toMillis(10);
-    
+
     final IndexManager indexManager = new IndexManager(indexServer, clusterStatus, filterCache, maxHeapPerRowFetch,
         fetchCount, indexManagerThreadCount, mutateThreadCount, statusCleanupTimerDelay);
 
@@ -221,7 +221,9 @@ public class ThriftBlurShardServer extends ThriftServer {
     shardServer.setConfiguration(configuration);
     shardServer.init();
 
-    Iface iface = BlurUtil.recordMethodCallsAndAverageTimes(shardServer, Iface.class, false);
+    Iface iface = BlurUtil.wrapFilteredBlurServer(configuration, shardServer, true);
+
+    iface = BlurUtil.recordMethodCallsAndAverageTimes(iface, Iface.class, false);
     if (httpServer != null) {
       WebAppContext context = httpServer.getContext();
       context.addServlet(new ServletHolder(new TServlet(new Blur.Processor<Blur.Iface>(iface),
@@ -266,9 +268,9 @@ public class ThriftBlurShardServer extends ThriftServer {
     if (blurFilterCacheClass != null) {
       try {
         Class<? extends BlurFilterCache> clazz = (Class<? extends BlurFilterCache>) Class.forName(blurFilterCacheClass);
-        Class<?>[] types = new Class<?>[] {BlurConfiguration.class};
+        Class<?>[] types = new Class<?>[] { BlurConfiguration.class };
         Constructor<? extends BlurFilterCache> constructor = clazz.getConstructor(types);
-        return constructor.newInstance(new Object[]{configuration});
+        return constructor.newInstance(new Object[] { configuration });
       } catch (Exception e) {
         throw new RuntimeException(e);
       }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/e0b82645/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java b/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java
index 631257b..d95371b 100644
--- a/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java
+++ b/blur-core/src/main/java/org/apache/blur/utils/BlurUtil.java
@@ -19,6 +19,8 @@ package org.apache.blur.utils;
 import static org.apache.blur.metrics.MetricsConstants.BLUR;
 import static org.apache.blur.metrics.MetricsConstants.ORG_APACHE_BLUR;
 import static org.apache.blur.metrics.MetricsConstants.THRIFT_CALLS;
+import static org.apache.blur.utils.BlurConstants.BLUR_CONTROLLER_FILTERED_SERVER_CLASS;
+import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_FILTERED_SERVER_CLASS;
 import static org.apache.blur.utils.BlurConstants.SHARD_PREFIX;
 
 import java.io.ByteArrayInputStream;
@@ -29,6 +31,7 @@ import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.io.Serializable;
 import java.lang.management.ManagementFactory;
+import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
@@ -54,6 +57,7 @@ import java.util.concurrent.atomic.AtomicLong;
 import java.util.concurrent.atomic.AtomicLongArray;
 import java.util.regex.Pattern;
 
+import org.apache.blur.BlurConfiguration;
 import org.apache.blur.log.Log;
 import org.apache.blur.log.LogFactory;
 import org.apache.blur.manager.clusterstatus.ZookeeperPathConstants;
@@ -62,6 +66,7 @@ import org.apache.blur.manager.results.BlurResultIterable;
 import org.apache.blur.manager.results.BlurResultPeekableIteratorComparator;
 import org.apache.blur.manager.results.PeekableIterator;
 import org.apache.blur.server.ControllerServerContext;
+import org.apache.blur.server.FilteredBlurServer;
 import org.apache.blur.server.ShardServerContext;
 import org.apache.blur.thirdparty.thrift_0_9_0.TBase;
 import org.apache.blur.thirdparty.thrift_0_9_0.TException;
@@ -165,7 +170,7 @@ public class BlurUtil {
           if (controllerServerContext == null) {
             connectionString = "unknown";
           } else {
-            connectionString = controllerServerContext.getConnectionString();  
+            connectionString = controllerServerContext.getConnectionString();
           }
         } else {
           ShardServerContext shardServerContext = ShardServerContext.getShardServerContext();
@@ -879,4 +884,37 @@ public class BlurUtil {
     }
     fileSystem.delete(path, true);
   }
+
+  @SuppressWarnings("unchecked")
+  public static Iface wrapFilteredBlurServer(BlurConfiguration configuration, Iface iface, boolean shard) {
+    String className;
+    if (!shard) {
+      className = configuration.get(BLUR_CONTROLLER_FILTERED_SERVER_CLASS);
+    } else {
+      className = configuration.get(BLUR_SHARD_FILTERED_SERVER_CLASS);
+    }
+    if (className != null && !className.isEmpty()) {
+      try {
+        Class<? extends FilteredBlurServer> clazz = (Class<? extends FilteredBlurServer>) Class.forName(className);
+        Constructor<? extends FilteredBlurServer> constructor = clazz.getConstructor(new Class[] {
+            BlurConfiguration.class, Iface.class, Boolean.TYPE });
+        return constructor.newInstance(new Object[] { configuration, iface, shard });
+      } catch (ClassNotFoundException e) {
+        throw new RuntimeException(e);
+      } catch (NoSuchMethodException e) {
+        throw new RuntimeException(e);
+      } catch (SecurityException e) {
+        throw new RuntimeException(e);
+      } catch (InstantiationException e) {
+        throw new RuntimeException(e);
+      } catch (IllegalAccessException e) {
+        throw new RuntimeException(e);
+      } catch (IllegalArgumentException e) {
+        throw new RuntimeException(e);
+      } catch (InvocationTargetException e) {
+        throw new RuntimeException(e);
+      }
+    }
+    return iface;
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/e0b82645/blur-thrift/src/main/java/org/apache/blur/thrift/BlurClient.java
----------------------------------------------------------------------
diff --git a/blur-thrift/src/main/java/org/apache/blur/thrift/BlurClient.java b/blur-thrift/src/main/java/org/apache/blur/thrift/BlurClient.java
index 0af883e..086a1ad 100644
--- a/blur-thrift/src/main/java/org/apache/blur/thrift/BlurClient.java
+++ b/blur-thrift/src/main/java/org/apache/blur/thrift/BlurClient.java
@@ -35,6 +35,7 @@ import org.apache.blur.thrift.generated.User;
 public class BlurClient {
 
   private static final Log LOG = LogFactory.getLog(BlurClient.class);
+  private static final boolean DEFAULT_SET_USER = false;
 
   static class BlurClientInvocationHandler implements InvocationHandler {
 
@@ -47,7 +48,7 @@ public class BlurClient {
     private User user;
 
     public BlurClientInvocationHandler(List<Connection> connections) {
-      this(connections, true);
+      this(connections, DEFAULT_SET_USER);
     }
 
     public BlurClientInvocationHandler(List<Connection> connections, int maxRetries, long backOffTime,
@@ -163,7 +164,7 @@ public class BlurClient {
 
   public static Iface getClient(List<Connection> connections, int maxRetries, long backOffTime, long maxBackOffTime) {
     return (Iface) Proxy.newProxyInstance(Iface.class.getClassLoader(), new Class[] { Iface.class },
-        new BlurClientInvocationHandler(connections, maxRetries, backOffTime, maxBackOffTime, true));
+        new BlurClientInvocationHandler(connections, maxRetries, backOffTime, maxBackOffTime, DEFAULT_SET_USER));
   }
 
   public static Iface getClient(Connection connection, int maxRetries, long backOffTime, long maxBackOffTime,

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/e0b82645/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Blur.java
----------------------------------------------------------------------
diff --git a/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Blur.java b/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Blur.java
index a92b613..8e63a43 100644
--- a/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Blur.java
+++ b/blur-thrift/src/main/java/org/apache/blur/thrift/generated/Blur.java
@@ -182,7 +182,7 @@ public class Blur {
      * 
      * @param user the User object.
      */
-    public void setUser(User user) throws BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException;
+    public void setUser(User user) throws org.apache.blur.thirdparty.thrift_0_9_0.TException;
 
     /**
      * Executes a query against a the given table and returns the results.  If this method is
@@ -834,10 +834,9 @@ public class Blur {
       throw new org.apache.blur.thirdparty.thrift_0_9_0.TApplicationException(org.apache.blur.thirdparty.thrift_0_9_0.TApplicationException.MISSING_RESULT, "listSnapshots failed: unknown result");
     }
 
-    public void setUser(User user) throws BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException
+    public void setUser(User user) throws org.apache.blur.thirdparty.thrift_0_9_0.TException
     {
       send_setUser(user);
-      recv_setUser();
     }
 
     public void send_setUser(User user) throws org.apache.blur.thirdparty.thrift_0_9_0.TException
@@ -847,16 +846,6 @@ public class Blur {
       sendBase("setUser", args);
     }
 
-    public void recv_setUser() throws BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException
-    {
-      setUser_result result = new setUser_result();
-      receiveBase(result, "setUser");
-      if (result.ex != null) {
-        throw result.ex;
-      }
-      return;
-    }
-
     public BlurResults query(String table, BlurQuery blurQuery) throws BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException
     {
       send_query(table, blurQuery);
@@ -1848,7 +1837,7 @@ public class Blur {
     public static class setUser_call extends org.apache.blur.thirdparty.thrift_0_9_0.async.TAsyncMethodCall {
       private User user;
       public setUser_call(User user, org.apache.blur.thirdparty.thrift_0_9_0.async.AsyncMethodCallback<setUser_call> resultHandler, org.apache.blur.thirdparty.thrift_0_9_0.async.TAsyncClient client, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolFactory protocolFactory, org.apache.blur.thirdparty.thrift_0_9_0.transport.TNonblockingTransport transport) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
-        super(client, protocolFactory, transport, resultHandler, false);
+        super(client, protocolFactory, transport, resultHandler, true);
         this.user = user;
       }
 
@@ -1860,13 +1849,12 @@ public class Blur {
         prot.writeMessageEnd();
       }
 
-      public void getResult() throws BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException {
+      public void getResult() throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
         if (getState() != org.apache.blur.thirdparty.thrift_0_9_0.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
         org.apache.blur.thirdparty.thrift_0_9_0.transport.TMemoryInputTransport memoryTransport = new org.apache.blur.thirdparty.thrift_0_9_0.transport.TMemoryInputTransport(getFrameBuffer().array());
         org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        (new Client(prot)).recv_setUser();
       }
     }
 
@@ -2894,17 +2882,12 @@ public class Blur {
       }
 
       protected boolean isOneway() {
-        return false;
+        return true;
       }
 
-      public setUser_result getResult(I iface, setUser_args args) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
-        setUser_result result = new setUser_result();
-        try {
-          iface.setUser(args.user);
-        } catch (BlurException ex) {
-          result.ex = ex;
-        }
-        return result;
+      public org.apache.blur.thirdparty.thrift_0_9_0.TBase getResult(I iface, setUser_args args) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
+        iface.setUser(args.user);
+        return null;
       }
     }
 
@@ -16066,362 +16049,6 @@ public class Blur {
 
   }
 
-  public static class setUser_result implements org.apache.blur.thirdparty.thrift_0_9_0.TBase<setUser_result, setUser_result._Fields>, java.io.Serializable, Cloneable   {
-    private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TStruct STRUCT_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TStruct("setUser_result");
-
-    private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField EX_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("ex", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, (short)1);
-
-    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
-    static {
-      schemes.put(StandardScheme.class, new setUser_resultStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new setUser_resultTupleSchemeFactory());
-    }
-
-    public BlurException ex; // required
-
-    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-    public enum _Fields implements org.apache.blur.thirdparty.thrift_0_9_0.TFieldIdEnum {
-      EX((short)1, "ex");
-
-      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
-      static {
-        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-          byName.put(field.getFieldName(), field);
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, or null if its not found.
-       */
-      public static _Fields findByThriftId(int fieldId) {
-        switch(fieldId) {
-          case 1: // EX
-            return EX;
-          default:
-            return null;
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, throwing an exception
-       * if it is not found.
-       */
-      public static _Fields findByThriftIdOrThrow(int fieldId) {
-        _Fields fields = findByThriftId(fieldId);
-        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-        return fields;
-      }
-
-      /**
-       * Find the _Fields constant that matches name, or null if its not found.
-       */
-      public static _Fields findByName(String name) {
-        return byName.get(name);
-      }
-
-      private final short _thriftId;
-      private final String _fieldName;
-
-      _Fields(short thriftId, String fieldName) {
-        _thriftId = thriftId;
-        _fieldName = fieldName;
-      }
-
-      public short getThriftFieldId() {
-        return _thriftId;
-      }
-
-      public String getFieldName() {
-        return _fieldName;
-      }
-    }
-
-    // isset id assignments
-    public static final Map<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData> metaDataMap;
-    static {
-      Map<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData>(_Fields.class);
-      tmpMap.put(_Fields.EX, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("ex", org.apache.blur.thirdparty.thrift_0_9_0.TFieldRequirementType.DEFAULT, 
-          new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldValueMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT)));
-      metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData.addStructMetaDataMap(setUser_result.class, metaDataMap);
-    }
-
-    public setUser_result() {
-    }
-
-    public setUser_result(
-      BlurException ex)
-    {
-      this();
-      this.ex = ex;
-    }
-
-    /**
-     * Performs a deep copy on <i>other</i>.
-     */
-    public setUser_result(setUser_result other) {
-      if (other.isSetEx()) {
-        this.ex = new BlurException(other.ex);
-      }
-    }
-
-    public setUser_result deepCopy() {
-      return new setUser_result(this);
-    }
-
-    @Override
-    public void clear() {
-      this.ex = null;
-    }
-
-    public BlurException getEx() {
-      return this.ex;
-    }
-
-    public setUser_result setEx(BlurException ex) {
-      this.ex = ex;
-      return this;
-    }
-
-    public void unsetEx() {
-      this.ex = null;
-    }
-
-    /** Returns true if field ex is set (has been assigned a value) and false otherwise */
-    public boolean isSetEx() {
-      return this.ex != null;
-    }
-
-    public void setExIsSet(boolean value) {
-      if (!value) {
-        this.ex = null;
-      }
-    }
-
-    public void setFieldValue(_Fields field, Object value) {
-      switch (field) {
-      case EX:
-        if (value == null) {
-          unsetEx();
-        } else {
-          setEx((BlurException)value);
-        }
-        break;
-
-      }
-    }
-
-    public Object getFieldValue(_Fields field) {
-      switch (field) {
-      case EX:
-        return getEx();
-
-      }
-      throw new IllegalStateException();
-    }
-
-    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-    public boolean isSet(_Fields field) {
-      if (field == null) {
-        throw new IllegalArgumentException();
-      }
-
-      switch (field) {
-      case EX:
-        return isSetEx();
-      }
-      throw new IllegalStateException();
-    }
-
-    @Override
-    public boolean equals(Object that) {
-      if (that == null)
-        return false;
-      if (that instanceof setUser_result)
-        return this.equals((setUser_result)that);
-      return false;
-    }
-
-    public boolean equals(setUser_result that) {
-      if (that == null)
-        return false;
-
-      boolean this_present_ex = true && this.isSetEx();
-      boolean that_present_ex = true && that.isSetEx();
-      if (this_present_ex || that_present_ex) {
-        if (!(this_present_ex && that_present_ex))
-          return false;
-        if (!this.ex.equals(that.ex))
-          return false;
-      }
-
-      return true;
-    }
-
-    @Override
-    public int hashCode() {
-      return 0;
-    }
-
-    public int compareTo(setUser_result other) {
-      if (!getClass().equals(other.getClass())) {
-        return getClass().getName().compareTo(other.getClass().getName());
-      }
-
-      int lastComparison = 0;
-      setUser_result typedOther = (setUser_result)other;
-
-      lastComparison = Boolean.valueOf(isSetEx()).compareTo(typedOther.isSetEx());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetEx()) {
-        lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(this.ex, typedOther.ex);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      return 0;
-    }
-
-    public _Fields fieldForId(int fieldId) {
-      return _Fields.findByThriftId(fieldId);
-    }
-
-    public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol iprot) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
-      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
-    }
-
-    public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol oprot) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
-      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
-      }
-
-    @Override
-    public String toString() {
-      StringBuilder sb = new StringBuilder("setUser_result(");
-      boolean first = true;
-
-      sb.append("ex:");
-      if (this.ex == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.ex);
-      }
-      first = false;
-      sb.append(")");
-      return sb.toString();
-    }
-
-    public void validate() throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
-      // check for required fields
-      // check for sub-struct validity
-    }
-
-    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-      try {
-        write(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TCompactProtocol(new org.apache.blur.thirdparty.thrift_0_9_0.transport.TIOStreamTransport(out)));
-      } catch (org.apache.blur.thirdparty.thrift_0_9_0.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-      try {
-        read(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TCompactProtocol(new org.apache.blur.thirdparty.thrift_0_9_0.transport.TIOStreamTransport(in)));
-      } catch (org.apache.blur.thirdparty.thrift_0_9_0.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-    private static class setUser_resultStandardSchemeFactory implements SchemeFactory {
-      public setUser_resultStandardScheme getScheme() {
-        return new setUser_resultStandardScheme();
-      }
-    }
-
-    private static class setUser_resultStandardScheme extends StandardScheme<setUser_result> {
-
-      public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol iprot, setUser_result struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
-        org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField schemeField;
-        iprot.readStructBegin();
-        while (true)
-        {
-          schemeField = iprot.readFieldBegin();
-          if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STOP) { 
-            break;
-          }
-          switch (schemeField.id) {
-            case 1: // EX
-              if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT) {
-                struct.ex = new BlurException();
-                struct.ex.read(iprot);
-                struct.setExIsSet(true);
-              } else { 
-                org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
-            default:
-              org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-          }
-          iprot.readFieldEnd();
-        }
-        iprot.readStructEnd();
-
-        // check for required fields of primitive type, which can't be checked in the validate method
-        struct.validate();
-      }
-
-      public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol oprot, setUser_result struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
-        struct.validate();
-
-        oprot.writeStructBegin(STRUCT_DESC);
-        if (struct.ex != null) {
-          oprot.writeFieldBegin(EX_FIELD_DESC);
-          struct.ex.write(oprot);
-          oprot.writeFieldEnd();
-        }
-        oprot.writeFieldStop();
-        oprot.writeStructEnd();
-      }
-
-    }
-
-    private static class setUser_resultTupleSchemeFactory implements SchemeFactory {
-      public setUser_resultTupleScheme getScheme() {
-        return new setUser_resultTupleScheme();
-      }
-    }
-
-    private static class setUser_resultTupleScheme extends TupleScheme<setUser_result> {
-
-      @Override
-      public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, setUser_result struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
-        TTupleProtocol oprot = (TTupleProtocol) prot;
-        BitSet optionals = new BitSet();
-        if (struct.isSetEx()) {
-          optionals.set(0);
-        }
-        oprot.writeBitSet(optionals, 1);
-        if (struct.isSetEx()) {
-          struct.ex.write(oprot);
-        }
-      }
-
-      @Override
-      public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, setUser_result struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
-        TTupleProtocol iprot = (TTupleProtocol) prot;
-        BitSet incoming = iprot.readBitSet(1);
-        if (incoming.get(0)) {
-          struct.ex = new BlurException();
-          struct.ex.read(iprot);
-          struct.setExIsSet(true);
-        }
-      }
-    }
-
-  }
-
   public static class query_args implements org.apache.blur.thirdparty.thrift_0_9_0.TBase<query_args, query_args._Fields>, java.io.Serializable, Cloneable   {
     private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TStruct STRUCT_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TStruct("query_args");
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/e0b82645/blur-util/src/main/java/org/apache/blur/utils/BlurConstants.java
----------------------------------------------------------------------
diff --git a/blur-util/src/main/java/org/apache/blur/utils/BlurConstants.java b/blur-util/src/main/java/org/apache/blur/utils/BlurConstants.java
index a7057ea..324fa20 100644
--- a/blur-util/src/main/java/org/apache/blur/utils/BlurConstants.java
+++ b/blur-util/src/main/java/org/apache/blur/utils/BlurConstants.java
@@ -119,6 +119,9 @@ public class BlurConstants {
   public static final String BLUR_CLIENTPOOL_CLIENT_CLOSE_THRESHOLD = "blur.clientpool.client.close.threshold";
   public static final String BLUR_CLIENTPOOL_CLIENT_CLEAN_FREQUENCY = "blur.clientpool.client.clean.frequency";
   
+  public static final String BLUR_SHARD_FILTERED_SERVER_CLASS = "blur.shard.filtered.server.class";
+  public static final String BLUR_CONTROLLER_FILTERED_SERVER_CLASS = "blur.controller.filtered.server.class";
+  
   public static final String BLUR_GUI_CONTROLLER_PORT = "blur.gui.controller.port";
   public static final String BLUR_GUI_SHARD_PORT = "blur.gui.shard.port";
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/e0b82645/blur-util/src/main/resources/blur-default.properties
----------------------------------------------------------------------
diff --git a/blur-util/src/main/resources/blur-default.properties b/blur-util/src/main/resources/blur-default.properties
index 0d0c7bd..ffcd783 100644
--- a/blur-util/src/main/resources/blur-default.properties
+++ b/blur-util/src/main/resources/blur-default.properties
@@ -160,7 +160,8 @@ blur.max.records.per.row.fetch.request=1000
 # The http status page port for the shard server
 blur.gui.shard.port=40090
 
-
+# To intercept the calls made to the shard server and perform server side changes to the calls extend org.apache.blur.server.FilteredBlurServer.
+blur.shard.filtered.server.class=
 
 
 ### Controller Server Configuration
@@ -225,5 +226,8 @@ blur.controller.retry.max.default.delay=2000
 # The http status page port for the controller server
 blur.gui.controller.port=40080
 
+# To intercept the calls made to the controller server and perform server side changes to the calls extend org.apache.blur.server.FilteredBlurServer.
+blur.controller.filtered.server.class=
+
 
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/e0b82645/distribution/src/main/scripts/interface/Blur.thrift
----------------------------------------------------------------------
diff --git a/distribution/src/main/scripts/interface/Blur.thrift b/distribution/src/main/scripts/interface/Blur.thrift
index d38ebc4..18dca49 100644
--- a/distribution/src/main/scripts/interface/Blur.thrift
+++ b/distribution/src/main/scripts/interface/Blur.thrift
@@ -883,10 +883,10 @@ service Blur {
   /**
    * Sets the User for the current session.
    */
-  void setUser(
+  oneway void setUser(
     /** the User object. */
     1:User user
-  ) throws (1:BlurException ex)
+  )
 
   /**
    * Executes a query against a the given table and returns the results.  If this method is 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/e0b82645/distribution/src/main/scripts/interface/gen-html/Blur.html
----------------------------------------------------------------------
diff --git a/distribution/src/main/scripts/interface/gen-html/Blur.html b/distribution/src/main/scripts/interface/gen-html/Blur.html
index c7f2214..ced2295 100644
--- a/distribution/src/main/scripts/interface/gen-html/Blur.html
+++ b/distribution/src/main/scripts/interface/gen-html/Blur.html
@@ -635,7 +635,6 @@ shards servers.  Each of the methods are documented.
 </pre>Returns a map where the key is the shard, and the list is the snapshots within that shard
 <br/></div><div class="definition"><h4 id="Fn_Blur_setUser">Function: Blur.setUser</h4>
 <pre><code>void</code> setUser(<code><a href="Blur.html#Struct_User">User</a></code> user)
-    throws <code><a href="Blur.html#Struct_BlurException">BlurException</a></code>
 </pre>Sets the User for the current session.
 <br/><br/><h4 id="Parameters_Blur_setUser">Parameters</h4>
 <table class="table-bordered table-striped table-condensed"><thead><th>Name</th><th>Description</th></thead><tr><td>user</td><td>the User object.

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/e0b82645/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Blur.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Blur.java b/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Blur.java
index a92b613..8e63a43 100644
--- a/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Blur.java
+++ b/distribution/src/main/scripts/interface/gen-java/org/apache/blur/thrift/generated/Blur.java
@@ -182,7 +182,7 @@ public class Blur {
      * 
      * @param user the User object.
      */
-    public void setUser(User user) throws BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException;
+    public void setUser(User user) throws org.apache.blur.thirdparty.thrift_0_9_0.TException;
 
     /**
      * Executes a query against a the given table and returns the results.  If this method is
@@ -834,10 +834,9 @@ public class Blur {
       throw new org.apache.blur.thirdparty.thrift_0_9_0.TApplicationException(org.apache.blur.thirdparty.thrift_0_9_0.TApplicationException.MISSING_RESULT, "listSnapshots failed: unknown result");
     }
 
-    public void setUser(User user) throws BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException
+    public void setUser(User user) throws org.apache.blur.thirdparty.thrift_0_9_0.TException
     {
       send_setUser(user);
-      recv_setUser();
     }
 
     public void send_setUser(User user) throws org.apache.blur.thirdparty.thrift_0_9_0.TException
@@ -847,16 +846,6 @@ public class Blur {
       sendBase("setUser", args);
     }
 
-    public void recv_setUser() throws BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException
-    {
-      setUser_result result = new setUser_result();
-      receiveBase(result, "setUser");
-      if (result.ex != null) {
-        throw result.ex;
-      }
-      return;
-    }
-
     public BlurResults query(String table, BlurQuery blurQuery) throws BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException
     {
       send_query(table, blurQuery);
@@ -1848,7 +1837,7 @@ public class Blur {
     public static class setUser_call extends org.apache.blur.thirdparty.thrift_0_9_0.async.TAsyncMethodCall {
       private User user;
       public setUser_call(User user, org.apache.blur.thirdparty.thrift_0_9_0.async.AsyncMethodCallback<setUser_call> resultHandler, org.apache.blur.thirdparty.thrift_0_9_0.async.TAsyncClient client, org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolFactory protocolFactory, org.apache.blur.thirdparty.thrift_0_9_0.transport.TNonblockingTransport transport) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
-        super(client, protocolFactory, transport, resultHandler, false);
+        super(client, protocolFactory, transport, resultHandler, true);
         this.user = user;
       }
 
@@ -1860,13 +1849,12 @@ public class Blur {
         prot.writeMessageEnd();
       }
 
-      public void getResult() throws BlurException, org.apache.blur.thirdparty.thrift_0_9_0.TException {
+      public void getResult() throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
         if (getState() != org.apache.blur.thirdparty.thrift_0_9_0.async.TAsyncMethodCall.State.RESPONSE_READ) {
           throw new IllegalStateException("Method call not finished!");
         }
         org.apache.blur.thirdparty.thrift_0_9_0.transport.TMemoryInputTransport memoryTransport = new org.apache.blur.thirdparty.thrift_0_9_0.transport.TMemoryInputTransport(getFrameBuffer().array());
         org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-        (new Client(prot)).recv_setUser();
       }
     }
 
@@ -2894,17 +2882,12 @@ public class Blur {
       }
 
       protected boolean isOneway() {
-        return false;
+        return true;
       }
 
-      public setUser_result getResult(I iface, setUser_args args) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
-        setUser_result result = new setUser_result();
-        try {
-          iface.setUser(args.user);
-        } catch (BlurException ex) {
-          result.ex = ex;
-        }
-        return result;
+      public org.apache.blur.thirdparty.thrift_0_9_0.TBase getResult(I iface, setUser_args args) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
+        iface.setUser(args.user);
+        return null;
       }
     }
 
@@ -16066,362 +16049,6 @@ public class Blur {
 
   }
 
-  public static class setUser_result implements org.apache.blur.thirdparty.thrift_0_9_0.TBase<setUser_result, setUser_result._Fields>, java.io.Serializable, Cloneable   {
-    private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TStruct STRUCT_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TStruct("setUser_result");
-
-    private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField EX_FIELD_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField("ex", org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT, (short)1);
-
-    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
-    static {
-      schemes.put(StandardScheme.class, new setUser_resultStandardSchemeFactory());
-      schemes.put(TupleScheme.class, new setUser_resultTupleSchemeFactory());
-    }
-
-    public BlurException ex; // required
-
-    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-    public enum _Fields implements org.apache.blur.thirdparty.thrift_0_9_0.TFieldIdEnum {
-      EX((short)1, "ex");
-
-      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
-      static {
-        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-          byName.put(field.getFieldName(), field);
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, or null if its not found.
-       */
-      public static _Fields findByThriftId(int fieldId) {
-        switch(fieldId) {
-          case 1: // EX
-            return EX;
-          default:
-            return null;
-        }
-      }
-
-      /**
-       * Find the _Fields constant that matches fieldId, throwing an exception
-       * if it is not found.
-       */
-      public static _Fields findByThriftIdOrThrow(int fieldId) {
-        _Fields fields = findByThriftId(fieldId);
-        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-        return fields;
-      }
-
-      /**
-       * Find the _Fields constant that matches name, or null if its not found.
-       */
-      public static _Fields findByName(String name) {
-        return byName.get(name);
-      }
-
-      private final short _thriftId;
-      private final String _fieldName;
-
-      _Fields(short thriftId, String fieldName) {
-        _thriftId = thriftId;
-        _fieldName = fieldName;
-      }
-
-      public short getThriftFieldId() {
-        return _thriftId;
-      }
-
-      public String getFieldName() {
-        return _fieldName;
-      }
-    }
-
-    // isset id assignments
-    public static final Map<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData> metaDataMap;
-    static {
-      Map<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData>(_Fields.class);
-      tmpMap.put(_Fields.EX, new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData("ex", org.apache.blur.thirdparty.thrift_0_9_0.TFieldRequirementType.DEFAULT, 
-          new org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldValueMetaData(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT)));
-      metaDataMap = Collections.unmodifiableMap(tmpMap);
-      org.apache.blur.thirdparty.thrift_0_9_0.meta_data.FieldMetaData.addStructMetaDataMap(setUser_result.class, metaDataMap);
-    }
-
-    public setUser_result() {
-    }
-
-    public setUser_result(
-      BlurException ex)
-    {
-      this();
-      this.ex = ex;
-    }
-
-    /**
-     * Performs a deep copy on <i>other</i>.
-     */
-    public setUser_result(setUser_result other) {
-      if (other.isSetEx()) {
-        this.ex = new BlurException(other.ex);
-      }
-    }
-
-    public setUser_result deepCopy() {
-      return new setUser_result(this);
-    }
-
-    @Override
-    public void clear() {
-      this.ex = null;
-    }
-
-    public BlurException getEx() {
-      return this.ex;
-    }
-
-    public setUser_result setEx(BlurException ex) {
-      this.ex = ex;
-      return this;
-    }
-
-    public void unsetEx() {
-      this.ex = null;
-    }
-
-    /** Returns true if field ex is set (has been assigned a value) and false otherwise */
-    public boolean isSetEx() {
-      return this.ex != null;
-    }
-
-    public void setExIsSet(boolean value) {
-      if (!value) {
-        this.ex = null;
-      }
-    }
-
-    public void setFieldValue(_Fields field, Object value) {
-      switch (field) {
-      case EX:
-        if (value == null) {
-          unsetEx();
-        } else {
-          setEx((BlurException)value);
-        }
-        break;
-
-      }
-    }
-
-    public Object getFieldValue(_Fields field) {
-      switch (field) {
-      case EX:
-        return getEx();
-
-      }
-      throw new IllegalStateException();
-    }
-
-    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-    public boolean isSet(_Fields field) {
-      if (field == null) {
-        throw new IllegalArgumentException();
-      }
-
-      switch (field) {
-      case EX:
-        return isSetEx();
-      }
-      throw new IllegalStateException();
-    }
-
-    @Override
-    public boolean equals(Object that) {
-      if (that == null)
-        return false;
-      if (that instanceof setUser_result)
-        return this.equals((setUser_result)that);
-      return false;
-    }
-
-    public boolean equals(setUser_result that) {
-      if (that == null)
-        return false;
-
-      boolean this_present_ex = true && this.isSetEx();
-      boolean that_present_ex = true && that.isSetEx();
-      if (this_present_ex || that_present_ex) {
-        if (!(this_present_ex && that_present_ex))
-          return false;
-        if (!this.ex.equals(that.ex))
-          return false;
-      }
-
-      return true;
-    }
-
-    @Override
-    public int hashCode() {
-      return 0;
-    }
-
-    public int compareTo(setUser_result other) {
-      if (!getClass().equals(other.getClass())) {
-        return getClass().getName().compareTo(other.getClass().getName());
-      }
-
-      int lastComparison = 0;
-      setUser_result typedOther = (setUser_result)other;
-
-      lastComparison = Boolean.valueOf(isSetEx()).compareTo(typedOther.isSetEx());
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-      if (isSetEx()) {
-        lastComparison = org.apache.blur.thirdparty.thrift_0_9_0.TBaseHelper.compareTo(this.ex, typedOther.ex);
-        if (lastComparison != 0) {
-          return lastComparison;
-        }
-      }
-      return 0;
-    }
-
-    public _Fields fieldForId(int fieldId) {
-      return _Fields.findByThriftId(fieldId);
-    }
-
-    public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol iprot) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
-      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
-    }
-
-    public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol oprot) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
-      schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
-      }
-
-    @Override
-    public String toString() {
-      StringBuilder sb = new StringBuilder("setUser_result(");
-      boolean first = true;
-
-      sb.append("ex:");
-      if (this.ex == null) {
-        sb.append("null");
-      } else {
-        sb.append(this.ex);
-      }
-      first = false;
-      sb.append(")");
-      return sb.toString();
-    }
-
-    public void validate() throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
-      // check for required fields
-      // check for sub-struct validity
-    }
-
-    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-      try {
-        write(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TCompactProtocol(new org.apache.blur.thirdparty.thrift_0_9_0.transport.TIOStreamTransport(out)));
-      } catch (org.apache.blur.thirdparty.thrift_0_9_0.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-      try {
-        read(new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TCompactProtocol(new org.apache.blur.thirdparty.thrift_0_9_0.transport.TIOStreamTransport(in)));
-      } catch (org.apache.blur.thirdparty.thrift_0_9_0.TException te) {
-        throw new java.io.IOException(te);
-      }
-    }
-
-    private static class setUser_resultStandardSchemeFactory implements SchemeFactory {
-      public setUser_resultStandardScheme getScheme() {
-        return new setUser_resultStandardScheme();
-      }
-    }
-
-    private static class setUser_resultStandardScheme extends StandardScheme<setUser_result> {
-
-      public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol iprot, setUser_result struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
-        org.apache.blur.thirdparty.thrift_0_9_0.protocol.TField schemeField;
-        iprot.readStructBegin();
-        while (true)
-        {
-          schemeField = iprot.readFieldBegin();
-          if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STOP) { 
-            break;
-          }
-          switch (schemeField.id) {
-            case 1: // EX
-              if (schemeField.type == org.apache.blur.thirdparty.thrift_0_9_0.protocol.TType.STRUCT) {
-                struct.ex = new BlurException();
-                struct.ex.read(iprot);
-                struct.setExIsSet(true);
-              } else { 
-                org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-              }
-              break;
-            default:
-              org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-          }
-          iprot.readFieldEnd();
-        }
-        iprot.readStructEnd();
-
-        // check for required fields of primitive type, which can't be checked in the validate method
-        struct.validate();
-      }
-
-      public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol oprot, setUser_result struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
-        struct.validate();
-
-        oprot.writeStructBegin(STRUCT_DESC);
-        if (struct.ex != null) {
-          oprot.writeFieldBegin(EX_FIELD_DESC);
-          struct.ex.write(oprot);
-          oprot.writeFieldEnd();
-        }
-        oprot.writeFieldStop();
-        oprot.writeStructEnd();
-      }
-
-    }
-
-    private static class setUser_resultTupleSchemeFactory implements SchemeFactory {
-      public setUser_resultTupleScheme getScheme() {
-        return new setUser_resultTupleScheme();
-      }
-    }
-
-    private static class setUser_resultTupleScheme extends TupleScheme<setUser_result> {
-
-      @Override
-      public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, setUser_result struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
-        TTupleProtocol oprot = (TTupleProtocol) prot;
-        BitSet optionals = new BitSet();
-        if (struct.isSetEx()) {
-          optionals.set(0);
-        }
-        oprot.writeBitSet(optionals, 1);
-        if (struct.isSetEx()) {
-          struct.ex.write(oprot);
-        }
-      }
-
-      @Override
-      public void read(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, setUser_result struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
-        TTupleProtocol iprot = (TTupleProtocol) prot;
-        BitSet incoming = iprot.readBitSet(1);
-        if (incoming.get(0)) {
-          struct.ex = new BlurException();
-          struct.ex.read(iprot);
-          struct.setExIsSet(true);
-        }
-      }
-    }
-
-  }
-
   public static class query_args implements org.apache.blur.thirdparty.thrift_0_9_0.TBase<query_args, query_args._Fields>, java.io.Serializable, Cloneable   {
     private static final org.apache.blur.thirdparty.thrift_0_9_0.protocol.TStruct STRUCT_DESC = new org.apache.blur.thirdparty.thrift_0_9_0.protocol.TStruct("query_args");
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/e0b82645/distribution/src/main/scripts/interface/gen-js/Blur.js
----------------------------------------------------------------------
diff --git a/distribution/src/main/scripts/interface/gen-js/Blur.js b/distribution/src/main/scripts/interface/gen-js/Blur.js
index 57cb0b7..cc7c86d 100644
--- a/distribution/src/main/scripts/interface/gen-js/Blur.js
+++ b/distribution/src/main/scripts/interface/gen-js/Blur.js
@@ -1988,16 +1988,6 @@ Blur_setUser_args.prototype.write = function(output) {
 };
 
 Blur_setUser_result = function(args) {
-  this.ex = null;
-  if (args instanceof BlurException) {
-    this.ex = args;
-    return;
-  }
-  if (args) {
-    if (args.ex !== undefined) {
-      this.ex = args.ex;
-    }
-  }
 };
 Blur_setUser_result.prototype = {};
 Blur_setUser_result.prototype.read = function(input) {
@@ -2011,22 +2001,7 @@ Blur_setUser_result.prototype.read = function(input) {
     if (ftype == Thrift.Type.STOP) {
       break;
     }
-    switch (fid)
-    {
-      case 1:
-      if (ftype == Thrift.Type.STRUCT) {
-        this.ex = new BlurException();
-        this.ex.read(input);
-      } else {
-        input.skip(ftype);
-      }
-      break;
-      case 0:
-        input.skip(ftype);
-        break;
-      default:
-        input.skip(ftype);
-    }
+    input.skip(ftype);
     input.readFieldEnd();
   }
   input.readStructEnd();
@@ -2035,11 +2010,6 @@ Blur_setUser_result.prototype.read = function(input) {
 
 Blur_setUser_result.prototype.write = function(output) {
   output.writeStructBegin('Blur_setUser_result');
-  if (this.ex !== null && this.ex !== undefined) {
-    output.writeFieldBegin('ex', Thrift.Type.STRUCT, 1);
-    this.ex.write(output);
-    output.writeFieldEnd();
-  }
   output.writeFieldStop();
   output.writeStructEnd();
   return;
@@ -5249,7 +5219,6 @@ BlurClient.prototype.recv_listSnapshots = function() {
 };
 BlurClient.prototype.setUser = function(user) {
   this.send_setUser(user);
-  this.recv_setUser();
 };
 
 BlurClient.prototype.send_setUser = function(user) {
@@ -5260,27 +5229,6 @@ BlurClient.prototype.send_setUser = function(user) {
   this.output.writeMessageEnd();
   return this.output.getTransport().flush();
 };
-
-BlurClient.prototype.recv_setUser = function() {
-  var ret = this.input.readMessageBegin();
-  var fname = ret.fname;
-  var mtype = ret.mtype;
-  var rseqid = ret.rseqid;
-  if (mtype == Thrift.MessageType.EXCEPTION) {
-    var x = new Thrift.TApplicationException();
-    x.read(this.input);
-    this.input.readMessageEnd();
-    throw x;
-  }
-  var result = new Blur_setUser_result();
-  result.read(this.input);
-  this.input.readMessageEnd();
-
-  if (null !== result.ex) {
-    throw result.ex;
-  }
-  return;
-};
 BlurClient.prototype.query = function(table, blurQuery) {
   this.send_query(table, blurQuery);
   return this.recv_query();

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/e0b82645/distribution/src/main/scripts/interface/gen-perl/Blur/Blur.pm
----------------------------------------------------------------------
diff --git a/distribution/src/main/scripts/interface/gen-perl/Blur/Blur.pm b/distribution/src/main/scripts/interface/gen-perl/Blur/Blur.pm
index 9f479e8..4abbba3 100644
--- a/distribution/src/main/scripts/interface/gen-perl/Blur/Blur.pm
+++ b/distribution/src/main/scripts/interface/gen-perl/Blur/Blur.pm
@@ -2300,18 +2300,11 @@ sub write {
 
 package Blur::Blur_setUser_result;
 use base qw(Class::Accessor);
-Blur::Blur_setUser_result->mk_accessors( qw( ) );
 
 sub new {
   my $classname = shift;
   my $self      = {};
   my $vals      = shift || {};
-  $self->{ex} = undef;
-  if (UNIVERSAL::isa($vals,'HASH')) {
-    if (defined $vals->{ex}) {
-      $self->{ex} = $vals->{ex};
-    }
-  }
   return bless ($self, $classname);
 }
 
@@ -2334,13 +2327,6 @@ sub read {
     }
     SWITCH: for($fid)
     {
-      /^1$/ && do{      if ($ftype == TType::STRUCT) {
-        $self->{ex} = new Blur::BlurException();
-        $xfer += $self->{ex}->read($input);
-      } else {
-        $xfer += $input->skip($ftype);
-      }
-      last; };
         $xfer += $input->skip($ftype);
     }
     $xfer += $input->readFieldEnd();
@@ -2353,11 +2339,6 @@ sub write {
   my ($self, $output) = @_;
   my $xfer   = 0;
   $xfer += $output->writeStructBegin('Blur_setUser_result');
-  if (defined $self->{ex}) {
-    $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1);
-    $xfer += $self->{ex}->write($output);
-    $xfer += $output->writeFieldEnd();
-  }
   $xfer += $output->writeFieldStop();
   $xfer += $output->writeStructEnd();
   return $xfer;
@@ -6583,7 +6564,6 @@ sub setUser{
   my $user = shift;
 
     $self->send_setUser($user);
-  $self->recv_setUser();
 }
 
 sub send_setUser{
@@ -6597,30 +6577,6 @@ sub send_setUser{
   $self->{output}->writeMessageEnd();
   $self->{output}->getTransport()->flush();
 }
-
-sub recv_setUser{
-  my $self = shift;
-
-  my $rseqid = 0;
-  my $fname;
-  my $mtype = 0;
-
-  $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid);
-  if ($mtype == TMessageType::EXCEPTION) {
-    my $x = new TApplicationException();
-    $x->read($self->{input});
-    $self->{input}->readMessageEnd();
-    die $x;
-  }
-  my $result = new Blur::Blur_setUser_result();
-  $result->read($self->{input});
-  $self->{input}->readMessageEnd();
-
-  if (defined $result->{ex}) {
-    die $result->{ex};
-  }
-  return;
-}
 sub query{
   my $self = shift;
   my $table = shift;
@@ -7761,18 +7717,9 @@ sub process_setUser {
     my $args = new Blur::Blur_setUser_args();
     $args->read($input);
     $input->readMessageEnd();
-    my $result = new Blur::Blur_setUser_result();
-    eval {
-      $self->{handler}->setUser($args->user);
-    }; if( UNIVERSAL::isa($@,'Blur::BlurException') ){ 
-      $result->{ex} = $@;
-    }
-    $output->writeMessageBegin('setUser', TMessageType::REPLY, $seqid);
-    $result->write($output);
-    $output->writeMessageEnd();
-    $output->getTransport()->flush();
+    $self->{handler}->setUser($args->user);
+    return;
 }
-
 sub process_query {
     my ($self, $seqid, $input, $output) = @_;
     my $args = new Blur::Blur_query_args();

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/e0b82645/distribution/src/main/scripts/interface/gen-rb/blur.rb
----------------------------------------------------------------------
diff --git a/distribution/src/main/scripts/interface/gen-rb/blur.rb b/distribution/src/main/scripts/interface/gen-rb/blur.rb
index c9cd5f8..66a23b1 100644
--- a/distribution/src/main/scripts/interface/gen-rb/blur.rb
+++ b/distribution/src/main/scripts/interface/gen-rb/blur.rb
@@ -247,19 +247,11 @@ module Blur
 
       def setUser(user)
         send_setUser(user)
-        recv_setUser()
       end
 
       def send_setUser(user)
         send_message('setUser', SetUser_args, :user => user)
       end
-
-      def recv_setUser()
-        result = receive_message(SetUser_result)
-        raise result.ex unless result.ex.nil?
-        return
-      end
-
       def query(table, blurQuery)
         send_query(table, blurQuery)
         return recv_query()
@@ -717,13 +709,8 @@ module Blur
 
       def process_setUser(seqid, iprot, oprot)
         args = read_args(iprot, SetUser_args)
-        result = SetUser_result.new()
-        begin
-          @handler.setUser(args.user)
-        rescue ::Blur::BlurException => ex
-          result.ex = ex
-        end
-        write_result(result, oprot, 'setUser', seqid)
+        @handler.setUser(args.user)
+        return
       end
 
       def process_query(seqid, iprot, oprot)
@@ -1469,10 +1456,9 @@ module Blur
 
     class SetUser_result
       include ::Thrift::Struct, ::Thrift::Struct_Union
-      EX = 1
 
       FIELDS = {
-        EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => ::Blur::BlurException}
+
       }
 
       def struct_fields; FIELDS; end

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/e0b82645/docs/Blur.html
----------------------------------------------------------------------
diff --git a/docs/Blur.html b/docs/Blur.html
index 2fa6e94..1fc917b 100644
--- a/docs/Blur.html
+++ b/docs/Blur.html
@@ -694,7 +694,6 @@ throws <code><a href="Blur.html#Struct_BlurException">BlurException</a></code>
 </pre>Returns a map where the key is the shard, and the list is the snapshots within that shard
 <br/></p></section><section><div class="page-header"><h4 id="Fn_Blur_setUser">Function: Blur.setUser</h4></div><p class="lead">
 <pre><code>void</code> setUser(<code><a href="Blur.html#Struct_User">User</a></code> user)
-throws <code><a href="Blur.html#Struct_BlurException">BlurException</a></code>
 </pre>Sets the User for the current session.
 <br/><br/><h4 id="Parameters_Blur_setUser">Parameters</h4>
 <table class="table-bordered table-striped table-condensed"><thead><th>Name</th><th>Description</th></thead><tr><td>user</td><td>the User object.


Mime
View raw message