This file contains 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
posulliv@aghadoe:~/repos/drizzle/local-build$ ./debug.sh $PWD | |
posulliv 25544 1 0 15:04 pts/1 00:00:00 /home/posulliv/repos/drizzle/local-build/drizzled/drizzled --no-defaults --basedir=/home/posulliv/repos/drizzle/local-build/tests --default-storage-engine=innodb --secure-file-priv=/home/posulliv/repos/drizzle/local-build/tests/var --tmpdir=/home/posulliv/repos/drizzle/local-build/tests/var/tmp --connect-timeout=60 --user=root --pid-file=/home/posulliv/repos/drizzle/local-build/tests/var/run/master.pid --port=9306 --datadir=/home/posulliv/repos/drizzle/local-build/tests/var/master-data --log=/home/posulliv/repos/drizzle/local-build/tests/var/log/master.log --server-id=1 --loose-innodb_data_file_path=ibdata1:10M:autoextend --loose-innodb-lock-wait-timeout=5 --key_buffer_size=1M --sort_buffer=256K --max_heap_table_size=1M --core-file | |
Drizzle is already running... | |
Attaching to program: /home/posulliv/repos/drizzle/local-build/drizzled/drizzled, process 25544 | |
Reading symbols from /usr/local/lib/libprotobu |
This file contains 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
posulliv@aghadoe:~/repos/drizzle/local-build$ ./debug.sh $PWD | |
Drizzle is not already running... | |
GNU gdb 6.8-debian | |
Copyright (C) 2008 Free Software Foundation, Inc. | |
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> | |
This is free software: you are free to change and redistribute it. | |
There is NO WARRANTY, to the extent permitted by law. Type "show copying" | |
and "show warranty" for details. | |
This GDB was configured as "x86_64-linux-gnu"... | |
(gdb) break main |
This file contains 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
void setAllProducts(vector<Product> &products) | |
{ | |
vector<char> raw_products(products.size() * sizeof(Product)); | |
memcpy(&raw_products[0], &products[0], products.size() * sizeof(Product)); | |
MyCache::singleton().set("AllProducts", raw_products); | |
} | |
vector<Product> getAllProducts() | |
{ | |
vector<char> raw_products = MyCache::singleton().get("AllProducts"); |
This file contains 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
/* various ways to construct a memcached client */ | |
memcache::Memcache first_client("server:11211"); | |
memcache::Memcache second_client("server1:11211 server2:11211"); | |
memcache::Memcache third_client("server", port_num); | |
/* basic operations */ | |
first_client.set("key", some_vector_of_chars, time_to_live, flags); | |
first_client.get("key", some_vector_to_fill_with_data); | |
first_client.remove("key"); |
This file contains 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
#include <vector> | |
#include <string> | |
#include <algorithm> | |
#include <string.h> | |
#include <libmemcached/memcached.hpp> | |
class MyCache | |
{ |
This file contains 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
try | |
{ | |
/* check memcached first */ | |
if (isMemcachedUsed()) | |
{ | |
getCache()->get(key, ret_val); | |
if (! ret_val.empty()) | |
{ | |
return true; | |
} |
This file contains 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
<!-- | |
~ Addresses of hosts that are deemed contact points. Cassandra nodes | |
~ use this list of hosts to find each other and learn the topology of | |
~ the ring. You must change this if you are running multiple nodes! | |
--> | |
<Seeds> | |
<Seed>cass01</Seed> | |
<Seed>cass02</Seed> | |
<Seed>cass03</Seed> | |
</Seeds> |
This file contains 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
<service_bundle type='manifest' name='oracle-database-instance'> | |
<service | |
name='application/oracle/database' | |
type='service' | |
version='1'> | |
<!-- The SMF instance name MUST match the database instance --> | |
<instance name='orcl1' enabled='false'> | |
<method_context | |
working_directory='/u01/app/oracle/product/10.2.0/db_1' |
This file contains 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
<!-- | |
~ Directories: Specify where Cassandra should store different data on | |
~ disk. Keep the data disks and the CommitLog disks separate for best | |
~ performance | |
--> | |
<CommitLogDirectory>/u02/cassandra/commitlog</CommitLogDirectory> | |
<DataFileDirectories> | |
<DataFileDirectory>/u01/cassandra/data</DataFileDirectory> | |
</DataFileDirectories> | |
<CalloutLocation>/opt/cassandra/callouts</CalloutLocation> |
This file contains 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
<service_bundle type='manifest' name='oracle-listener-instance'> | |
<service | |
name='application/oracle/listener' | |
type='service' | |
version='1'> | |
<!-- The SMF instance name MUST match the listener instance --> | |
<instance name='LISTENER' enabled='false'> | |
<method_context | |
working_directory='/u01/app/oracle/product/10.2.0/db_1' |