You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@curator.apache.org by ra...@apache.org on 2014/06/07 20:19:44 UTC
[46/50] [abbrv] git commit: more tests
more tests
Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/3a0f6472
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/3a0f6472
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/3a0f6472
Branch: refs/heads/master
Commit: 3a0f6472ec059f4e44b9e79a329326a2cf57fbad
Parents: b583407
Author: randgalt <ra...@apache.org>
Authored: Mon Jun 2 18:07:13 2014 -0500
Committer: randgalt <ra...@apache.org>
Committed: Mon Jun 2 18:07:13 2014 -0500
----------------------------------------------------------------------
.../idl/services/CuratorProjectionService.java | 2 +-
curator-x-rpc/src/main/thrift/curator.thrift | 9 +-
.../site/confluence/configuration.confluence | 16 +-
.../curator/generated/CuratorService.java | 7962 +++++++++---------
.../apache/curator/generated/DeleteSpec.java | 108 +-
.../apache/curator/generated/LeaderResult.java | 104 +-
.../java/org/apache/curator/x/rpc/RpcTests.java | 45 +
.../org/apache/curator/x/rpc/TestClient.java | 4 +-
8 files changed, 4238 insertions(+), 4012 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/curator/blob/3a0f6472/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/services/CuratorProjectionService.java
----------------------------------------------------------------------
diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/services/CuratorProjectionService.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/services/CuratorProjectionService.java
index 4fcb450..257230e 100644
--- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/services/CuratorProjectionService.java
+++ b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/services/CuratorProjectionService.java
@@ -97,7 +97,7 @@ public class CuratorProjectionService
return projection;
}
- @ThriftMethod(oneway = true)
+ @ThriftMethod
public void closeCuratorProjection(CuratorProjection projection)
{
CuratorEntry entry = connectionManager.remove(projection.id);
http://git-wip-us.apache.org/repos/asf/curator/blob/3a0f6472/curator-x-rpc/src/main/thrift/curator.thrift
----------------------------------------------------------------------
diff --git a/curator-x-rpc/src/main/thrift/curator.thrift b/curator-x-rpc/src/main/thrift/curator.thrift
index 2f46a93..4071069 100644
--- a/curator-x-rpc/src/main/thrift/curator.thrift
+++ b/curator-x-rpc/src/main/thrift/curator.thrift
@@ -86,7 +86,7 @@ struct LeaderProjection {
struct LeaderResult {
1: LeaderProjection projection;
- 2: bool hasLeadership;
+ 2: bool isLeader;
}
struct LeaseProjection {
@@ -177,8 +177,7 @@ struct DeleteSpec {
1: string path;
2: bool guaranteed;
3: string asyncContext;
- 4: bool compressed;
- 5: Version version;
+ 4: Version version;
}
struct OptionalStat {
@@ -247,7 +246,8 @@ struct CuratorEvent {
service CuratorService {
LockProjection acquireLock(1: CuratorProjection projection, 2: string path, 3: i32 maxWaitMs) throws (1: CuratorException ex1);
- oneway void closeCuratorProjection(1: CuratorProjection projection);
+ list<LeaseProjection> acquireSemaphore(1: CuratorProjection projection, 2: string path, 3: i32 acquireQty, 4: i32 maxWaitMs, 5: i32 maxLeases) throws (1: CuratorException ex1);
+ void closeCuratorProjection(1: CuratorProjection projection);
bool closeGenericProjection(1: CuratorProjection projection, 2: string id) throws (1: CuratorException ex1);
OptionalPath createNode(1: CuratorProjection projection, 2: CreateSpec spec) throws (1: CuratorException ex1);
void deleteNode(1: CuratorProjection projection, 2: DeleteSpec spec) throws (1: CuratorException ex1);
@@ -266,7 +266,6 @@ service CuratorService {
NodeCacheProjection startNodeCache(1: CuratorProjection projection, 2: string path, 3: bool dataIsCompressed, 4: bool buildInitial) throws (1: CuratorException ex1);
PathChildrenCacheProjection startPathChildrenCache(1: CuratorProjection projection, 2: string path, 3: bool cacheData, 4: bool dataIsCompressed, 5: PathChildrenCacheStartMode startMode) throws (1: CuratorException ex1);
PersistentEphemeralNodeProjection startPersistentEphemeralNode(1: CuratorProjection projection, 2: string path, 3: binary data, 4: PersistentEphemeralNodeMode mode) throws (1: CuratorException ex1);
- list<LeaseProjection> startSemaphore(1: CuratorProjection projection, 2: string path, 3: i32 acquireQty, 4: i32 maxWaitMs, 5: i32 maxLeases) throws (1: CuratorException ex1);
void sync(1: CuratorProjection projection, 2: string path, 3: string asyncContext) throws (1: CuratorException ex1);
}
http://git-wip-us.apache.org/repos/asf/curator/blob/3a0f6472/curator-x-rpc/src/site/confluence/configuration.confluence
----------------------------------------------------------------------
diff --git a/curator-x-rpc/src/site/confluence/configuration.confluence b/curator-x-rpc/src/site/confluence/configuration.confluence
index 72d2af0..939ee47 100644
--- a/curator-x-rpc/src/site/confluence/configuration.confluence
+++ b/curator-x-rpc/src/site/confluence/configuration.confluence
@@ -78,9 +78,7 @@ Here is an example JSON configuration file
{noformat}
-h2. Reference
-
-h3. Main
+h2. Main
||Name||Type||Default Value||Description||
|thrift|Thrift|n/a|Thrift server configuration|
@@ -89,14 +87,14 @@ h3. Main
|pingTime|Duration|5 seconds|The EventService will return a PING event if this time elapses without some other event being generated|
|connections|List of Connection|n/a|List of ZooKeeper connections|
-h3. Duration
+h2. Duration
Durations are strings that specify a time duration. Examples:
* "10s" \- 10 seconds
* "100ms" \- 100 milliseconds
* "3h" \- 3 hours
-h3. Thrift
+h2. Thrift
||Name||Type||Default Value||Required||Description||
|port|int|_none_|*Y*|port to listen on.|
@@ -105,12 +103,12 @@ h3. Thrift
|transportName|string|"framed"|\-|the name of the transport (frame codec) that this server will handle. The available options by default are 'unframed', 'buffered', and 'framed'. Additional modules may install other options.|
|protocolName|string|"binary"|\-|name of the protocol that this server will speak. The available options by default are 'binary' and 'compact'. Additional modules may install other options.|
-h3. Logging
+h2. Logging
Dropwizard's logging module is used. See the [[Dropwizard Logging Doc|http://dropwizard.readthedocs.org/en/latest/manual/configuration.html#logging]] for details
on specifying the logging configuration.
-h3. Connection
+h2. Connection
||Name||Type||Default Value||Required||Description||
|name|string|_none_|*Y*|Unique name for the connection.|
@@ -120,7 +118,7 @@ h3. Connection
|retry|Retry|an exponential\-backoff policy|\-|The Retry Policy to use|
|authorization|Authorization|null|\-|Authorization spec|
-h3. Retry
+h2. Retry
The retry policy configuration depends on what type is used. There 3 types supported:
@@ -138,7 +136,7 @@ The retry policy configuration depends on what type is used. There 3 types suppo
|sleepBetweenRetries|int|100 milliseconds|sleep time between retries|
|n|int|3|the number of retries|
-h3. Authorization
+h2. Authorization
||Name||Type||Description||
|scheme|string|the authorization scheme|