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
| JSON (for public): | |
| { | |
| "id": "15245", | |
| "is_active": true, | |
| "name": "server #1", | |
| "agent_name": "some agent", | |
| "opts": { | |
| "option1": "defaultval", | |
| "option2": "defaultval", | |
| "option3": "something" |
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
| var swiz = require('swiz'); | |
| var O = swiz.struct.Obj; | |
| var F = swiz.struct.Field; | |
| var defs = [ | |
| O('Server', | |
| { | |
| 'fields': [ | |
| F('id', {'src': 'hash_id', 'desc': 'hash ID for the server', 'attribute': true}), | |
| F('is_active', {'src': 'active', 'desc': 'is the server active?', 'coerceTo': 'boolean'}), |
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
| Success: | |
| { hash_id: 'xkCD366', | |
| active: true, | |
| get_name: 'example', | |
| agent_name: 'my server #1', | |
| get_public_address: '42.24.42.24' } | |
| Error - invalid ip: | |
| { key: 'ipaddress', parentKeys: [], message: 'Invalid IP' |
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
| var swiz = require('swiz'); | |
| var Valve = swiz.Valve; | |
| var Chain = swiz.Chain; | |
| var O = swiz.struct.Obj; | |
| var F = swiz.struct.Field; | |
| var defs = [ | |
| O('Server', | |
| { | |
| 'fields': [ |
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"?> | |
| <server id="15245" name="server #1"> | |
| <is_active>true</is_active> | |
| <agent_name>some agent</agent_name> | |
| <public_ips> | |
| <ip>123.45.55.44</ip> | |
| <ip>122.123.32.2</ip> | |
| </public_ips> | |
| <state>active</state> | |
| <opts> |
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
| JSON: | |
| { | |
| "id": "15245", | |
| "is_active": true, | |
| "name": "server #1", | |
| "agent_name": "some agent", | |
| "public_ips": [ | |
| "123.45.55.44", | |
| "122.123.32.2" | |
| ], |
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
| { id: 15245, | |
| name: 'server #1', | |
| is_active: true, | |
| agent_name: 'some agent', | |
| public_ips: [ '123.45.55.44', '122.123.32.2' ], | |
| state: 'active', | |
| opts: | |
| { option1: 'defaultval', | |
| option2: 'defaultval', | |
| option3: 'something' }, |
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
| var swiz = require('swiz'); | |
| var O = swiz.struct.Obj; | |
| var F = swiz.struct.Field; | |
| var defs = [ | |
| O('Server', | |
| { | |
| 'fields': [ | |
| F('id', {'src': 'hash_id', 'desc': 'hash ID for the server', 'attribute': true}), | |
| F('is_active', {'src': 'active', 'desc': 'is the server active?', 'coerceTo': 'boolean'}), |
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
| var swiz = require('swiz'); | |
| var O = swiz.struct.Obj; | |
| var F = swiz.struct.Field; | |
| var defs = [ | |
| O('Server', | |
| { | |
| 'fields': [ | |
| F('id', {'src': 'hash_id', 'desc': 'hash ID for the server', 'attribute': true}), | |
| F('is_active', {'src': 'active', 'desc': 'is the server active?', 'coerceTo': 'boolean'}), |
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
| kami@lucid:~$ /opt/cassandra/bin/sstableloader KEYSPACE | |
| log4j:WARN No appenders could be found for logger (org.apache.cassandra.config.DatabaseDescriptor). | |
| log4j:WARN Please initialize the log4j system properly. | |
| log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. | |
| Starting client (and waiting 30 seconds for gossip) ... | |
| Streaming revelant part of <keyspace>/cf1-hc-248-Data.db <keyspace>/cf2-253-Data.db <keyspace>/cf3-hc-29-Data.db to [/127.0.0.1] | |
| progress: [/127.0.0.1 0/30 (0)] [total: 0 - 0MB/s (avg: 0MB/s)]Exception in thread "Streaming:1" java.lang.RuntimeException: java.net.SocketException: Connection reset | |
| at org.apache.cassandra.utils.FBUtilities.unchecked(FBUtilities.java:689) | |
| at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:34) |