Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merged changes from current master

  • Loading branch information...
commit 958f8cb642db40051a58f194757182ff00f4a714 2 parents d0bb21a + 9f69898
Chinmay Soman authored
Showing with 15,183 additions and 3,497 deletions.
  1. +7 −2 .classpath
  2. +2 −0  .gitignore
  3. +5 −2 .settings/org.eclipse.jdt.core.prefs
  4. +1 −0  CONTRIBUTORS
  5. +3 −3 NOTES
  6. +2 −2 bin/voldemort-server.sh
  7. +1 −1  build.properties
  8. +338 −51 clients/python/voldemort/protocol/voldemort_admin_pb2.py
  9. +9 −9 clients/ruby/lib/connection/connection.rb
  10. +4 −4 clients/ruby/lib/connection/tcp_connection.rb
  11. +1 −1  clients/ruby/lib/voldemort-serializer.rb
  12. +1 −1  clients/ruby/voldemort-rb.gemspec
  13. +1 −0  config/test_config1/config/server.properties
  14. +1 −0  config/test_config2/config/server.properties
  15. +183 −0 contrib/collections/src/java/voldemort/collections/AddNodeAction.java
  16. +113 −0 contrib/collections/src/java/voldemort/collections/MappedListIterator.java
  17. +63 −0 contrib/collections/src/java/voldemort/collections/UpdateElementById.java
  18. +51 −0 contrib/collections/src/java/voldemort/collections/UpdatePageIndex.java
  19. +28 −0 contrib/collections/src/java/voldemort/collections/VLinkedPagedKey.java
  20. +224 −0 contrib/collections/src/java/voldemort/collections/VLinkedPagedList.java
  21. +206 −0 contrib/collections/src/java/voldemort/collections/VLinkedPagedListIterator.java
  22. +264 −0 contrib/collections/src/java/voldemort/collections/VListIterator.java
  23. +90 −0 contrib/collections/src/java/voldemort/collections/VListIteratorValues.java
  24. +33 −0 contrib/collections/src/java/voldemort/collections/VListKey.java
  25. +70 −0 contrib/collections/src/java/voldemort/collections/VListNode.java
  26. +60 −0 contrib/collections/src/java/voldemort/collections/VPageIndexEntry.java
  27. +354 −0 contrib/collections/src/java/voldemort/collections/VStack.java
  28. +12 −0 contrib/collections/src/java/voldemort/utils/Identifiable.java
  29. +33 −0 contrib/collections/src/java/voldemort/utils/Identified.java
  30. +260 −0 contrib/collections/test/voldemort/collections/TestVLinkedPagedList.java
  31. +168 −0 contrib/collections/test/voldemort/collections/TestVStack.java
  32. +90 −71 contrib/ec2-testing/test/voldemort/utils/Ec2GossipTest.java
  33. +7 −4 contrib/ec2-testing/test/voldemort/utils/Ec2RebalanceTest.java
  34. +5 −5 contrib/krati/src/java/voldemort/store/krati/KratiStorageEngine.java
  35. BIN  lib/commons-httpclient-3.1.jar
  36. BIN  lib/compress-lzf-0.9.1.jar
  37. BIN  lib/httpclient-4.1.2.jar
  38. BIN  lib/httpcore-4.1.2.jar
  39. BIN  lib/snappy-0.2.jar
  40. +21 −0 release_notes.txt
  41. +63 −6 src/java/voldemort/VoldemortAdminTool.java
  42. +18 −0 src/java/voldemort/client/AbstractStoreClientFactory.java
  43. +34 −29 src/java/voldemort/client/HttpStoreClientFactory.java
  44. +160 −7 src/java/voldemort/client/protocol/admin/AdminClient.java
  45. +1 −1  src/java/voldemort/client/protocol/admin/AdminClientConfig.java
  46. +37 −0 src/java/voldemort/client/protocol/pb/ProtoUtils.java
  47. +3,523 −1,167 src/java/voldemort/client/protocol/pb/VAdminProto.java
  48. +22 −64 src/java/voldemort/client/rebalance/OrderedClusterTransition.java
  49. +28 −2 src/java/voldemort/client/rebalance/RebalanceCLI.java
  50. +29 −1 src/java/voldemort/client/rebalance/RebalanceClientConfig.java
  51. +55 −12 src/java/voldemort/client/rebalance/RebalanceClusterPlan.java
  52. +237 −182 src/java/voldemort/client/rebalance/RebalanceController.java
  53. +23 −8 src/java/voldemort/client/rebalance/RebalanceNodePlan.java
  54. +77 −0 src/java/voldemort/client/rebalance/task/DonorBasedRebalanceTask.java
  55. +58 −0 src/java/voldemort/client/rebalance/task/RebalanceTask.java
  56. +47 −45 src/java/voldemort/client/rebalance/{RebalanceTask.java → task/StealerBasedRebalanceTask.java}
  57. +19 −0 src/java/voldemort/cluster/Cluster.java
  58. +2 −1  src/java/voldemort/cluster/Node.java
  59. +3 −0  src/java/voldemort/cluster/failuredetector/AbstractFailureDetector.java
  60. +1 −2  src/java/voldemort/cluster/failuredetector/BasicStoreVerifier.java
  61. +12 −4 src/java/voldemort/cluster/failuredetector/FailureDetectorConfig.java
  62. +25 −3 src/java/voldemort/routing/ConsistentRoutingStrategy.java
  63. +10 −1 src/java/voldemort/routing/ZoneRoutingStrategy.java
  64. +14 −0 src/java/voldemort/server/StoreRepository.java
  65. +62 −23 src/java/voldemort/server/VoldemortConfig.java
  66. +3 −1 src/java/voldemort/server/VoldemortJsvcDaemon.java
  67. +42 −1 src/java/voldemort/server/VoldemortServer.java
  68. +19 −3 src/java/voldemort/server/jmx/JmxService.java
  69. +9 −1 src/java/voldemort/server/protocol/SocketRequestHandlerFactory.java
  70. +177 −35 src/java/voldemort/server/protocol/admin/AdminServiceRequestHandler.java
  71. +2 −0  src/java/voldemort/server/protocol/admin/FetchEntriesStreamRequestHandler.java
  72. +2 −0  src/java/voldemort/server/protocol/admin/FetchKeysStreamRequestHandler.java
  73. +5 −0 src/java/voldemort/server/protocol/admin/UpdatePartitionEntriesStreamRequestHandler.java
  74. +92 −9 src/java/voldemort/server/rebalance/Rebalancer.java
  75. +398 −0 src/java/voldemort/server/rebalance/async/DonorBasedRebalanceAsyncOperation.java
  76. +223 −0 src/java/voldemort/server/rebalance/async/DonorBasedRebalancePusherSlave.java
  77. +60 −0 src/java/voldemort/server/rebalance/async/RebalanceAsyncOperation.java
  78. +72 −89 ...emort/server/rebalance/{RebalanceAsyncOperation.java → async/StealerBasedRebalanceAsyncOperation.java}
  79. +23 −21 src/java/voldemort/server/scheduler/slop/StreamingSlopPusherJob.java
  80. +28 −52 src/java/voldemort/server/{scheduler/slop → storage}/RepairJob.java
  81. +53 −26 src/java/voldemort/server/storage/StorageService.java
  82. +51 −0 src/java/voldemort/store/InsufficientOperationalNodesException.java
  83. +1 −0  src/java/voldemort/store/StoreDefinition.java
  84. +27 −0 src/java/voldemort/store/backup/NativeBackupable.java
  85. +297 −0 src/java/voldemort/store/bdb/BdbNativeBackup.java
  86. +47 −0 src/java/voldemort/store/bdb/BdbRuntimeConfig.java
  87. +15 −17 src/java/voldemort/store/bdb/BdbStorageConfiguration.java
  88. +34 −28 src/java/voldemort/store/bdb/BdbStorageEngine.java
  89. +209 −0 src/java/voldemort/store/bdb/stats/BdbEnvironmentStats.java
  90. +2 −0  src/java/voldemort/store/compress/CompressionStrategyFactory.java
  91. +2 −2 src/java/voldemort/store/compress/LzfCompressionStrategy.java
  92. +34 −0 src/java/voldemort/store/compress/SnappyCompressionStrategy.java
  93. +0 −188 src/java/voldemort/store/compress/lzf/ChunkEncoder.java
  94. +0 −88 src/java/voldemort/store/compress/lzf/LZF.java
  95. +0 −96 src/java/voldemort/store/compress/lzf/LZFChunk.java
  96. +0 −163 src/java/voldemort/store/compress/lzf/LZFDecoder.java
  97. +0 −70 src/java/voldemort/store/compress/lzf/LZFEncoder.java
  98. +0 −5 src/java/voldemort/store/compress/lzf/package.html
  99. +4 −4 src/java/voldemort/store/configuration/ConfigurationStorageEngine.java
  100. +39 −38 src/java/voldemort/store/http/HttpStore.java
  101. +5 −5 src/java/voldemort/store/memory/InMemoryStorageEngine.java
  102. +5 −5 src/java/voldemort/store/mysql/MysqlStorageEngine.java
  103. +97 −42 src/java/voldemort/store/readonly/swapper/HttpStoreSwapper.java
  104. +16 −12 src/java/voldemort/store/readonly/swapper/StoreSwapper.java
  105. +10 −0 src/java/voldemort/store/routed/PipelineData.java
  106. +28 −0 src/java/voldemort/store/routed/PipelineRoutedStore.java
  107. +4 −4 src/java/voldemort/store/routed/ReadRepairer.java
  108. +32 −8 src/java/voldemort/store/routed/action/AbstractConfigureNodes.java
  109. +11 −1 src/java/voldemort/store/routed/action/ConfigureNodes.java
  110. +5 −2 src/java/voldemort/store/routed/action/PerformParallelDeleteRequests.java
  111. +1 −1  src/java/voldemort/store/routed/action/PerformParallelGetAllRequests.java
  112. +5 −2 src/java/voldemort/store/routed/action/PerformParallelPutRequests.java
  113. +11 −2 src/java/voldemort/store/routed/action/PerformParallelRequests.java
  114. +5 −2 src/java/voldemort/store/routed/action/PerformSerialPutRequests.java
  115. +5 −2 src/java/voldemort/store/routed/action/PerformSerialRequests.java
  116. +1 −1  src/java/voldemort/store/slop/HintedHandoff.java
  117. +24 −18 src/java/voldemort/store/socket/SocketStore.java
  118. +10 −0 src/java/voldemort/store/socket/clientrequest/AbstractClientRequest.java
  119. +8 −0 src/java/voldemort/store/socket/clientrequest/BlockingClientRequest.java
  120. +19 −0 src/java/voldemort/store/socket/clientrequest/ClientRequest.java
  121. +7 −3 src/java/voldemort/store/socket/clientrequest/ClientRequestExecutor.java
  122. +1 −1  src/java/voldemort/store/socket/clientrequest/ClientRequestExecutorPool.java
  123. +12 −1 src/java/voldemort/store/stats/RequestCounter.java
  124. +9 −0 src/java/voldemort/store/stats/StoreStats.java
  125. +29 −3 src/java/voldemort/store/stats/StoreStatsJmx.java
  126. +45 −0 src/java/voldemort/utils/CachedCallable.java
  127. +133 −27 src/java/voldemort/utils/Entropy.java
  128. +1 −1  src/java/voldemort/utils/KeyDistributionGenerator.java
  129. +64 −0 src/java/voldemort/utils/KeyLocationValidation.java
  130. +242 −130 src/java/voldemort/utils/RebalanceUtils.java
  131. +108 −0 src/java/voldemort/utils/VoldemortIOUtils.java
  132. +1 −1  src/java/voldemort/versioning/{Occured.java → Occurred.java}
  133. +6 −6 src/java/voldemort/versioning/VectorClock.java
  134. +3 −3 src/java/voldemort/versioning/VectorClockInconsistencyResolver.java
  135. +1 −1  src/java/voldemort/versioning/Version.java
  136. +3 −3 src/java/voldemort/versioning/Versioned.java
  137. +36 −0 src/proto/voldemort-admin.proto
  138. +1 −0  test/common/voldemort/FailureDetectorTestUtils.java
  139. +54 −10 test/common/voldemort/ServerTestUtils.java
  140. +7 −0 test/common/voldemort/VoldemortTestConstants.java
  141. +38 −30 test/common/voldemort/{ → cluster/failuredetector}/MutableStoreVerifier.java
  142. +86 −0 test/common/voldemort/config/ten-node-cluster.xml
  143. +2 −1  test/integration/voldemort/CatBdbStore.java
  144. +1 −2  test/integration/voldemort/cluster/failuredetector/FailureDetectorPerformanceTest.java
  145. +46 −38 test/integration/voldemort/performance/HttpClientBench.java
  146. +35 −24 test/integration/voldemort/performance/RemoteStoreComparisonTest.java
  147. +35 −19 test/integration/voldemort/performance/RequestFileFilter.java
  148. +1 −1  test/integration/voldemort/performance/RoutedStoreParallelismTest.java
  149. +11 −4 test/integration/voldemort/performance/benchmark/Benchmark.java
  150. +65 −7 test/integration/voldemort/performance/benchmark/Workload.java
  151. +18 −0 test/integration/voldemort/rebalance/BootstrapAll.sh
  152. +23 −0 test/integration/voldemort/rebalance/CheckAndRestoreMetadata.sh
  153. +23 −0 test/integration/voldemort/rebalance/DataGen.sh
  154. +24 −0 test/integration/voldemort/rebalance/Deploy.sh
  155. +14 −0 test/integration/voldemort/rebalance/KillAllServers.sh
  156. +53 −0 test/integration/voldemort/rebalance/RandomKillStealer.sh
  157. +102 −0 test/integration/voldemort/rebalance/RandomWaitKillAndVerify.sh
  158. +126 −0 test/integration/voldemort/rebalance/RebalanceBBFail.sh
  159. +11 −0 test/integration/voldemort/rebalance/RestoreKeys.sh
  160. +15 −0 test/integration/voldemort/rebalance/RestoreMetadata.sh
  161. +19 −0 test/integration/voldemort/rebalance/StartRebalanceProcess.sh
  162. +18 −0 test/integration/voldemort/rebalance/StartServer.sh
  163. +20 −0 test/integration/voldemort/rebalance/ValidateData.sh
  164. +24 −0 test/integration/voldemort/rebalance/WaitforOutput.sh
  165. +23 −0 test/integration/voldemort/rebalance/config/test_config1/config/server.properties
  166. +23 −0 test/integration/voldemort/rebalance/config/test_config2/config/server.properties
  167. +23 −0 test/integration/voldemort/rebalance/config/test_config3/config/server.properties
  168. +23 −0 test/integration/voldemort/rebalance/config/test_config4/config/server.properties
  169. +23 −0 test/integration/voldemort/rebalance/config/test_config5/config/server.properties
  170. +23 −0 test/integration/voldemort/rebalance/config/test_config6/config/server.properties
  171. +23 −0 test/integration/voldemort/rebalance/gen.sh
  172. +21 −0 test/integration/voldemort/rebalance/initWorkloadGen.sh
  173. +65 −0 test/integration/voldemort/rebalance/metadata/final-cluster.xml
  174. +65 −0 test/integration/voldemort/rebalance/metadata/initial-cluster.xml
  175. +32 −0 test/integration/voldemort/rebalance/metadata/stores.xml
  176. +47 −0 test/integration/voldemort/rebalance/metadata/target-cluster.xml
  177. +48 −0 test/integration/voldemort/rebalance/metadata/voldemort-server.sh
  178. +48 −0 test/integration/voldemort/rebalance/setup_env.inc
  179. +1 −4 test/unit/voldemort/client/AdminServiceBasicTest.java
  180. +10 −2 test/unit/voldemort/client/HttpStoreClientFactoryTest.java
  181. +301 −14 test/unit/voldemort/client/rebalance/AbstractRebalanceTest.java
  182. +7 −21 test/unit/voldemort/client/rebalance/AdminRebalanceTest.java
  183. +233 −101 test/unit/voldemort/client/rebalance/RebalanceClusterPlanTest.java
  184. +9 −2 test/unit/voldemort/client/rebalance/RebalanceTest.java
  185. +1 −1  test/unit/voldemort/cluster/TestCluster.java
  186. +1 −1  test/unit/voldemort/cluster/failuredetector/BannagePeriodFailureDetectorTest.java
  187. +20 −3 test/unit/voldemort/cluster/failuredetector/ThresholdFailureDetectorTest.java
  188. +0 −218 test/unit/voldemort/scheduled/RepairTest.java
  189. +126 −0 test/unit/voldemort/scheduled/StreamingSlopPusherTest.java
  190. +5 −5 test/unit/voldemort/server/EndToEndTest.java
  191. +2 −2 test/unit/voldemort/store/bdb/BdbSplitStorageEngineTest.java
  192. +55 −8 test/unit/voldemort/store/bdb/BdbStorageEngineTest.java
  193. +1 −1  test/unit/voldemort/store/compress/CompressingStoreTest.java
  194. +2 −0  test/unit/voldemort/store/compress/lzf/TestLZF.java
  195. +28 −5 test/unit/voldemort/store/http/HttpStoreTest.java
  196. +22 −16 test/unit/voldemort/store/readonly/swapper/StoreSwapperTest.java
  197. +1 −4 test/unit/voldemort/store/rebalancing/RedirectingStoreTest.java
  198. +1 −1  test/unit/voldemort/store/routed/HintedHandoffTest.java
  199. +1 −1  test/unit/voldemort/store/routed/ReadRepairerTest.java
  200. +57 −6 test/unit/voldemort/store/routed/RoutedStoreTest.java
  201. +10 −0 test/unit/voldemort/store/stats/StoreStatsJmxTest.java
  202. +58 −0 test/unit/voldemort/utils/CachedCallableTest.java
  203. +52 −0 test/unit/voldemort/utils/VoldemortIOUtilsTest.java
  204. +2,562 −0 test/unit/voldemort/utils/Xtranslcl.c.input
  205. +7 −0 test/unit/voldemort/utils/maze.c.input
  206. +7 −7 test/unit/voldemort/versioning/VectorClockTest.java
View
9 .classpath
@@ -12,11 +12,11 @@
<classpathentry kind="src" path="example/java"/>
<classpathentry kind="src" path="contrib/krati/src/java"/>
<classpathentry kind="src" path="contrib/krati/test"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="src" path="contrib/collections/src/java"/>
+ <classpathentry kind="src" path="contrib/collections/test"/>
<classpathentry kind="lib" path="lib/catalina-ant.jar"/>
<classpathentry kind="lib" path="lib/commons-codec-1.3.jar"/>
<classpathentry kind="lib" path="lib/commons-dbcp-1.2.2.jar"/>
- <classpathentry kind="lib" path="lib/commons-httpclient-3.1.jar"/>
<classpathentry kind="lib" path="lib/colt-1.2.0.jar"/>
<classpathentry kind="lib" path="contrib/hadoop-store-builder/lib/commons-cli-2.0-SNAPSHOT.jar"/>
<classpathentry kind="lib" path="contrib/hadoop-store-builder/lib/hadoop-0.20.2-core.jar"/>
@@ -49,5 +49,10 @@
<classpathentry kind="lib" path="lib/mockito-all-1.8.5.jar"/>
<classpathentry kind="lib" path="lib/avro-1.4.0.jar"/>
<classpathentry kind="lib" path="lib/libthrift-0.5.0.jar"/>
+ <classpathentry kind="lib" path="lib/compress-lzf-0.9.1.jar"/>
+ <classpathentry kind="lib" path="lib/snappy-0.2.jar"/>
+ <classpathentry kind="lib" path="lib/httpclient-4.1.2.jar" />
+ <classpathentry kind="lib" path="lib/httpcore-4.1.2.jar" />
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="output" path="classes"/>
</classpath>
View
2  .gitignore
@@ -6,8 +6,10 @@ dist
*.iws
*#
.#*
+test-output
node.id
rebalancing.slave.list
server.state
.version
.temp
+.idea
View
7 .settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Fri Sep 18 15:20:52 BST 2009
+#Fri Dec 30 14:37:10 PST 2011
eclipse.preferences.version=1
org.eclipse.jdt.core.codeComplete.argumentPrefixes=
org.eclipse.jdt.core.codeComplete.argumentSuffixes=
@@ -149,9 +149,12 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
View
1  CONTRIBUTORS
@@ -12,6 +12,7 @@ Eric Evans
Geir Magnusson Jr.
Ismael Juma
Jakob Homan
+James Roper
Janne Hietamäki
Jay Kreps
Jonathan Traupman
View
6 NOTES
@@ -17,13 +17,13 @@ Commands:
put key value -- Associate the given value with the key.
get key -- Retrieve the value associated with the key.
delete key -- Remove all values associated with the key.
-locate key -- Determine which servers host the give key.
+preflist key -- Get node preference list for given key.
help -- Print this message.
exit -- Exit from this shell.
> put "hello" "there"
> get "hello"
version(0:1): "there"
-> locate "hello"
+> preflist "hello"
Node 0
host: localhost
port: 6666
@@ -71,4 +71,4 @@ Socket servers share threadpool?
A WireProtocol takes bytes and creates a voldemort request, and takes objects to create a voldemort response.
Likewise the client does the opposite
-Connector.handleRequest()
+Connector.handleRequest()
View
4 bin/voldemort-server.sh
@@ -16,9 +16,9 @@
# limitations under the License.
#
-if [ $# -gt 1 ];
+if [ $# -gt 2 ];
then
- echo 'USAGE: bin/voldemort-server.sh [voldemort_home]'
+ echo 'USAGE: bin/voldemort-server.sh [voldemort_home] [voldemort_config_dir]'
exit 1
fi
View
2  build.properties
@@ -34,4 +34,4 @@ tomcat.manager.password=tomcat
tomcat.context=/voldemort
## Release
-curr.release=0.90
+curr.release=0.90.1
View
389 clients/python/voldemort/protocol/voldemort_admin_pb2.py
@@ -10,7 +10,7 @@
DESCRIPTOR = descriptor.FileDescriptor(
name='voldemort-admin.proto',
package='voldemort',
- serialized_pb='\n\x15voldemort-admin.proto\x12\tvoldemort\x1a\x16voldemort-client.proto\"!\n\x12GetMetadataRequest\x12\x0b\n\x03key\x18\x01 \x02(\x0c\"]\n\x13GetMetadataResponse\x12%\n\x07version\x18\x01 \x01(\x0b\x32\x14.voldemort.Versioned\x12\x1f\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x10.voldemort.Error\"M\n\x15UpdateMetadataRequest\x12\x0b\n\x03key\x18\x01 \x02(\x0c\x12\'\n\tversioned\x18\x02 \x02(\x0b\x32\x14.voldemort.Versioned\"9\n\x16UpdateMetadataResponse\x12\x1f\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x10.voldemort.Error\"7\n\tFileEntry\x12\x11\n\tfile_name\x18\x01 \x02(\t\x12\x17\n\x0f\x66ile_size_bytes\x18\x02 \x02(\x03\"F\n\x0ePartitionEntry\x12\x0b\n\x03key\x18\x01 \x02(\x0c\x12\'\n\tversioned\x18\x02 \x02(\x0b\x32\x14.voldemort.Versioned\"\x8e\x01\n\x1dUpdatePartitionEntriesRequest\x12\r\n\x05store\x18\x01 \x02(\t\x12\x32\n\x0fpartition_entry\x18\x02 \x02(\x0b\x32\x19.voldemort.PartitionEntry\x12*\n\x06\x66ilter\x18\x03 \x01(\x0b\x32\x1a.voldemort.VoldemortFilter\"A\n\x1eUpdatePartitionEntriesResponse\x12\x1f\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x10.voldemort.Error\"-\n\x0fVoldemortFilter\x12\x0c\n\x04name\x18\x01 \x02(\t\x12\x0c\n\x04\x64\x61ta\x18\x02 \x02(\x0c\"\xaf\x01\n\x18UpdateSlopEntriesRequest\x12\r\n\x05store\x18\x01 \x02(\t\x12\x0b\n\x03key\x18\x02 \x02(\x0c\x12\'\n\x07version\x18\x03 \x02(\x0b\x32\x16.voldemort.VectorClock\x12,\n\x0crequest_type\x18\x04 \x02(\x0e\x32\x16.voldemort.RequestType\x12\r\n\x05value\x18\x05 \x01(\x0c\x12\x11\n\ttransform\x18\x06 \x01(\x0c\"<\n\x19UpdateSlopEntriesResponse\x12\x1f\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x10.voldemort.Error\"d\n\x1a\x46\x65tchPartitionFilesRequest\x12\r\n\x05store\x18\x01 \x02(\t\x12\x37\n\x14replica_to_partition\x18\x02 \x03(\x0b\x32\x19.voldemort.PartitionTuple\"\xd7\x01\n\x1c\x46\x65tchPartitionEntriesRequest\x12\x37\n\x14replica_to_partition\x18\x01 \x03(\x0b\x32\x19.voldemort.PartitionTuple\x12\r\n\x05store\x18\x02 \x02(\t\x12*\n\x06\x66ilter\x18\x03 \x01(\x0b\x32\x1a.voldemort.VoldemortFilter\x12\x14\n\x0c\x66\x65tch_values\x18\x04 \x01(\x08\x12\x14\n\x0cskip_records\x18\x05 \x01(\x03\x12\x17\n\x0finitial_cluster\x18\x06 \x01(\t\"\x81\x01\n\x1d\x46\x65tchPartitionEntriesResponse\x12\x32\n\x0fpartition_entry\x18\x01 \x01(\x0b\x32\x19.voldemort.PartitionEntry\x12\x0b\n\x03key\x18\x02 \x01(\x0c\x12\x1f\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x10.voldemort.Error\"\xac\x01\n\x1d\x44\x65letePartitionEntriesRequest\x12\r\n\x05store\x18\x01 \x02(\t\x12\x37\n\x14replica_to_partition\x18\x02 \x03(\x0b\x32\x19.voldemort.PartitionTuple\x12*\n\x06\x66ilter\x18\x03 \x01(\x0b\x32\x1a.voldemort.VoldemortFilter\x12\x17\n\x0finitial_cluster\x18\x04 \x01(\t\"P\n\x1e\x44\x65letePartitionEntriesResponse\x12\r\n\x05\x63ount\x18\x01 \x01(\x03\x12\x1f\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x10.voldemort.Error\"\xcf\x01\n\x1dInitiateFetchAndUpdateRequest\x12\x0f\n\x07node_id\x18\x01 \x02(\x05\x12\r\n\x05store\x18\x02 \x02(\t\x12*\n\x06\x66ilter\x18\x03 \x01(\x0b\x32\x1a.voldemort.VoldemortFilter\x12\x37\n\x14replica_to_partition\x18\x04 \x03(\x0b\x32\x19.voldemort.PartitionTuple\x12\x17\n\x0finitial_cluster\x18\x05 \x01(\t\x12\x10\n\x08optimize\x18\x06 \x01(\x08\"1\n\x1b\x41syncOperationStatusRequest\x12\x12\n\nrequest_id\x18\x01 \x02(\x05\"/\n\x19\x41syncOperationStopRequest\x12\x12\n\nrequest_id\x18\x01 \x02(\x05\"=\n\x1a\x41syncOperationStopResponse\x12\x1f\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x10.voldemort.Error\"2\n\x19\x41syncOperationListRequest\x12\x15\n\rshow_complete\x18\x02 \x02(\x08\"R\n\x1a\x41syncOperationListResponse\x12\x13\n\x0brequest_ids\x18\x01 \x03(\x05\x12\x1f\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x10.voldemort.Error\":\n\x0ePartitionTuple\x12\x14\n\x0creplica_type\x18\x01 \x02(\x05\x12\x12\n\npartitions\x18\x02 \x03(\x05\"e\n\x16PerStorePartitionTuple\x12\x12\n\nstore_name\x18\x01 \x02(\t\x12\x37\n\x14replica_to_partition\x18\x02 \x03(\x0b\x32\x19.voldemort.PartitionTuple\"\xf8\x01\n\x19RebalancePartitionInfoMap\x12\x12\n\nstealer_id\x18\x01 \x02(\x05\x12\x10\n\x08\x64onor_id\x18\x02 \x02(\x05\x12\x0f\n\x07\x61ttempt\x18\x03 \x02(\x05\x12\x43\n\x18replica_to_add_partition\x18\x04 \x03(\x0b\x32!.voldemort.PerStorePartitionTuple\x12\x46\n\x1breplica_to_delete_partition\x18\x05 \x03(\x0b\x32!.voldemort.PerStorePartitionTuple\x12\x17\n\x0finitial_cluster\x18\x06 \x02(\t\"f\n\x1cInitiateRebalanceNodeRequest\x12\x46\n\x18rebalance_partition_info\x18\x01 \x02(\x0b\x32$.voldemort.RebalancePartitionInfoMap\"\x8a\x01\n\x1c\x41syncOperationStatusResponse\x12\x12\n\nrequest_id\x18\x01 \x01(\x05\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0e\n\x06status\x18\x03 \x01(\t\x12\x10\n\x08\x63omplete\x18\x04 \x01(\x08\x12\x1f\n\x05\x65rror\x18\x05 \x01(\x0b\x32\x10.voldemort.Error\"\'\n\x16TruncateEntriesRequest\x12\r\n\x05store\x18\x01 \x02(\t\":\n\x17TruncateEntriesResponse\x12\x1f\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x10.voldemort.Error\"*\n\x0f\x41\x64\x64StoreRequest\x12\x17\n\x0fstoreDefinition\x18\x01 \x02(\t\"3\n\x10\x41\x64\x64StoreResponse\x12\x1f\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x10.voldemort.Error\"\'\n\x12\x44\x65leteStoreRequest\x12\x11\n\tstoreName\x18\x01 \x02(\t\"6\n\x13\x44\x65leteStoreResponse\x12\x1f\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x10.voldemort.Error\"P\n\x11\x46\x65tchStoreRequest\x12\x12\n\nstore_name\x18\x01 \x02(\t\x12\x11\n\tstore_dir\x18\x02 \x02(\t\x12\x14\n\x0cpush_version\x18\x03 \x01(\x03\"9\n\x10SwapStoreRequest\x12\x12\n\nstore_name\x18\x01 \x02(\t\x12\x11\n\tstore_dir\x18\x02 \x02(\t\"P\n\x11SwapStoreResponse\x12\x1f\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x10.voldemort.Error\x12\x1a\n\x12previous_store_dir\x18\x02 \x01(\t\"@\n\x14RollbackStoreRequest\x12\x12\n\nstore_name\x18\x01 \x02(\t\x12\x14\n\x0cpush_version\x18\x02 \x02(\x03\"8\n\x15RollbackStoreResponse\x12\x1f\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x10.voldemort.Error\"=\n\x14ROStoreVersionDirMap\x12\x12\n\nstore_name\x18\x01 \x02(\t\x12\x11\n\tstore_dir\x18\x02 \x02(\t\"/\n\x19GetROMaxVersionDirRequest\x12\x12\n\nstore_name\x18\x01 \x03(\t\"y\n\x1aGetROMaxVersionDirResponse\x12:\n\x11ro_store_versions\x18\x01 \x03(\x0b\x32\x1f.voldemort.ROStoreVersionDirMap\x12\x1f\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x10.voldemort.Error\"3\n\x1dGetROCurrentVersionDirRequest\x12\x12\n\nstore_name\x18\x01 \x03(\t\"}\n\x1eGetROCurrentVersionDirResponse\x12:\n\x11ro_store_versions\x18\x01 \x03(\x0b\x32\x1f.voldemort.ROStoreVersionDirMap\x12\x1f\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x10.voldemort.Error\"/\n\x19GetROStorageFormatRequest\x12\x12\n\nstore_name\x18\x01 \x03(\t\"y\n\x1aGetROStorageFormatResponse\x12:\n\x11ro_store_versions\x18\x01 \x03(\x0b\x32\x1f.voldemort.ROStoreVersionDirMap\x12\x1f\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x10.voldemort.Error\"@\n\x17\x46\x61iledFetchStoreRequest\x12\x12\n\nstore_name\x18\x01 \x02(\t\x12\x11\n\tstore_dir\x18\x02 \x02(\t\";\n\x18\x46\x61iledFetchStoreResponse\x12\x1f\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x10.voldemort.Error\"\xe6\x01\n\x1bRebalanceStateChangeRequest\x12K\n\x1drebalance_partition_info_list\x18\x01 \x03(\x0b\x32$.voldemort.RebalancePartitionInfoMap\x12\x16\n\x0e\x63luster_string\x18\x02 \x02(\t\x12\x0f\n\x07swap_ro\x18\x03 \x02(\x08\x12\x1f\n\x17\x63hange_cluster_metadata\x18\x04 \x02(\x08\x12\x1e\n\x16\x63hange_rebalance_state\x18\x05 \x02(\x08\x12\x10\n\x08rollback\x18\x06 \x02(\x08\"?\n\x1cRebalanceStateChangeResponse\x12\x1f\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x10.voldemort.Error\"\xa2\x0c\n\x15VoldemortAdminRequest\x12)\n\x04type\x18\x01 \x02(\x0e\x32\x1b.voldemort.AdminRequestType\x12\x33\n\x0cget_metadata\x18\x02 \x01(\x0b\x32\x1d.voldemort.GetMetadataRequest\x12\x39\n\x0fupdate_metadata\x18\x03 \x01(\x0b\x32 .voldemort.UpdateMetadataRequest\x12J\n\x18update_partition_entries\x18\x04 \x01(\x0b\x32(.voldemort.UpdatePartitionEntriesRequest\x12H\n\x17\x66\x65tch_partition_entries\x18\x05 \x01(\x0b\x32\'.voldemort.FetchPartitionEntriesRequest\x12J\n\x18\x64\x65lete_partition_entries\x18\x06 \x01(\x0b\x32(.voldemort.DeletePartitionEntriesRequest\x12K\n\x19initiate_fetch_and_update\x18\x07 \x01(\x0b\x32(.voldemort.InitiateFetchAndUpdateRequest\x12\x46\n\x16\x61sync_operation_status\x18\x08 \x01(\x0b\x32&.voldemort.AsyncOperationStatusRequest\x12H\n\x17initiate_rebalance_node\x18\t \x01(\x0b\x32\'.voldemort.InitiateRebalanceNodeRequest\x12\x42\n\x14\x61sync_operation_stop\x18\n \x01(\x0b\x32$.voldemort.AsyncOperationStopRequest\x12\x42\n\x14\x61sync_operation_list\x18\x0b \x01(\x0b\x32$.voldemort.AsyncOperationListRequest\x12;\n\x10truncate_entries\x18\x0c \x01(\x0b\x32!.voldemort.TruncateEntriesRequest\x12-\n\tadd_store\x18\r \x01(\x0b\x32\x1a.voldemort.AddStoreRequest\x12\x33\n\x0c\x64\x65lete_store\x18\x0e \x01(\x0b\x32\x1d.voldemort.DeleteStoreRequest\x12\x31\n\x0b\x66\x65tch_store\x18\x0f \x01(\x0b\x32\x1c.voldemort.FetchStoreRequest\x12/\n\nswap_store\x18\x10 \x01(\x0b\x32\x1b.voldemort.SwapStoreRequest\x12\x37\n\x0erollback_store\x18\x11 \x01(\x0b\x32\x1f.voldemort.RollbackStoreRequest\x12\x44\n\x16get_ro_max_version_dir\x18\x12 \x01(\x0b\x32$.voldemort.GetROMaxVersionDirRequest\x12L\n\x1aget_ro_current_version_dir\x18\x13 \x01(\x0b\x32(.voldemort.GetROCurrentVersionDirRequest\x12\x44\n\x15\x66\x65tch_partition_files\x18\x14 \x01(\x0b\x32%.voldemort.FetchPartitionFilesRequest\x12@\n\x13update_slop_entries\x18\x16 \x01(\x0b\x32#.voldemort.UpdateSlopEntriesRequest\x12>\n\x12\x66\x61iled_fetch_store\x18\x18 \x01(\x0b\x32\".voldemort.FailedFetchStoreRequest\x12\x43\n\x15get_ro_storage_format\x18\x19 \x01(\x0b\x32$.voldemort.GetROStorageFormatRequest\x12\x46\n\x16rebalance_state_change\x18\x1a \x01(\x0b\x32&.voldemort.RebalanceStateChangeRequest*\xc9\x04\n\x10\x41\x64minRequestType\x12\x10\n\x0cGET_METADATA\x10\x00\x12\x13\n\x0fUPDATE_METADATA\x10\x01\x12\x1c\n\x18UPDATE_PARTITION_ENTRIES\x10\x02\x12\x1b\n\x17\x46\x45TCH_PARTITION_ENTRIES\x10\x03\x12\x1c\n\x18\x44\x45LETE_PARTITION_ENTRIES\x10\x04\x12\x1d\n\x19INITIATE_FETCH_AND_UPDATE\x10\x05\x12\x1a\n\x16\x41SYNC_OPERATION_STATUS\x10\x06\x12\x1b\n\x17INITIATE_REBALANCE_NODE\x10\x07\x12\x18\n\x14\x41SYNC_OPERATION_STOP\x10\x08\x12\x18\n\x14\x41SYNC_OPERATION_LIST\x10\t\x12\x14\n\x10TRUNCATE_ENTRIES\x10\n\x12\r\n\tADD_STORE\x10\x0b\x12\x10\n\x0c\x44\x45LETE_STORE\x10\x0c\x12\x0f\n\x0b\x46\x45TCH_STORE\x10\r\x12\x0e\n\nSWAP_STORE\x10\x0e\x12\x12\n\x0eROLLBACK_STORE\x10\x0f\x12\x1a\n\x16GET_RO_MAX_VERSION_DIR\x10\x10\x12\x1e\n\x1aGET_RO_CURRENT_VERSION_DIR\x10\x11\x12\x19\n\x15\x46\x45TCH_PARTITION_FILES\x10\x12\x12\x17\n\x13UPDATE_SLOP_ENTRIES\x10\x14\x12\x16\n\x12\x46\x41ILED_FETCH_STORE\x10\x16\x12\x19\n\x15GET_RO_STORAGE_FORMAT\x10\x17\x12\x1a\n\x16REBALANCE_STATE_CHANGE\x10\x18\x42-\n\x1cvoldemort.client.protocol.pbB\x0bVAdminProtoH\x01')
+ serialized_pb='\n\x15voldemort-admin.proto\x12\tvoldemort\x1a\x16voldemort-client.proto\"!\n\x12GetMetadataRequest\x12\x0b\n\x03key\x18\x01 \x02(\x0c\"]\n\x13GetMetadataResponse\x12%\n\x07version\x18\x01 \x01(\x0b\x32\x14.voldemort.Versioned\x12\x1f\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x10.voldemort.Error\"M\n\x15UpdateMetadataRequest\x12\x0b\n\x03key\x18\x01 \x02(\x0c\x12\'\n\tversioned\x18\x02 \x02(\x0b\x32\x14.voldemort.Versioned\"9\n\x16UpdateMetadataResponse\x12\x1f\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x10.voldemort.Error\"7\n\tFileEntry\x12\x11\n\tfile_name\x18\x01 \x02(\t\x12\x17\n\x0f\x66ile_size_bytes\x18\x02 \x02(\x03\"F\n\x0ePartitionEntry\x12\x0b\n\x03key\x18\x01 \x02(\x0c\x12\'\n\tversioned\x18\x02 \x02(\x0b\x32\x14.voldemort.Versioned\"\x8e\x01\n\x1dUpdatePartitionEntriesRequest\x12\r\n\x05store\x18\x01 \x02(\t\x12\x32\n\x0fpartition_entry\x18\x02 \x02(\x0b\x32\x19.voldemort.PartitionEntry\x12*\n\x06\x66ilter\x18\x03 \x01(\x0b\x32\x1a.voldemort.VoldemortFilter\"A\n\x1eUpdatePartitionEntriesResponse\x12\x1f\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x10.voldemort.Error\"-\n\x0fVoldemortFilter\x12\x0c\n\x04name\x18\x01 \x02(\t\x12\x0c\n\x04\x64\x61ta\x18\x02 \x02(\x0c\"\xaf\x01\n\x18UpdateSlopEntriesRequest\x12\r\n\x05store\x18\x01 \x02(\t\x12\x0b\n\x03key\x18\x02 \x02(\x0c\x12\'\n\x07version\x18\x03 \x02(\x0b\x32\x16.voldemort.VectorClock\x12,\n\x0crequest_type\x18\x04 \x02(\x0e\x32\x16.voldemort.RequestType\x12\r\n\x05value\x18\x05 \x01(\x0c\x12\x11\n\ttransform\x18\x06 \x01(\x0c\"<\n\x19UpdateSlopEntriesResponse\x12\x1f\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x10.voldemort.Error\"d\n\x1a\x46\x65tchPartitionFilesRequest\x12\r\n\x05store\x18\x01 \x02(\t\x12\x37\n\x14replica_to_partition\x18\x02 \x03(\x0b\x32\x19.voldemort.PartitionTuple\"\xd7\x01\n\x1c\x46\x65tchPartitionEntriesRequest\x12\x37\n\x14replica_to_partition\x18\x01 \x03(\x0b\x32\x19.voldemort.PartitionTuple\x12\r\n\x05store\x18\x02 \x02(\t\x12*\n\x06\x66ilter\x18\x03 \x01(\x0b\x32\x1a.voldemort.VoldemortFilter\x12\x14\n\x0c\x66\x65tch_values\x18\x04 \x01(\x08\x12\x14\n\x0cskip_records\x18\x05 \x01(\x03\x12\x17\n\x0finitial_cluster\x18\x06 \x01(\t\"\x81\x01\n\x1d\x46\x65tchPartitionEntriesResponse\x12\x32\n\x0fpartition_entry\x18\x01 \x01(\x0b\x32\x19.voldemort.PartitionEntry\x12\x0b\n\x03key\x18\x02 \x01(\x0c\x12\x1f\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x10.voldemort.Error\"\xac\x01\n\x1d\x44\x65letePartitionEntriesRequest\x12\r\n\x05store\x18\x01 \x02(\t\x12\x37\n\x14replica_to_partition\x18\x02 \x03(\x0b\x32\x19.voldemort.PartitionTuple\x12*\n\x06\x66ilter\x18\x03 \x01(\x0b\x32\x1a.voldemort.VoldemortFilter\x12\x17\n\x0finitial_cluster\x18\x04 \x01(\t\"P\n\x1e\x44\x65letePartitionEntriesResponse\x12\r\n\x05\x63ount\x18\x01 \x01(\x03\x12\x1f\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x10.voldemort.Error\"\xcf\x01\n\x1dInitiateFetchAndUpdateRequest\x12\x0f\n\x07node_id\x18\x01 \x02(\x05\x12\r\n\x05store\x18\x02 \x02(\t\x12*\n\x06\x66ilter\x18\x03 \x01(\x0b\x32\x1a.voldemort.VoldemortFilter\x12\x37\n\x14replica_to_partition\x18\x04 \x03(\x0b\x32\x19.voldemort.PartitionTuple\x12\x17\n\x0finitial_cluster\x18\x05 \x01(\t\x12\x10\n\x08optimize\x18\x06 \x01(\x08\"1\n\x1b\x41syncOperationStatusRequest\x12\x12\n\nrequest_id\x18\x01 \x02(\x05\"/\n\x19\x41syncOperationStopRequest\x12\x12\n\nrequest_id\x18\x01 \x02(\x05\"=\n\x1a\x41syncOperationStopResponse\x12\x1f\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x10.voldemort.Error\"2\n\x19\x41syncOperationListRequest\x12\x15\n\rshow_complete\x18\x02 \x02(\x08\"R\n\x1a\x41syncOperationListResponse\x12\x13\n\x0brequest_ids\x18\x01 \x03(\x05\x12\x1f\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x10.voldemort.Error\":\n\x0ePartitionTuple\x12\x14\n\x0creplica_type\x18\x01 \x02(\x05\x12\x12\n\npartitions\x18\x02 \x03(\x05\"e\n\x16PerStorePartitionTuple\x12\x12\n\nstore_name\x18\x01 \x02(\t\x12\x37\n\x14replica_to_partition\x18\x02 \x03(\x0b\x32\x19.voldemort.PartitionTuple\"\xf8\x01\n\x19RebalancePartitionInfoMap\x12\x12\n\nstealer_id\x18\x01 \x02(\x05\x12\x10\n\x08\x64onor_id\x18\x02 \x02(\x05\x12\x0f\n\x07\x61ttempt\x18\x03 \x02(\x05\x12\x43\n\x18replica_to_add_partition\x18\x04 \x03(\x0b\x32!.voldemort.PerStorePartitionTuple\x12\x46\n\x1breplica_to_delete_partition\x18\x05 \x03(\x0b\x32!.voldemort.PerStorePartitionTuple\x12\x17\n\x0finitial_cluster\x18\x06 \x02(\t\"f\n\x1cInitiateRebalanceNodeRequest\x12\x46\n\x18rebalance_partition_info\x18\x01 \x02(\x0b\x32$.voldemort.RebalancePartitionInfoMap\"m\n#InitiateRebalanceNodeOnDonorRequest\x12\x46\n\x18rebalance_partition_info\x18\x01 \x03(\x0b\x32$.voldemort.RebalancePartitionInfoMap\"\x8a\x01\n\x1c\x41syncOperationStatusResponse\x12\x12\n\nrequest_id\x18\x01 \x01(\x05\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0e\n\x06status\x18\x03 \x01(\t\x12\x10\n\x08\x63omplete\x18\x04 \x01(\x08\x12\x1f\n\x05\x65rror\x18\x05 \x01(\x0b\x32\x10.voldemort.Error\"\'\n\x16TruncateEntriesRequest\x12\r\n\x05store\x18\x01 \x02(\t\":\n\x17TruncateEntriesResponse\x12\x1f\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x10.voldemort.Error\"*\n\x0f\x41\x64\x64StoreRequest\x12\x17\n\x0fstoreDefinition\x18\x01 \x02(\t\"3\n\x10\x41\x64\x64StoreResponse\x12\x1f\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x10.voldemort.Error\"\'\n\x12\x44\x65leteStoreRequest\x12\x11\n\tstoreName\x18\x01 \x02(\t\"6\n\x13\x44\x65leteStoreResponse\x12\x1f\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x10.voldemort.Error\"P\n\x11\x46\x65tchStoreRequest\x12\x12\n\nstore_name\x18\x01 \x02(\t\x12\x11\n\tstore_dir\x18\x02 \x02(\t\x12\x14\n\x0cpush_version\x18\x03 \x01(\x03\"9\n\x10SwapStoreRequest\x12\x12\n\nstore_name\x18\x01 \x02(\t\x12\x11\n\tstore_dir\x18\x02 \x02(\t\"P\n\x11SwapStoreResponse\x12\x1f\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x10.voldemort.Error\x12\x1a\n\x12previous_store_dir\x18\x02 \x01(\t\"@\n\x14RollbackStoreRequest\x12\x12\n\nstore_name\x18\x01 \x02(\t\x12\x14\n\x0cpush_version\x18\x02 \x02(\x03\"8\n\x15RollbackStoreResponse\x12\x1f\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x10.voldemort.Error\"&\n\x10RepairJobRequest\x12\x12\n\nstore_name\x18\x01 \x01(\t\"4\n\x11RepairJobResponse\x12\x1f\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x10.voldemort.Error\"=\n\x14ROStoreVersionDirMap\x12\x12\n\nstore_name\x18\x01 \x02(\t\x12\x11\n\tstore_dir\x18\x02 \x02(\t\"/\n\x19GetROMaxVersionDirRequest\x12\x12\n\nstore_name\x18\x01 \x03(\t\"y\n\x1aGetROMaxVersionDirResponse\x12:\n\x11ro_store_versions\x18\x01 \x03(\x0b\x32\x1f.voldemort.ROStoreVersionDirMap\x12\x1f\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x10.voldemort.Error\"3\n\x1dGetROCurrentVersionDirRequest\x12\x12\n\nstore_name\x18\x01 \x03(\t\"}\n\x1eGetROCurrentVersionDirResponse\x12:\n\x11ro_store_versions\x18\x01 \x03(\x0b\x32\x1f.voldemort.ROStoreVersionDirMap\x12\x1f\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x10.voldemort.Error\"/\n\x19GetROStorageFormatRequest\x12\x12\n\nstore_name\x18\x01 \x03(\t\"y\n\x1aGetROStorageFormatResponse\x12:\n\x11ro_store_versions\x18\x01 \x03(\x0b\x32\x1f.voldemort.ROStoreVersionDirMap\x12\x1f\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x10.voldemort.Error\"@\n\x17\x46\x61iledFetchStoreRequest\x12\x12\n\nstore_name\x18\x01 \x02(\t\x12\x11\n\tstore_dir\x18\x02 \x02(\t\";\n\x18\x46\x61iledFetchStoreResponse\x12\x1f\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x10.voldemort.Error\"\xe6\x01\n\x1bRebalanceStateChangeRequest\x12K\n\x1drebalance_partition_info_list\x18\x01 \x03(\x0b\x32$.voldemort.RebalancePartitionInfoMap\x12\x16\n\x0e\x63luster_string\x18\x02 \x02(\t\x12\x0f\n\x07swap_ro\x18\x03 \x02(\x08\x12\x1f\n\x17\x63hange_cluster_metadata\x18\x04 \x02(\x08\x12\x1e\n\x16\x63hange_rebalance_state\x18\x05 \x02(\x08\x12\x10\n\x08rollback\x18\x06 \x02(\x08\"?\n\x1cRebalanceStateChangeResponse\x12\x1f\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x10.voldemort.Error\"G\n DeleteStoreRebalanceStateRequest\x12\x12\n\nstore_name\x18\x01 \x02(\t\x12\x0f\n\x07node_id\x18\x02 \x02(\x05\"D\n!DeleteStoreRebalanceStateResponse\x12\x1f\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x10.voldemort.Error\"h\n\x13NativeBackupRequest\x12\x12\n\nstore_name\x18\x01 \x02(\t\x12\x12\n\nbackup_dir\x18\x02 \x02(\t\x12\x14\n\x0cverify_files\x18\x03 \x02(\x08\x12\x13\n\x0bincremental\x18\x04 \x02(\x08\"\xb7\x0e\n\x15VoldemortAdminRequest\x12)\n\x04type\x18\x01 \x02(\x0e\x32\x1b.voldemort.AdminRequestType\x12\x33\n\x0cget_metadata\x18\x02 \x01(\x0b\x32\x1d.voldemort.GetMetadataRequest\x12\x39\n\x0fupdate_metadata\x18\x03 \x01(\x0b\x32 .voldemort.UpdateMetadataRequest\x12J\n\x18update_partition_entries\x18\x04 \x01(\x0b\x32(.voldemort.UpdatePartitionEntriesRequest\x12H\n\x17\x66\x65tch_partition_entries\x18\x05 \x01(\x0b\x32\'.voldemort.FetchPartitionEntriesRequest\x12J\n\x18\x64\x65lete_partition_entries\x18\x06 \x01(\x0b\x32(.voldemort.DeletePartitionEntriesRequest\x12K\n\x19initiate_fetch_and_update\x18\x07 \x01(\x0b\x32(.voldemort.InitiateFetchAndUpdateRequest\x12\x46\n\x16\x61sync_operation_status\x18\x08 \x01(\x0b\x32&.voldemort.AsyncOperationStatusRequest\x12H\n\x17initiate_rebalance_node\x18\t \x01(\x0b\x32\'.voldemort.InitiateRebalanceNodeRequest\x12\x42\n\x14\x61sync_operation_stop\x18\n \x01(\x0b\x32$.voldemort.AsyncOperationStopRequest\x12\x42\n\x14\x61sync_operation_list\x18\x0b \x01(\x0b\x32$.voldemort.AsyncOperationListRequest\x12;\n\x10truncate_entries\x18\x0c \x01(\x0b\x32!.voldemort.TruncateEntriesRequest\x12-\n\tadd_store\x18\r \x01(\x0b\x32\x1a.voldemort.AddStoreRequest\x12\x33\n\x0c\x64\x65lete_store\x18\x0e \x01(\x0b\x32\x1d.voldemort.DeleteStoreRequest\x12\x31\n\x0b\x66\x65tch_store\x18\x0f \x01(\x0b\x32\x1c.voldemort.FetchStoreRequest\x12/\n\nswap_store\x18\x10 \x01(\x0b\x32\x1b.voldemort.SwapStoreRequest\x12\x37\n\x0erollback_store\x18\x11 \x01(\x0b\x32\x1f.voldemort.RollbackStoreRequest\x12\x44\n\x16get_ro_max_version_dir\x18\x12 \x01(\x0b\x32$.voldemort.GetROMaxVersionDirRequest\x12L\n\x1aget_ro_current_version_dir\x18\x13 \x01(\x0b\x32(.voldemort.GetROCurrentVersionDirRequest\x12\x44\n\x15\x66\x65tch_partition_files\x18\x14 \x01(\x0b\x32%.voldemort.FetchPartitionFilesRequest\x12@\n\x13update_slop_entries\x18\x16 \x01(\x0b\x32#.voldemort.UpdateSlopEntriesRequest\x12>\n\x12\x66\x61iled_fetch_store\x18\x18 \x01(\x0b\x32\".voldemort.FailedFetchStoreRequest\x12\x43\n\x15get_ro_storage_format\x18\x19 \x01(\x0b\x32$.voldemort.GetROStorageFormatRequest\x12\x46\n\x16rebalance_state_change\x18\x1a \x01(\x0b\x32&.voldemort.RebalanceStateChangeRequest\x12/\n\nrepair_job\x18\x1b \x01(\x0b\x32\x1b.voldemort.RepairJobRequest\x12X\n initiate_rebalance_node_on_donor\x18\x1c \x01(\x0b\x32..voldemort.InitiateRebalanceNodeOnDonorRequest\x12Q\n\x1c\x64\x65lete_store_rebalance_state\x18\x1d \x01(\x0b\x32+.voldemort.DeleteStoreRebalanceStateRequest\x12\x35\n\rnative_backup\x18\x1e \x01(\x0b\x32\x1e.voldemort.NativeBackupRequest*\xb4\x05\n\x10\x41\x64minRequestType\x12\x10\n\x0cGET_METADATA\x10\x00\x12\x13\n\x0fUPDATE_METADATA\x10\x01\x12\x1c\n\x18UPDATE_PARTITION_ENTRIES\x10\x02\x12\x1b\n\x17\x46\x45TCH_PARTITION_ENTRIES\x10\x03\x12\x1c\n\x18\x44\x45LETE_PARTITION_ENTRIES\x10\x04\x12\x1d\n\x19INITIATE_FETCH_AND_UPDATE\x10\x05\x12\x1a\n\x16\x41SYNC_OPERATION_STATUS\x10\x06\x12\x1b\n\x17INITIATE_REBALANCE_NODE\x10\x07\x12\x18\n\x14\x41SYNC_OPERATION_STOP\x10\x08\x12\x18\n\x14\x41SYNC_OPERATION_LIST\x10\t\x12\x14\n\x10TRUNCATE_ENTRIES\x10\n\x12\r\n\tADD_STORE\x10\x0b\x12\x10\n\x0c\x44\x45LETE_STORE\x10\x0c\x12\x0f\n\x0b\x46\x45TCH_STORE\x10\r\x12\x0e\n\nSWAP_STORE\x10\x0e\x12\x12\n\x0eROLLBACK_STORE\x10\x0f\x12\x1a\n\x16GET_RO_MAX_VERSION_DIR\x10\x10\x12\x1e\n\x1aGET_RO_CURRENT_VERSION_DIR\x10\x11\x12\x19\n\x15\x46\x45TCH_PARTITION_FILES\x10\x12\x12\x17\n\x13UPDATE_SLOP_ENTRIES\x10\x14\x12\x16\n\x12\x46\x41ILED_FETCH_STORE\x10\x16\x12\x19\n\x15GET_RO_STORAGE_FORMAT\x10\x17\x12\x1a\n\x16REBALANCE_STATE_CHANGE\x10\x18\x12\x0e\n\nREPAIR_JOB\x10\x19\x12$\n INITIATE_REBALANCE_NODE_ON_DONOR\x10\x1a\x12 \n\x1c\x44\x45LETE_STORE_REBALANCE_STATE\x10\x1b\x12\x11\n\rNATIVE_BACKUP\x10\x1c\x42-\n\x1cvoldemort.client.protocol.pbB\x0bVAdminProtoH\x01')
_ADMINREQUESTTYPE = descriptor.EnumDescriptor(
name='AdminRequestType',
@@ -110,11 +110,27 @@
name='REBALANCE_STATE_CHANGE', index=22, number=24,
options=None,
type=None),
+ descriptor.EnumValueDescriptor(
+ name='REPAIR_JOB', index=23, number=25,
+ options=None,
+ type=None),
+ descriptor.EnumValueDescriptor(
+ name='INITIATE_REBALANCE_NODE_ON_DONOR', index=24, number=26,
+ options=None,
+ type=None),
+ descriptor.EnumValueDescriptor(
+ name='DELETE_STORE_REBALANCE_STATE', index=25, number=27,
+ options=None,
+ type=None),
+ descriptor.EnumValueDescriptor(
+ name='NATIVE_BACKUP', index=26, number=28,
+ options=None,
+ type=None),
],
containing_type=None,
options=None,
- serialized_start=6061,
- serialized_end=6646,
+ serialized_start=6792,
+ serialized_end=7484,
)
@@ -141,6 +157,10 @@
FAILED_FETCH_STORE = 22
GET_RO_STORAGE_FORMAT = 23
REBALANCE_STATE_CHANGE = 24
+REPAIR_JOB = 25
+INITIATE_REBALANCE_NODE_ON_DONOR = 26
+DELETE_STORE_REBALANCE_STATE = 27
+NATIVE_BACKUP = 28
@@ -1131,6 +1151,34 @@
)
+_INITIATEREBALANCENODEONDONORREQUEST = descriptor.Descriptor(
+ name='InitiateRebalanceNodeOnDonorRequest',
+ full_name='voldemort.InitiateRebalanceNodeOnDonorRequest',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ fields=[
+ descriptor.FieldDescriptor(
+ name='rebalance_partition_info', full_name='voldemort.InitiateRebalanceNodeOnDonorRequest.rebalance_partition_info', index=0,
+ number=1, type=11, cpp_type=10, label=3,
+ has_default_value=False, default_value=[],
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ options=None),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ options=None,
+ is_extendable=False,
+ extension_ranges=[],
+ serialized_start=2692,
+ serialized_end=2801,
+)
+
+
_ASYNCOPERATIONSTATUSRESPONSE = descriptor.Descriptor(
name='AsyncOperationStatusResponse',
full_name='voldemort.AsyncOperationStatusResponse',
@@ -1182,8 +1230,8 @@
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=2693,
- serialized_end=2831,
+ serialized_start=2804,
+ serialized_end=2942,
)
@@ -1210,8 +1258,8 @@
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=2833,
- serialized_end=2872,
+ serialized_start=2944,
+ serialized_end=2983,
)
@@ -1238,8 +1286,8 @@
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=2874,
- serialized_end=2932,
+ serialized_start=2985,
+ serialized_end=3043,
)
@@ -1266,8 +1314,8 @@
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=2934,
- serialized_end=2976,
+ serialized_start=3045,
+ serialized_end=3087,
)
@@ -1294,8 +1342,8 @@
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=2978,
- serialized_end=3029,
+ serialized_start=3089,
+ serialized_end=3140,
)
@@ -1322,8 +1370,8 @@
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=3031,
- serialized_end=3070,
+ serialized_start=3142,
+ serialized_end=3181,
)
@@ -1350,8 +1398,8 @@
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=3072,
- serialized_end=3126,
+ serialized_start=3183,
+ serialized_end=3237,
)
@@ -1392,8 +1440,8 @@
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=3128,
- serialized_end=3208,
+ serialized_start=3239,
+ serialized_end=3319,
)
@@ -1427,8 +1475,8 @@
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=3210,
- serialized_end=3267,
+ serialized_start=3321,
+ serialized_end=3378,
)
@@ -1462,8 +1510,8 @@
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=3269,
- serialized_end=3349,
+ serialized_start=3380,
+ serialized_end=3460,
)
@@ -1497,8 +1545,8 @@
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=3351,
- serialized_end=3415,
+ serialized_start=3462,
+ serialized_end=3526,
)
@@ -1525,8 +1573,64 @@
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=3417,
- serialized_end=3473,
+ serialized_start=3528,
+ serialized_end=3584,
+)
+
+
+_REPAIRJOBREQUEST = descriptor.Descriptor(
+ name='RepairJobRequest',
+ full_name='voldemort.RepairJobRequest',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ fields=[
+ descriptor.FieldDescriptor(
+ name='store_name', full_name='voldemort.RepairJobRequest.store_name', index=0,
+ number=1, type=9, cpp_type=9, label=1,
+ has_default_value=False, default_value=unicode("", "utf-8"),
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ options=None),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ options=None,
+ is_extendable=False,
+ extension_ranges=[],
+ serialized_start=3586,
+ serialized_end=3624,
+)
+
+
+_REPAIRJOBRESPONSE = descriptor.Descriptor(
+ name='RepairJobResponse',
+ full_name='voldemort.RepairJobResponse',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ fields=[
+ descriptor.FieldDescriptor(
+ name='error', full_name='voldemort.RepairJobResponse.error', index=0,
+ number=1, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ options=None),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ options=None,
+ is_extendable=False,
+ extension_ranges=[],
+ serialized_start=3626,
+ serialized_end=3678,
)
@@ -1560,8 +1664,8 @@
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=3475,
- serialized_end=3536,
+ serialized_start=3680,
+ serialized_end=3741,
)
@@ -1588,8 +1692,8 @@
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=3538,
- serialized_end=3585,
+ serialized_start=3743,
+ serialized_end=3790,
)
@@ -1623,8 +1727,8 @@
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=3587,
- serialized_end=3708,
+ serialized_start=3792,
+ serialized_end=3913,
)
@@ -1651,8 +1755,8 @@
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=3710,
- serialized_end=3761,
+ serialized_start=3915,
+ serialized_end=3966,
)
@@ -1686,8 +1790,8 @@
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=3763,
- serialized_end=3888,
+ serialized_start=3968,
+ serialized_end=4093,
)
@@ -1714,8 +1818,8 @@
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=3890,
- serialized_end=3937,
+ serialized_start=4095,
+ serialized_end=4142,
)
@@ -1749,8 +1853,8 @@
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=3939,
- serialized_end=4060,
+ serialized_start=4144,
+ serialized_end=4265,
)
@@ -1784,8 +1888,8 @@
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=4062,
- serialized_end=4126,
+ serialized_start=4267,
+ serialized_end=4331,
)
@@ -1812,8 +1916,8 @@
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=4128,
- serialized_end=4187,
+ serialized_start=4333,
+ serialized_end=4392,
)
@@ -1875,8 +1979,8 @@
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=4190,
- serialized_end=4420,
+ serialized_start=4395,
+ serialized_end=4625,
)
@@ -1903,8 +2007,120 @@
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=4422,
- serialized_end=4485,
+ serialized_start=4627,
+ serialized_end=4690,
+)
+
+
+_DELETESTOREREBALANCESTATEREQUEST = descriptor.Descriptor(
+ name='DeleteStoreRebalanceStateRequest',
+ full_name='voldemort.DeleteStoreRebalanceStateRequest',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ fields=[
+ descriptor.FieldDescriptor(
+ name='store_name', full_name='voldemort.DeleteStoreRebalanceStateRequest.store_name', index=0,
+ number=1, type=9, cpp_type=9, label=2,
+ has_default_value=False, default_value=unicode("", "utf-8"),
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ options=None),
+ descriptor.FieldDescriptor(
+ name='node_id', full_name='voldemort.DeleteStoreRebalanceStateRequest.node_id', index=1,
+ number=2, type=5, cpp_type=1, label=2,
+ has_default_value=False, default_value=0,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ options=None),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ options=None,
+ is_extendable=False,
+ extension_ranges=[],
+ serialized_start=4692,
+ serialized_end=4763,
+)
+
+
+_DELETESTOREREBALANCESTATERESPONSE = descriptor.Descriptor(
+ name='DeleteStoreRebalanceStateResponse',
+ full_name='voldemort.DeleteStoreRebalanceStateResponse',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ fields=[
+ descriptor.FieldDescriptor(
+ name='error', full_name='voldemort.DeleteStoreRebalanceStateResponse.error', index=0,
+ number=1, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ options=None),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ options=None,
+ is_extendable=False,
+ extension_ranges=[],
+ serialized_start=4765,
+ serialized_end=4833,
+)
+
+
+_NATIVEBACKUPREQUEST = descriptor.Descriptor(
+ name='NativeBackupRequest',
+ full_name='voldemort.NativeBackupRequest',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ fields=[
+ descriptor.FieldDescriptor(
+ name='store_name', full_name='voldemort.NativeBackupRequest.store_name', index=0,
+ number=1, type=9, cpp_type=9, label=2,
+ has_default_value=False, default_value=unicode("", "utf-8"),
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ options=None),
+ descriptor.FieldDescriptor(
+ name='backup_dir', full_name='voldemort.NativeBackupRequest.backup_dir', index=1,
+ number=2, type=9, cpp_type=9, label=2,
+ has_default_value=False, default_value=unicode("", "utf-8"),
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ options=None),
+ descriptor.FieldDescriptor(
+ name='verify_files', full_name='voldemort.NativeBackupRequest.verify_files', index=2,
+ number=3, type=8, cpp_type=7, label=2,
+ has_default_value=False, default_value=False,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ options=None),
+ descriptor.FieldDescriptor(
+ name='incremental', full_name='voldemort.NativeBackupRequest.incremental', index=3,
+ number=4, type=8, cpp_type=7, label=2,
+ has_default_value=False, default_value=False,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ options=None),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ options=None,
+ is_extendable=False,
+ extension_ranges=[],
+ serialized_start=4835,
+ serialized_end=4939,
)
@@ -2083,6 +2299,34 @@
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
+ descriptor.FieldDescriptor(
+ name='repair_job', full_name='voldemort.VoldemortAdminRequest.repair_job', index=24,
+ number=27, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ options=None),
+ descriptor.FieldDescriptor(
+ name='initiate_rebalance_node_on_donor', full_name='voldemort.VoldemortAdminRequest.initiate_rebalance_node_on_donor', index=25,
+ number=28, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ options=None),
+ descriptor.FieldDescriptor(
+ name='delete_store_rebalance_state', full_name='voldemort.VoldemortAdminRequest.delete_store_rebalance_state', index=26,
+ number=29, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ options=None),
+ descriptor.FieldDescriptor(
+ name='native_backup', full_name='voldemort.VoldemortAdminRequest.native_backup', index=27,
+ number=30, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ options=None),
],
extensions=[
],
@@ -2092,8 +2336,8 @@
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=4488,
- serialized_end=6058,
+ serialized_start=4942,
+ serialized_end=6789,
)
import voldemort_client_pb2
@@ -2125,12 +2369,14 @@
_REBALANCEPARTITIONINFOMAP.fields_by_name['replica_to_add_partition'].message_type = _PERSTOREPARTITIONTUPLE
_REBALANCEPARTITIONINFOMAP.fields_by_name['replica_to_delete_partition'].message_type = _PERSTOREPARTITIONTUPLE
_INITIATEREBALANCENODEREQUEST.fields_by_name['rebalance_partition_info'].message_type = _REBALANCEPARTITIONINFOMAP
+_INITIATEREBALANCENODEONDONORREQUEST.fields_by_name['rebalance_partition_info'].message_type = _REBALANCEPARTITIONINFOMAP
_ASYNCOPERATIONSTATUSRESPONSE.fields_by_name['error'].message_type = voldemort_client_pb2._ERROR
_TRUNCATEENTRIESRESPONSE.fields_by_name['error'].message_type = voldemort_client_pb2._ERROR
_ADDSTORERESPONSE.fields_by_name['error'].message_type = voldemort_client_pb2._ERROR
_DELETESTORERESPONSE.fields_by_name['error'].message_type = voldemort_client_pb2._ERROR
_SWAPSTORERESPONSE.fields_by_name['error'].message_type = voldemort_client_pb2._ERROR
_ROLLBACKSTORERESPONSE.fields_by_name['error'].message_type = voldemort_client_pb2._ERROR
+_REPAIRJOBRESPONSE.fields_by_name['error'].message_type = voldemort_client_pb2._ERROR
_GETROMAXVERSIONDIRRESPONSE.fields_by_name['ro_store_versions'].message_type = _ROSTOREVERSIONDIRMAP
_GETROMAXVERSIONDIRRESPONSE.fields_by_name['error'].message_type = voldemort_client_pb2._ERROR
_GETROCURRENTVERSIONDIRRESPONSE.fields_by_name['ro_store_versions'].message_type = _ROSTOREVERSIONDIRMAP
@@ -2140,6 +2386,7 @@
_FAILEDFETCHSTORERESPONSE.fields_by_name['error'].message_type = voldemort_client_pb2._ERROR
_REBALANCESTATECHANGEREQUEST.fields_by_name['rebalance_partition_info_list'].message_type = _REBALANCEPARTITIONINFOMAP
_REBALANCESTATECHANGERESPONSE.fields_by_name['error'].message_type = voldemort_client_pb2._ERROR
+_DELETESTOREREBALANCESTATERESPONSE.fields_by_name['error'].message_type = voldemort_client_pb2._ERROR
_VOLDEMORTADMINREQUEST.fields_by_name['type'].enum_type = _ADMINREQUESTTYPE
_VOLDEMORTADMINREQUEST.fields_by_name['get_metadata'].message_type = _GETMETADATAREQUEST
_VOLDEMORTADMINREQUEST.fields_by_name['update_metadata'].message_type = _UPDATEMETADATAREQUEST
@@ -2164,6 +2411,10 @@
_VOLDEMORTADMINREQUEST.fields_by_name['failed_fetch_store'].message_type = _FAILEDFETCHSTOREREQUEST
_VOLDEMORTADMINREQUEST.fields_by_name['get_ro_storage_format'].message_type = _GETROSTORAGEFORMATREQUEST
_VOLDEMORTADMINREQUEST.fields_by_name['rebalance_state_change'].message_type = _REBALANCESTATECHANGEREQUEST
+_VOLDEMORTADMINREQUEST.fields_by_name['repair_job'].message_type = _REPAIRJOBREQUEST
+_VOLDEMORTADMINREQUEST.fields_by_name['initiate_rebalance_node_on_donor'].message_type = _INITIATEREBALANCENODEONDONORREQUEST
+_VOLDEMORTADMINREQUEST.fields_by_name['delete_store_rebalance_state'].message_type = _DELETESTOREREBALANCESTATEREQUEST
+_VOLDEMORTADMINREQUEST.fields_by_name['native_backup'].message_type = _NATIVEBACKUPREQUEST
class GetMetadataRequest(message.Message):
__metaclass__ = reflection.GeneratedProtocolMessageType
@@ -2321,6 +2572,12 @@ class InitiateRebalanceNodeRequest(message.Message):
# @@protoc_insertion_point(class_scope:voldemort.InitiateRebalanceNodeRequest)
+class InitiateRebalanceNodeOnDonorRequest(message.Message):
+ __metaclass__ = reflection.GeneratedProtocolMessageType
+ DESCRIPTOR = _INITIATEREBALANCENODEONDONORREQUEST
+
+ # @@protoc_insertion_point(class_scope:voldemort.InitiateRebalanceNodeOnDonorRequest)
+
class AsyncOperationStatusResponse(message.Message):
__metaclass__ = reflection.GeneratedProtocolMessageType
DESCRIPTOR = _ASYNCOPERATIONSTATUSRESPONSE
@@ -2393,6 +2650,18 @@ class RollbackStoreResponse(message.Message):
# @@protoc_insertion_point(class_scope:voldemort.RollbackStoreResponse)
+class RepairJobRequest(message.Message):
+ __metaclass__ = reflection.GeneratedProtocolMessageType
+ DESCRIPTOR = _REPAIRJOBREQUEST
+
+ # @@protoc_insertion_point(class_scope:voldemort.RepairJobRequest)
+
+class RepairJobResponse(message.Message):
+ __metaclass__ = reflection.GeneratedProtocolMessageType
+ DESCRIPTOR = _REPAIRJOBRESPONSE
+
+ # @@protoc_insertion_point(class_scope:voldemort.RepairJobResponse)
+
class ROStoreVersionDirMap(message.Message):
__metaclass__ = reflection.GeneratedProtocolMessageType
DESCRIPTOR = _ROSTOREVERSIONDIRMAP
@@ -2459,6 +2728,24 @@ class RebalanceStateChangeResponse(message.Message):
# @@protoc_insertion_point(class_scope:voldemort.RebalanceStateChangeResponse)
+class DeleteStoreRebalanceStateRequest(message.Message):
+ __metaclass__ = reflection.GeneratedProtocolMessageType
+ DESCRIPTOR = _DELETESTOREREBALANCESTATEREQUEST
+
+ # @@protoc_insertion_point(class_scope:voldemort.DeleteStoreRebalanceStateRequest)
+
+class DeleteStoreRebalanceStateResponse(message.Message):
+ __metaclass__ = reflection.GeneratedProtocolMessageType
+ DESCRIPTOR = _DELETESTOREREBALANCESTATERESPONSE
+
+ # @@protoc_insertion_point(class_scope:voldemort.DeleteStoreRebalanceStateResponse)
+
+class NativeBackupRequest(message.Message):
+ __metaclass__ = reflection.GeneratedProtocolMessageType
+ DESCRIPTOR = _NATIVEBACKUPREQUEST
+
+ # @@protoc_insertion_point(class_scope:voldemort.NativeBackupRequest)
+
class VoldemortAdminRequest(message.Message):
__metaclass__ = reflection.GeneratedProtocolMessageType
DESCRIPTOR = _VOLDEMORTADMINREQUEST
View
18 clients/ruby/lib/connection/connection.rb
@@ -85,12 +85,12 @@ def parse_nodes_from(doc)
nodes = []
doc.xpath("/cluster/server").each do |n|
node = VoldemortNode.new
- node.id = n.xpath("//id").text
- node.host = n.xpath("//host").text
- node.port = n.xpath("//socket-port").text
- node.http_port = n.xpath("//http_port").text
- node.admin_port = n.xpath("//admin-port").text
- node.partitions = n.xpath("//partitions").text
+ node.id = n.xpath("id").text
+ node.host = n.xpath("host").text
+ node.port = n.xpath("socket-port").text
+ node.http_port = n.xpath("http_port").text
+ node.admin_port = n.xpath("admin-port").text
+ node.partitions = n.xpath("partitions").text
nodes << node
end
nodes
@@ -128,15 +128,15 @@ def rebalance_connection_if_needed
def get(key)
self.rebalance_connection_if_needed
- self.get_from(self.db_name, key, true)
+ self.get_from(self.db_name, key, false)
end
def get_all(keys)
self.rebalance_connection_if_needed
- self.get_all_from(self.db_name, keys, true)
+ self.get_all_from(self.db_name, keys, false)
end
- def put(key, value, version = nil, route = true)
+ def put(key, value, version = nil, route = false)
self.rebalance_connection_if_needed
self.put_from(self.db_name, key, value, version, route)
end
View
8 clients/ruby/lib/connection/tcp_connection.rb
@@ -28,7 +28,7 @@ def connect_to(host, port)
end
end
- def get_from(db_name, key, route = true)
+ def get_from(db_name, key, route = false)
request = VoldemortRequest.new
request.should_route = route
request.store = db_name
@@ -43,7 +43,7 @@ def get_from(db_name, key, route = true)
response
end
- def get_all_from(db_name, keys, route = true)
+ def get_all_from(db_name, keys, route = false)
request = VoldemortRequest.new
request.should_route = route
request.store = db_name
@@ -58,7 +58,7 @@ def get_all_from(db_name, keys, route = true)
response
end
- def put_from(db_name, key, value, version = nil, route = true)
+ def put_from(db_name, key, value, version = nil, route = false)
version = get_version(key) unless version
request = VoldemortRequest.new
request.should_route = route
@@ -80,7 +80,7 @@ def put_from(db_name, key, value, version = nil, route = true)
version
end
- def delete_from(db_name, key, version = nil, route = true)
+ def delete_from(db_name, key, version = nil, route = false)
version = get_version(key) unless version
request = VoldemortRequest.new
request.should_route = route
View
2  clients/ruby/lib/voldemort-serializer.rb
@@ -54,7 +54,7 @@ def read_slice(length, bytes)
def to_bytes(object)
bytes = ''
- newest_version = 0 # TODO get highest number from map
+ newest_version = type_def_versions.size > 0 ? (type_def_versions.size-1) : 0
type_def = @type_def_versions[newest_version]
if(@has_version)
View
2  clients/ruby/voldemort-rb.gemspec
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = 'voldemort-rb'
- s.version = '0.1.5'
+ s.version = '0.1.8'
s.summary = %{A Ruby client for the Voldemort distributed key value store}
s.description = %Q{voldemort-rb allows you to connect to the Voldemort descentralized key value store.}
s.authors = ["Alejandro Crosa"]
View
1  config/test_config1/config/server.properties
@@ -2,6 +2,7 @@
node.id=0
max.threads=100
+enable.repair=true
############### DB options ######################
View
1  config/test_config2/config/server.properties
@@ -4,6 +4,7 @@ bdb.flush.transactions=false
bdb.cache.size=100MB
max.threads=100
+enable.repair=true
http.enable=true
socket.enable=true
View
183 contrib/collections/src/java/voldemort/collections/AddNodeAction.java
@@ -0,0 +1,183 @@
+package voldemort.collections;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import voldemort.client.StoreClient;
+import voldemort.client.UpdateAction;
+import voldemort.versioning.ObsoleteVersionException;
+import voldemort.versioning.Versioned;
+
+/**
+ * Adds a node E to the front of the list identified by K. Inserts the node to
+ * the front of the list, with id 0, and then modifies the pointers for the
+ * first node and next node accordingly.
+ *
+ * @param <E> the type of the value
+ * @param <K> the type of the key identifying the list
+ */
+public class AddNodeAction<K, E> extends UpdateAction<Map<String, Object>, Map<String, Object>> {
+
+ private final K _key;
+ private final E _value;
+
+ @SuppressWarnings("unchecked")
+ private StoreClient<Map<String, Object>, Map<String, Object>> _storeClient = null;
+ private Map<Integer, Map<String, Object>> _rollback = new HashMap<Integer, Map<String, Object>>();
+
+ public AddNodeAction(K key, E value) {
+ _key = key;
+ _value = value;
+ }
+
+ @Override
+ public void rollback() {
+ if(_storeClient == null)
+ return;
+
+ for(Entry<Integer, Map<String, Object>> entry: _rollback.entrySet()) {
+ VListKey<K> key = new VListKey<K>(_key, entry.getKey());
+ _storeClient.put(key.mapValue(), entry.getValue());
+ }
+ }
+
+ /**
+ * @throws ObsoleteVersionException if a concurrent modification (remove or
+ * another add) has not completed modifying the structure.
+ * @throws ArrayIndexOutOfBoundsException if no more ids left to identify
+ * object
+ */
+ @Override
+ public void update(StoreClient<Map<String, Object>, Map<String, Object>> storeClient) {
+ _storeClient = storeClient;
+ VListKey<K> newKey = new VListKey<K>(_key, 0);
+ Versioned<Map<String, Object>> firstNodeMap = storeClient.get(newKey.mapValue());
+ // adding first node of the list
+ if(firstNodeMap == null) {
+ Versioned<Map<String, Object>> newNode = new Versioned<Map<String, Object>>((new VListNode<E>(_value,
+ 0,
+ VStack.NULL_ID,
+ VStack.NULL_ID,
+ true)).mapValue());
+ // throws ObsoleteVersionException if another process has created a
+ // new node already
+ storeClient.put(newKey.mapValue(), newNode);
+ } else // add to front of list
+ {
+ Versioned<VListNode<E>> firstNode = new Versioned<VListNode<E>>(VListNode.<E> valueOf(firstNodeMap.getValue()),
+ firstNodeMap.getVersion());
+
+ if(!firstNode.getValue().isStable()) {
+ throw new ObsoleteVersionException("cannot add when list node is not stable");
+ }
+
+ // set stable flag to false
+ Map<String, Object> tmpMap = new HashMap<String, Object>(firstNodeMap.getValue());
+ tmpMap.put(VListNode.STABLE, false);
+ storeClient.put(newKey.mapValue(),
+ new Versioned<Map<String, Object>>(tmpMap, firstNodeMap.getVersion()));
+ _rollback.put(0, firstNodeMap.getValue());
+
+ int newId;
+ int nextId = firstNode.getValue().getNextId();
+ newId = (nextId == VStack.NULL_ID) ? 1 : nextId + 1;
+ if(newId == Integer.MAX_VALUE)
+ throw new ArrayIndexOutOfBoundsException(newId + " out of bounds");
+
+ Versioned<VListNode<E>> nextNode = null;
+ VListKey<K> nextKey = new VListKey<K>(_key, nextId);
+ if(nextId != VStack.NULL_ID) {
+ Versioned<Map<String, Object>> nextNodeMap = storeClient.get(nextKey.mapValue());
+ if(nextNodeMap == null)
+ throw new ObsoleteVersionException("possible concurrent modification");
+ nextNode = new Versioned<VListNode<E>>(VListNode.<E> valueOf(nextNodeMap.getValue()),
+ nextNodeMap.getVersion());
+ if(!nextNode.getValue().isStable()) {
+ throw new ObsoleteVersionException("cannot add when list node is not stable");
+ }
+
+ // set stable flag to false
+ tmpMap = new HashMap<String, Object>(nextNode.getValue().mapValue());
+ tmpMap.put(VListNode.STABLE, false);
+ storeClient.put(nextKey.mapValue(),
+ new Versioned<Map<String, Object>>(tmpMap, nextNode.getVersion()));
+ _rollback.put(nextId, nextNode.getValue().mapValue());
+ }
+
+ // insert new node
+ Map<String, Object> newNode = (new VListNode<E>(_value, 0, VStack.NULL_ID, newId, true)).mapValue();
+ // don't need to specify versioned because node is already "locked"
+ storeClient.put(newKey.mapValue(), newNode);
+
+ // move first node to next index
+ VListKey<K> firstKey = new VListKey<K>(_key, newId);
+ firstNode = new Versioned<VListNode<E>>(new VListNode<E>(firstNode.getValue()
+ .getValue(),
+ newId,
+ 0,
+ firstNode.getValue()
+ .getNextId(),
+ true));
+ // don't need to specify versioned because node is already "locked"
+ storeClient.put(firstKey.mapValue(), firstNode.getValue().mapValue());
+
+ // redefine previous pointer on next node
+ if(nextNode != null) {
+ if(!storeClient.applyUpdate(new UpdateNextNode<K, E>(nextNode, nextKey, newId)))
+ throw new ObsoleteVersionException("unable to update node");
+ }
+ }
+ }
+
+ /**
+ * Updates a the previous pointer of a node specified by key to a newId.
+ *
+ * @param <K>
+ * @param <E>
+ */
+ private static class UpdateNextNode<K, E> extends
+ UpdateAction<Map<String, Object>, Map<String, Object>> {
+
+ private final VListKey<K> _key;
+ private final int _newId;
+
+ private Versioned<VListNode<E>> _listNode;
+ private int numCalls = 0;
+
+ /**
+ * @param listNode
+ * @param key
+ * @param newId
+ */
+ public UpdateNextNode(Versioned<VListNode<E>> listNode, VListKey<K> key, int newId) {
+ _listNode = listNode;
+ _key = key;
+ _newId = newId;
+ }
+
+ @Override
+ public void update(StoreClient<Map<String, Object>, Map<String, Object>> storeClient) {
+ if(numCalls > 0) {
+ // TODO jko maybe delete this if unnecessary
+ Versioned<Map<String, Object>> nextNodeMap = storeClient.get(_key.mapValue());
+ if(nextNodeMap == null)
+ throw new ObsoleteVersionException("possible concurrent modification");
+ _listNode = new Versioned<VListNode<E>>(VListNode.<E> valueOf(nextNodeMap.getValue()),
+ nextNodeMap.getVersion());
+ }
+
+ VListNode<E> nodeValue = _listNode.getValue();
+ _listNode.setObject(new VListNode<E>(nodeValue.getValue(),
+ nodeValue.getId(),
+ _newId,
+ nodeValue.getNextId(),
+ true));
+ Map<String, Object> nextNodeMap = _listNode.getValue().mapValue();
+ storeClient.put(_key.mapValue(), nextNodeMap);
+
+ numCalls++;
+ }
+
+ }
+}
View
113 contrib/collections/src/java/voldemort/collections/MappedListIterator.java
@@ -0,0 +1,113 @@
+package voldemort.collections;
+
+import java.util.Iterator;
+import java.util.NoSuchElementException;
+
+/**
+ * Analogous to ListIterator, except for use with a map-backed list. The main
+ * difference is that these lists are not indexed by sequential number, but
+ * instead referred to by an id whose order has nothing to do with the position
+ * of the element in the list.
+ *
+ * @param <K> the type of the key used by the underlying map
+ * @param <E> the type of the elements being stored
+ */
+public interface MappedListIterator<K, E> extends Iterator<E> {
+
+ /**
+ * Inserts the specified element into the list (optional operation).
+ */
+ void add(E e);
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.util.Iterator#hasNext()
+ */
+ boolean hasNext();
+
+ /**
+ * Returns true if this list iterator has more elements when traversing the
+ * list in the reverse direction. (In other words, returns true if previous
+ * would return an element rather than throwing an exception.)
+ *
+ * @return true if the list iterator has more elements when traversing the
+ * list in the reverse direction
+ */
+ boolean hasPrevious();
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.util.Iterator#next()
+ */
+ E next();
+
+ /**
+ * Returns the id associated with the next element in the list, or null if
+ * the list iterator is at the end of the list.
+ *
+ * @return the id associated with the next element in the list
+ */
+ K nextId();
+
+ /**
+ * Returns the previous element in the list. This method may be called
+ * repeatedly to iterate through the list backwards, or intermixed with
+ * calls to next to go back and forth. (Note that alternating calls to next
+ * and previous will return the same element repeatedly.)
+ *
+ * @return the previous element in the list
+ *
+ * @throws NoSuchElementException - if the iteration has no previous
+ * element.
+ */
+ E previous();
+
+ /**
+ * Returns the id associated with the previous element in the list, or null
+ * if the list iterator is at the beginning of the list.
+ *
+ * @return the id associated with the previous element in the list
+ */
+ K previousId();
+
+ /**
+ * Returns the id for the last element that was returned by next or
+ * previous.
+ *
+ * @return the id for the last element that was returned by next or previous
+ * @throws IllegalStateException if neither next nor previous has been
+ * called, or remove or add has been called after the last call to
+ * next or previous
+ */
+ K lastId();
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.util.Iterator#remove()
+ */
+ void remove();
+
+ /**
+ * Replaces the last element returned by next or previous with the specified
+ * element (optional operation). This call can be made only if neither
+ * ListIterator.remove nor ListIterator.add have been called after the last
+ * call to next or previous.
+ *
+ * @param e the element with which to replace the last element returned by
+ * next or previous.
+ *
+ * @throws UnsupportedOperationException if the set operation is not
+ * supported by this list iterator.
+ * @throws ClassCastException if the class of the specified element prevents
+ * it from being added to this list.
+ * @throws IllegalArgumentException if some aspect of the specified element
+ * prevents it from being added to this list.
+ * @throws IllegalStateException if neither next nor previous have been
+ * called, or remove or add have been called after the last call to
+ * next or previous.
+ */
+ void set(E e);
+}
View
63 contrib/collections/src/java/voldemort/collections/UpdateElementById.java
@@ -0,0 +1,63 @@
+package voldemort.collections;
+
+import java.util.Map;
+
+import voldemort.client.StoreClient;
+import voldemort.client.UpdateAction;
+import voldemort.versioning.ObsoleteVersionException;
+import voldemort.versioning.Version;
+import voldemort.versioning.Versioned;
+
+/**
+ * Put the given value to the appropriate id in the stack, using the version of
+ * the current list node identified by that id.
+ *
+ * @param id
+ * @param element element to set
+ * @return element that was replaced by the new element
+ */
+public class UpdateElementById<K, E> extends UpdateAction<Map<String, Object>, Map<String, Object>> {
+
+ private final VListKey<K> _key;
+ private final E _element;
+ private final Version _version;
+ private E _result = null;
+
+ public UpdateElementById(VListKey<K> key, E element) {
+ _key = key;
+ _element = element;
+ _version = null;
+ }
+
+ public UpdateElementById(VListKey<K> key, Versioned<E> element) {
+ _key = key;
+ _element = element.getValue();
+ _version = element.getVersion();
+ }
+
+ @Override
+ public void update(StoreClient<Map<String, Object>, Map<String, Object>> storeClient) {
+ Versioned<Map<String, Object>> nodeMap = storeClient.get(_key.mapValue());
+ if(nodeMap == null)
+ throw new IndexOutOfBoundsException("invalid id " + _key.getId());
+ Version version = (_version != null) ? _version : nodeMap.getVersion();
+ VListNode<E> listNode = VListNode.valueOf(nodeMap.getValue());
+ if(!listNode.isStable()) {
+ throw new ObsoleteVersionException("node " + _key.getId() + " not stable.");
+ }
+ _result = listNode.getValue();
+ VListNode<E> newNode = new VListNode<E>(_element,
+ listNode.getId(),
+ listNode.getPreviousId(),
+ listNode.getNextId(),
+ true);
+ storeClient.put(_key.mapValue(), new Versioned<Map<String, Object>>(newNode.mapValue(),
+ version));
+
+ }
+
+ public E getResult() {
+ return _result;
+ }
+
+}
View
51 contrib/collections/src/java/voldemort/collections/UpdatePageIndex.java
@@ -0,0 +1,51 @@
+package voldemort.collections;
+
+import java.util.List;
+import java.util.Map;
+
+import voldemort.client.StoreClient;
+import voldemort.client.UpdateAction;
+import voldemort.serialization.Serializer;
+import voldemort.versioning.Versioned;
+
+/**
+ * Update the VLinkedPagedList index with a new node.
+ */
+public class UpdatePageIndex<I, LK extends Comparable<LK>> extends
+ UpdateAction<I, List<Map<String, Object>>> {
+
+ private final I _identifier;
+ private final LK _newIndex;
+ private final Serializer<LK> _serializer;
+
+ public UpdatePageIndex(I identifier, LK newKey, Serializer<LK> serializer) {
+ _identifier = identifier;
+ _newIndex = newKey;
+ _serializer = serializer;
+ }
+
+ @Override
+ public void update(StoreClient<I, List<Map<String, Object>>> storeClient) {
+ Versioned<List<Map<String, Object>>> versionedIndex = storeClient.get(_identifier);
+
+ List<Map<String, Object>> pageIndex = versionedIndex.getValue();
+ VPageIndexEntry<LK> oldIndexEntry = VPageIndexEntry.valueOf(pageIndex.remove(0),
+ _serializer);
+ int updatedPageId = 0;
+ if(pageIndex.size() >= 1) {
+ updatedPageId = ((Integer) pageIndex.get(0).get("pageId")) + 1;
+ } else {
+ updatedPageId = 1;
+ }
+ oldIndexEntry = new VPageIndexEntry<LK>(updatedPageId,
+ oldIndexEntry.getLastIndex(),
+ _serializer);
+ VPageIndexEntry<LK> newIndexEntry = new VPageIndexEntry<LK>(0, _newIndex, _serializer);
+ pageIndex.add(0, oldIndexEntry.mapValue());
+ pageIndex.add(0, newIndexEntry.mapValue());
+ storeClient.put(_identifier,
+ new Versioned<List<Map<String, Object>>>(pageIndex,
+ versionedIndex.getVersion()));
+ }
+
+}
View
28 contrib/collections/src/java/voldemort/collections/VLinkedPagedKey.java
@@ -0,0 +1,28 @@
+package voldemort.collections;
+
+/**
+ * Key into a VLinkedPagedList. Specifies the page to look into, and the index
+ * of the array within the page.
+ */
+public class VLinkedPagedKey {
+
+ private final int _pageId;
+ private final int _arrayIndex;
+
+ public VLinkedPagedKey(int pageId, int arrayIndex) {
+ _pageId = pageId;
+ _arrayIndex = arrayIndex;
+ }
+
+ public int getPageId() {
+ return _pageId;
+ }
+
+ public int getArrayIndex() {
+ return _arrayIndex;
+ }
+
+ public String toString() {
+ return "PageId " + _pageId + ", arrayIndex " + _arrayIndex;
+ }
+}
View
224 contrib/collections/src/java/voldemort/collections/VLinkedPagedList.java
@@ -0,0 +1,224 @@
+package voldemort.collections;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import voldemort.client.StoreClient;
+import voldemort.serialization.Serializer;
+import voldemort.versioning.Versioned;
+
+/**
+ * VLinkedPagedList is a voldemort-store backed list that keeps track of a value
+ * in relation to its position in a sorted key. Items are placed in the
+ * LinkedPagedList in descending order. New elements are added to the front of
+ * the list.
+ *
+ * The voldemort store configuration must use JSON serialization. For the
+ * stackClient, the key must be defined as a JSON object: {"value" : <JSON
+ * serialization format of I>, "id" : "int32"} The value must be defined as the
+ * following: {"id" : "int32", "nextId" : "int32", "previousId" : "int32",
+ * "stable" : "boolean", "value" : ["bytes"]}
+ *
+ * For the pageIndex, the JSON serialization format of the key is the same as
+ * the JSON serialization format of I. The JSON serialization format of the
+ * value is: [{"pageId" : "int32", "lastIndex" : "bytes"}]
+ *
+ * @param <I> type used to identify this list
+ * @param <LK> value to be stored
+ */
+public class VLinkedPagedList<I, LK extends Comparable<LK>> implements Iterable<LK> {
+
+ private final I _identifier;
+ // stack of an array of LK
+ private final VStack<I, List<byte[]>> _index;
+
+ private final StoreClient<I, List<Map<String, Object>>> _pageIndex;
+ private final IndexEntryComparator<LK> _pageIndexComparator;
+
+ private final Serializer<LK> _serializer;
+ private final int _maxSize;
+ private final int _fixedSize;
+
+ /**
+ *
+ * @param identifier name of the list
+ * @param indexStack VStack to store the list of LK entries
+ * @param pageIndexClient voldemort store for the page index
+ * @param serializer serializes LK to/from bytes
+ * @param maxSize maximum size of each list in the VStack
+ * @param fixedSize once the maxSize is reached, truncate down to a standard
+ * fixedSize
+ * @param iteratorSize maximum size of list to be stored within an iterator.
+ * Should comfortably fit in memory
+ */
+ public VLinkedPagedList(I identifier,
+ StoreClient<Map<String, Object>, Map<String, Object>> stackClient,
+ StoreClient<I, List<Map<String, Object>>> pageIndexClient,
+ Serializer<LK> serializer,
+ int maxSize,
+ int fixedSize) {
+ if(identifier == null || stackClient == null || pageIndexClient == null)
+ throw new NullPointerException();
+ if(maxSize == 0 || fixedSize == 0)
+ throw new IllegalArgumentException("maxSize and fixedSize must be greater than 0");
+ if(fixedSize > maxSize)
+ throw new IllegalArgumentException("fixedSize must be less than or equal to maxSize");
+
+ _identifier = identifier;
+ _index = new VStack<I, List<byte[]>>(identifier, stackClient);
+ _pageIndex = pageIndexClient;
+ _serializer = serializer;
+ _pageIndexComparator = new IndexEntryComparator<LK>(serializer);
+ _maxSize = maxSize;
+ _fixedSize = fixedSize;
+ }
+
+ public void add(LK linearKey) {
+ if(linearKey == null)
+ throw new NullPointerException();
+
+ Versioned<List<byte[]>> keyList = _index.peekVersioned();
+ if(keyList == null) {
+ // start a brand new list
+ List<byte[]> keyListValue = new ArrayList<byte[]>(1);
+ keyListValue.add(0, _serializer.toBytes(linearKey));
+ _index.add(keyListValue);
+ VPageIndexEntry<LK> indexEntry = new VPageIndexEntry<LK>(0, linearKey, _serializer);
+ ArrayList<Map<String, Object>> pageIndexList = new ArrayList<Map<String, Object>>(1);
+ pageIndexList.add(indexEntry.mapValue());
+ _pageIndex.put(_identifier, pageIndexList);
+ } else {
+ List<byte[]> keyListValue = keyList.getValue();
+ if(keyListValue.size() >= _maxSize) {
+ // split up the list into 2 nodes
+ keyListValue.add(0, _serializer.toBytes(linearKey));
+ List<byte[]> fixedList = keyListValue.subList(_maxSize - _fixedSize + 1,
+ keyListValue.size());
+ List<byte[]> truncList = keyListValue.subList(0, _maxSize - _fixedSize + 1);
+
+ _index.setById(0, new Versioned<List<byte[]>>(fixedList, keyList.getVersion()));
+ _index.add(truncList);
+
+ LK lastIndex = _serializer.toObject(truncList.get(truncList.size() - 1));
+ _pageIndex.applyUpdate(new UpdatePageIndex<I, LK>(_identifier,
+ lastIndex,
+ _serializer));
+ } else {
+ // add to existing node
+ keyListValue.add(0, _serializer.toBytes(linearKey));
+ _index.setById(0, keyList);
+ }
+ }
+ }
+
+ public LK peek() {
+ List<byte[]> indexList = _index.peek();
+ LK key = _serializer.toObject(indexList.get(0));
+ return key;
+ }
+
+ /**
+ * Return a ListIterator<K> that starts from the beginning of the list.
+ *
+ * @return
+ */
+ public MappedListIterator<VLinkedPagedKey, LK> listIterator() {
+ return listIterator(null, true);
+ }
+
+ /**
+ * Return a listIterator<K>. Uses the page index to figure out what page to
+ * start iterating from.
+ *
+ * Runtime: 2 - 3 gets.
+ *
+ * @param linearKey key to position the cursor.
+ * @param next true if the cursor is to be placed directly before the first
+ * key that is less than linearKey false if the cursor is to be
+ * placed directly after the last key that is greater than linearKey
+ * @return a ListIterator of <K> ids.
+ */
+ public MappedListIterator<VLinkedPagedKey, LK> listIterator(LK linearKey, boolean next) {
+ int indexPage = 0;
+ if(linearKey == null) {
+ if(next) {
+ indexPage = 0;
+ } else {
+ List<Map<String, Object>> indexList = _pageIndex.getValue(_identifier);
+ if(indexList != null) {
+ VPageIndexEntry<LK> entry = VPageIndexEntry.valueOf(indexList.get(indexList.size()),
+ _serializer);
+ indexPage = entry.getPageId();
+ }
+ }
+ } else {
+ List<Map<String, Object>> indexList = _pageIndex.getValue(_identifier);
+ if(indexList != null) {
+ Map<String, Object> searchKey = new VPageIndexEntry<LK>(0, linearKey, _serializer).mapValue();
+ int position = Collections.binarySearch(indexList, searchKey, _pageIndexComparator);
+ if(position < 0) {
+ position = -1 * (position + 1);
+ }
+ indexPage = VPageIndexEntry.valueOf(indexList.get(position), _serializer)
+ .getPageId();
+ }
+ }
+
+ return listIterator(linearKey, next, indexPage);
+ }
+
+ /**
+ * Similar to listIterator(LK linearKey, boolean next) except with the
+ * addition of the hint "pageId" which specifies the first page to look for
+ * the key.
+ *
+ * Runtime: up to O(n) gets, unless a good hint page is provided, then it
+ * could be 1 - 2 gets.
+ *
+ * @param linearKey
+ * @param next
+ * @param pageId
+ * @return
+ */
+ public MappedListIterator<VLinkedPagedKey, LK> listIterator(LK linearKey,
+ boolean next,
+ Integer pageId) {
+ return new VLinkedPagedListIterator<I, LK>(_index, _serializer, linearKey, next, pageId);
+ }
+
+ public LK getById(VLinkedPagedKey key) {
+ byte[] bytes = _index.getById(key.getPageId()).get(key.getArrayIndex());
+ return _serializer.toObject(bytes);
+ }
+
+ public Iterator<LK> iterator() {
+ return listIterator();
+ }
+
+ /**
+ * Reverse order comparison of VPageIndexEntry objects. Only compares the
+ * lastIndex component.
+ *
+ * @param <LK>
+ */
+ private static class IndexEntryComparator<LK extends Comparable<LK>> implements
+ Comparator<Map<String, Object>> {
+
+ private final Serializer<LK> _serializer;
+
+ public IndexEntryComparator(Serializer<LK> serializer) {
+ _serializer = serializer;
+ }
+
+ public int compare(Map<String, Object> arg0, Map<String, Object> arg1) {
+ VPageIndexEntry<LK> entry0 = VPageIndexEntry.valueOf(arg0, _serializer);
+ VPageIndexEntry<LK> entry1 = VPageIndexEntry.valueOf(arg1, _serializer);
+
+ return entry1.getLastIndex().compareTo(entry0.getLastIndex());
+ }
+ }
+}
View
206 contrib/collections/src/java/voldemort/collections/VLinkedPagedListIterator.java
@@ -0,0 +1,206 @@
+package voldemort.collections;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.NoSuchElementException;
+
+import voldemort.serialization.Serializer;
+
+/**
+ *
+ */
+public class VLinkedPagedListIterator<I, LK extends Comparable<LK>> implements
+ MappedListIterator<VLinkedPagedKey, LK> {
+
+ private final Serializer<LK> _serializer;
+
+ /*
+ * Internal iterator to track the position inside the index
+ */
+ private ListIterator<byte[]> _keyIterator;
+ private VListIterator<List<byte[]>> _indexIterator;
+ private int _currentIndexId = VStack.NULL_ID;
+ private VLinkedPagedKey _lastId = null;
+
+ VLinkedPagedListIterator(VStack<I, List<byte[]>> index,
+ Serializer<LK> serializer,
+ LK linearKey,
+ boolean next,
+ int pageId) {
+ _serializer = serializer;
+ _currentIndexId = pageId;
+ if(next) {
+ _indexIterator = index.listIterator(pageId);
+ if(!_indexIterator.hasNext()) {
+ _keyIterator = new ArrayList<byte[]>(0).listIterator();
+ } else {
+ List<byte[]> byteList = _indexIterator.next().getValue();
+ if(linearKey == null) {
+ _keyIterator = byteList.listIterator();
+ } else {
+ boolean found = false;
+ int position = 0;
+ while(!found) {
+ position = Collections.binarySearch(byteList,
+ _serializer.toBytes(linearKey),
+ new LKByteReverseComparator<LK>(_serializer));
+ if(position < 0) {
+ position = -1 * (position + 1);
+ }
+ if(position < byteList.size()) {
+ found = true;
+ } else {
+ byteList = _indexIterator.next().getValue();
+ }
+ }
+ _keyIterator = byteList.listIterator(position);
+ }
+ }
+ } else {
+ _indexIterator = index.previousListIterator(pageId);
+ if(!_indexIterator.hasPrevious()) {
+ _keyIterator = new ArrayList<byte[]>(0).listIterator();
+ } else {
+ List<byte[]> byteList = _indexIterator.previous().getValue();
+ if(linearKey == null) {
+ _keyIterator = byteList.listIterator(byteList.size());
+ } else {
+ boolean found = false;
+ int position = 0;
+ while(!found) {
+ position = Collections.binarySearch(byteList,
+ serializer.toBytes(linearKey),
+ new LKByteReverseComparator<LK>(_serializer));
+ if(position < 0) {
+ position = -1 * (position + 1);
+ }
+ if(position > 0) {
+ found = true;
+ } else {
+ byteList = _indexIterator.previous().getValue();
+ }
+ }
+ // position should be no larger than byteList.size()
+ _keyIterator = byteList.listIterator(Math.min(position + 1, byteList.size()));
+ }
+ }
+ }
+ }
+
+ public void add(LK e) {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean hasNext() {
+ // put the cursor in the right position
+ if(_indexIterator.nextId() != null && _indexIterator.lastId() != null) {
+ if(_indexIterator.nextId().equals(_indexIterator.lastId())) {
+ _indexIterator.next();
+ }
+ }
+
+ while(!_keyIterator.hasNext()) {
+ if(_indexIterator.hasNext()) {
+ _currentIndexId = _indexIterator.nextId();
+ _keyIterator = _indexIterator.next().getValue().listIterator();
+ } else {
+ break;
+ }
+ }
+
+ return _keyIterator.hasNext();
+ }
+
+ public boolean hasPrevious() {
+ // put the cursor in the right position
+ if(_indexIterator.previousId() != null && _indexIterator.lastId() != null) {
+ if(_indexIterator.previousId().equals(_indexIterator.lastId())) {
+ _indexIterator.previous();
+ }
+ }
+
+ while(!_keyIterator.hasPrevious()) {
+ if(_indexIterator.hasPrevious()) {
+ _currentIndexId = _indexIterator.previousId();
+ List<byte[]> byteList = _indexIterator.previous().getValue();
+ _keyIterator = byteList.listIterator(byteList.size());
+ } else {
+ break;
+ }
+ }
+
+ return _keyIterator.hasPrevious();
+ }
+
+ public LK next() {
+ if(hasNext()) {
+ _lastId = new VLinkedPagedKey(_currentIndexId, _keyIterator.nextIndex());
+ return _serializer.toObject(_keyIterator.next());
+ } else {
+ throw new NoSuchElementException();
+ }
+ }
+
+ public VLinkedPagedKey nextId() {
+ if(hasNext())
+ return new VLinkedPagedKey(_currentIndexId, _keyIterator.nextIndex());
+ else
+ return null;
+ }
+
+ public LK previous() {
+ if(hasPrevious()) {
+ _lastId = new VLinkedPagedKey(_currentIndexId, _keyIterator.previousIndex());
+ return _serializer.toObject((_keyIterator.previous()));
+ } else {
+ throw new NoSuchElementException();
+ }
+ }
+
+ public VLinkedPagedKey previousId() {
+ if(hasPrevious())
+ return new VLinkedPagedKey(_currentIndexId, _keyIterator.previousIndex());
+ else
+ return null;
+ }
+
+ public VLinkedPagedKey lastId() {
+ return _lastId;
+ }
+
+ public void remove() {
+ throw new UnsupportedOperationException();
+ }
+
+ public void set(LK e) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Comparator that does a reverse comparison of serialized LK objects. Used
+ * because elements in the List<byte[]> in the index are sorted in
+ * descending order.
+ *
+ * @param <LK>
+ */
+ private static class LKByteReverseComparator<LK extends Comparable<LK>> implements
+ Comparator<byte[]> {
+
+ private final Serializer<LK> _serializer;
+
+ private LKByteReverseComparator(Serializer<LK> serializer) {
+ _serializer = serializer;
+ }
+
+ public int compare(byte[] arg0, byte[] arg1) {
+ LK lk0 = _serializer.toObject(arg0);
+ LK lk1 = _serializer.toObject(arg1);
+ return lk1.compareTo(lk0);
+ }
+
+ }
+
+}
View
264 contrib/collections/src/java/voldemort/collections/VListIterator.java
@@ -0,0 +1,264 @@
+package voldemort.collections;
+
+import java.util.NoSuchElementException;
+
+import voldemort.versioning.Versioned;
+
+/**
+ *
+ */
+public class VListIterator<E> implements MappedListIterator<Integer, Versioned<E>> {
+
+ private final VStack<?, E> _stack;
+
+ private Versioned<VListNode<E>> _nextNode = null;
+ private boolean _isNextSet = false;
+
+ private Versioned<VListNode<E>> _previousNode = null;
+ private boolean _isPreviousSet = false;
+
+ // last item returned by next or previous
+ private int _lastId = VStack.NULL_ID;
+ private LastCall _lastCall = null;
+
+ /**
+ * package private -- we don't want outsiders constructing this
+ *
+ * Creates a ListIterator with a cursor position specified by id and next.
+ *
+ * @param id - the id of the node to position the cursor
+ * @param next - true if the cursor is to be placed directly before the
+ * node, false if the cursor is to be placed directly after the node
+ */
+ VListIterator(VStack<?, E> stack, int id, boolean next) {
+ _stack = stack;
+
+ if(next) {
+ _nextNode = stack.getListNode(id);
+ if(_nextNode == null) {
+ if(id == 0)
+ _isPreviousSet = true;
+ else
+ throw new IndexOutOfBoundsException();
+ }
+ _isNextSet = true;
+ } else {
+ _previousNode = stack.getListNode(id);
+ if(_previousNode == null) {
+ if(id == 0)
+ _isNextSet = true;
+ else
+ throw new IndexOutOfBoundsException();
+ }
+ _isPreviousSet = true;
+ }
+ }
+
+ VListIterator(VStack<?, E> stack, int id) {
+ this(stack, id, true);
+ }
+
+ private void setPreviousNode() {
+ if(!_isPreviousSet) {
+ if(!_isNextSet)
+ throw new IllegalStateException("either next or previous must be set at any given time");
+ Integer previousId = _nextNode.getValue().getPreviousId();
+ if(previousId != VStack.NULL_ID) {
+ _previousNode = _stack.getListNode(previousId);
+ } else {
+ _previousNode = null;
+ }
+
+ _isPreviousSet = true;
+ }
+ }
+
+ private void setNextNode() {
+ if(!_isNextSet) {
+ if(!_isPreviousSet)
+ throw new IllegalStateException("either next or previous must be set at any given time");
+
+ Integer nextId = _previousNode.getValue().getNextId();
+ if(nextId != VStack.NULL_ID) {
+ _nextNode = _stack.getListNode(nextId);
+ } else {
+ _nextNode = null;
+ }
+
+ _isNextSet = true;
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.util.ListIterator#add(java.lang.Object)
+ */
+ public void add(Versioned<E> arg0) {
+ _lastId = VStack.NULL_ID;
+ _lastCall = LastCall.ADD;
+ throw new UnsupportedOperationException();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.util.ListIterator#hasNext()
+ */
+ public boolean hasNext() {
+ setNextNode();
+ return _nextNode != null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.util.ListIterator#hasPrevious()
+ */
+ public boolean hasPrevious() {
+ setPreviousNode();
+ return _previousNode