Adding thrift api calls for getting status of executing commands and the cancel api as well.
Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/77a4f849 Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/77a4f849 Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/77a4f849 Branch: refs/heads/master Commit: 77a4f849986573bcd5d9d9b77f34ae0463224aec Parents: 89e2302 Author: Aaron McCurry <[email protected]> Authored: Mon Sep 8 08:48:28 2014 -0400 Committer: Aaron McCurry <[email protected]> Committed: Mon Sep 8 08:48:28 2014 -0400 ---------------------------------------------------------------------- .../apache/blur/server/FilteredBlurServer.java | 18 + .../blur/thrift/BlurControllerServer.java | 18 + .../org/apache/blur/thrift/BlurShardServer.java | 18 + .../org/apache/blur/thrift/generated/Blur.java | 4624 ++++++++++++++---- .../blur/thrift/generated/CommandStatus.java | 826 ++++ .../thrift/generated/CommandStatusState.java | 70 + .../blur/thrift/generated/SafeClientGen.java | 63 + .../src/main/scripts/interface/Blur.thrift | 30 + .../main/scripts/interface/gen-html/Blur.html | 33 + .../main/scripts/interface/gen-html/index.html | 5 + .../org/apache/blur/thrift/generated/Blur.java | 4624 ++++++++++++++---- .../blur/thrift/generated/CommandStatus.java | 826 ++++ .../thrift/generated/CommandStatusState.java | 70 + .../src/main/scripts/interface/gen-js/Blur.js | 1191 +++-- .../main/scripts/interface/gen-js/Blur_types.js | 121 + .../scripts/interface/gen-perl/Blur/Blur.pm | 1143 ++++- .../scripts/interface/gen-perl/Blur/Types.pm | 130 + .../src/main/scripts/interface/gen-rb/blur.rb | 187 + .../main/scripts/interface/gen-rb/blur_types.rb | 36 + docs/Blur.html | 33 + 20 files changed, 11767 insertions(+), 2299 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/77a4f849/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 index 59896f0..46680a5 100644 --- a/blur-core/src/main/java/org/apache/blur/server/FilteredBlurServer.java +++ b/blur-core/src/main/java/org/apache/blur/server/FilteredBlurServer.java @@ -29,6 +29,8 @@ 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.CommandStatus; +import org.apache.blur.thrift.generated.CommandStatusState; import org.apache.blur.thrift.generated.FetchResult; import org.apache.blur.thrift.generated.Level; import org.apache.blur.thrift.generated.Metric; @@ -262,4 +264,20 @@ public class FilteredBlurServer implements Iface { _iface.refresh(); } + @Override + public List<String> commandStatusList(int startingAt, short fetch, CommandStatusState state) throws BlurException, + TException { + return _iface.commandStatusList(startingAt, fetch, state); + } + + @Override + public CommandStatus commandStatus(String executionId) throws BlurException, TException { + return _iface.commandStatus(executionId); + } + + @Override + public void commandCancel(String executionId) throws BlurException, TException { + _iface.commandCancel(executionId); + } + } http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/77a4f849/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 96f7872..c31a032 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 @@ -82,6 +82,8 @@ import org.apache.blur.thrift.generated.BlurQueryStatus; import org.apache.blur.thrift.generated.BlurResult; import org.apache.blur.thrift.generated.BlurResults; import org.apache.blur.thrift.generated.ColumnDefinition; +import org.apache.blur.thrift.generated.CommandStatus; +import org.apache.blur.thrift.generated.CommandStatusState; import org.apache.blur.thrift.generated.ErrorType; import org.apache.blur.thrift.generated.FetchResult; import org.apache.blur.thrift.generated.HighlightOptions; @@ -1549,4 +1551,20 @@ public class BlurControllerServer extends TableAdmin implements Iface { public void refresh() throws TException { // This is a NO-OP at this point for the controller. } + + @Override + public List<String> commandStatusList(int startingAt, short fetch, CommandStatusState state) throws BlurException, + TException { + throw new BException("Not Implemented"); + } + + @Override + public CommandStatus commandStatus(String executionId) throws BlurException, TException { + throw new BException("Not Implemented"); + } + + @Override + public void commandCancel(String executionId) throws BlurException, TException { + throw new BException("Not Implemented"); + } } http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/77a4f849/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 66159f0..e39f202 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 @@ -50,6 +50,8 @@ 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.CommandStatus; +import org.apache.blur.thrift.generated.CommandStatusState; import org.apache.blur.thrift.generated.FetchResult; import org.apache.blur.thrift.generated.HighlightOptions; import org.apache.blur.thrift.generated.Query; @@ -638,4 +640,20 @@ public class BlurShardServer extends TableAdmin implements Iface { public void refresh() throws TException { ShardServerContext.resetSearchers(); } + + @Override + public List<String> commandStatusList(int startingAt, short fetch, CommandStatusState state) throws BlurException, + TException { + throw new BException("Not Implemented"); + } + + @Override + public CommandStatus commandStatus(String executionId) throws BlurException, TException { + throw new BException("Not Implemented"); + } + + @Override + public void commandCancel(String executionId) throws BlurException, TException { + throw new BException("Not Implemented"); + } }
