Created
July 27, 2011 14:29
-
-
Save tarnacious/1109460 to your computer and use it in GitHub Desktop.
Connecting to Riak with Corrugated Iron
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ csharp | |
| Mono C# Shell, type "help;" for help | |
| Enter statements below. | |
| csharp> LoadAssembly("CorrugatedIron.dll"); | |
| csharp> var config = CorrugatedIron.Config.RiakClusterConfiguration.LoadFromConfig("riakConfig","riak.config"); | |
| csharp> var cluster = new CorrugatedIron.Comms.RiakCluster(config, new CorrugatedIron.Comms.RiakConnectionFactory()); | |
| csharp> var client = cluster.CreateClient(); | |
| csharp> var buckets = client.ListBuckets(); | |
| csharp> foreach(var bucket in buckets.Value) { Console.WriteLine(bucket); }; | |
| images | |
| images | |
| yakmr | |
| yak | |
| messages2 | |
| goog | |
| messages | |
| .. | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <configuration> | |
| <configSections> | |
| <section name="riakConfig" type="CorrugatedIron.Config.RiakClusterConfiguration, CorrugatedIron" /> | |
| </configSections> | |
| <riakConfig nodePollTime="5000" defaultRetryWaitTime="200" defaultRetryCount="3"> | |
| <nodes> | |
| <node name="dev1" hostAddress="localhost" pbcPort="8081" restScheme="http" restPort="8091" poolSize="20" /> | |
| <node name="dev2" hostAddress="localhost" pbcPort="8082" restScheme="http" restPort="8092" poolSize="20" /> | |
| <node name="dev3" hostAddress="localhost" pbcPort="8083" restScheme="http" restPort="8093" poolSize="20" /> | |
| </nodes> | |
| </riakConfig> | |
| </configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment