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
| { | |
| "instance": { | |
| "image_id": "ami-cd6904a4", | |
| "key_name": "1JEKQFK38J65W0R83602-staging-05", | |
| "security_groups": ["Base", "PN_KCS", "Cassandra_PN_KCS"], | |
| "instance_type": "m1.large", | |
| "min_count": 2, | |
| "max_count": 2, | |
| "instance_profile_arn": "arn:aws:iam::957700444419:instance-profile/Cassandra" | |
| }, |
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
| function h () { | |
| arg1=pop | |
| case $1 in | |
| p*) the_env=production | |
| ;; | |
| s*) the_env=staging | |
| ;; | |
| ua*) the_env=uat | |
| ;; | |
| u*) the_env=utility |
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
| def open_next_queue_file(self): | |
| """While running this method contains the only operations that | |
| will be run on the queue file. Opening the file this way will | |
| close the old one and do whatever is necessary - either re-name | |
| it if there is data, or remove it if there is no data. | |
| """ | |
| if self.queue_file: | |
| size = self.queue_file.tell() # should be at the end of the file | |
| self.queue_file.close() | |
| if size == 0: |
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
| fake_keyspace/SmallKeyValue histograms | |
| Offset SSTables Write Latency Read Latency Row Size Column Count | |
| 1 44655562 0 0 0 995193 | |
| 2 2242969 101 0 0 6265 | |
| 3 1684179 18702 37 0 12256 | |
| 4 1061248 97878 403 0 5972 | |
| 5 560443 427836 1616 0 6752 | |
| 6 258567 1594598 6098 0 6423 | |
| 7 105135 4124889 14619 0 5322 | |
| 8 37038 7449003 27035 0 5422 |
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
| # Cookbook Name:: kcb_cassandra | |
| # Description:: Put platform-style config in the platform-style location | |
| # Recipe:: knewton_conf | |
| # Author:: Peter Norton | |
| # | |
| # | |
| # XXX requires configuration from the chef-server to be there for the environment | |
| %w{ aws environment }.each do |path| | |
| directory "#{node["knewton"]["conf_dir"]}/#{path}" do |
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
| ruby_block "set_read_and_write_limits" do | |
| block do | |
| raidable_disks = [] | |
| node["ec2"].each do |k, v| | |
| if (k =~ /^block_device_mapping_ephemeral/) | |
| dev_name = "/dev/" + v.sub('sd', "xvd") | |
| if File.exist?(dev_name) | |
| raidable_disks << dev_name | |
| end | |
| end |
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
| #!/usr/bin/env python | |
| import sys | |
| import decimal | |
| from decimal import Decimal | |
| # Translated from netflix/priam | |
| # MINIMUM_TOKEN = Decimal(0) | |
| # MAXIMUM_TOKEN = Decimal(2) ** Decimal(127) |
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
| . /opt/graphite/bin/activate | |
| export PYTHONPATH=$PYTHONPATH:/opt/graphite/webapp | |
| cd /shared_space/graphite-web | |
| pip install . -U | |
| cp ~/app_settings.py /opt/graphite/webapp/graphite/app_settings.py | |
| cp ~/local_settings.py /opt/graphite/webapp/graphite/local_settings.py | |
| /opt/graphite/bin/run-graphite-devel-server.py --port 8081 /opt/graphite |
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
| ``` | |
| carbon-relaj.core=> (time | |
| #_=> (doseq [c (range 10000)] | |
| #_=> (spit "/tmp/spit-file" (str c "\n")))) | |
| "Elapsed time: 8613.006 msecs" | |
| nil | |
| carbon-relaj.core=> | |
| carbon-relaj.core=> (time | |
| #_=> (let [fname "/tmp/with-open"] |
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
| openssl s_client -connect foo:443 </dev/null 2>/dev/null | sed -n '/^-----BEGIN CERTIFICATE-----/,/-----END CERTIFICATE-----/p' | openssl x509 -text |