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
diff -rupN a/includes/database.inc b/includes/database.inc | |
--- a/includes/database.inc 2011-05-25 13:43:55.000000000 -0700 | |
+++ b/includes/database.inc 2011-12-20 18:16:01.140029674 -0800 | |
@@ -129,16 +129,17 @@ function db_set_active($name = 'default' | |
install_goto('install.php'); | |
} | |
+ // Always set the type of the active database | |
+ if (is_array($db_url)) { | |
+ $connect_url = array_key_exists($name, $db_url) ? $db_url[$name] : $db_url['default']; |
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
1) install drupal & apache | |
wget http://ftp.drupal.org/files/projects/drupal-7.12.tar.gz | |
tar zxvf drupal-7.12.tar.gz | |
sudo apt-get install apache2 php5-mysql php5-gd libapache2-mod-php5 php-apc php5-cli | |
sudo mkdir /var/www/drupal | |
sudo mv drupal-7.12/* drupal-7.12/.htaccess /var/www/drupal | |
sudo cp /var/www/drupal/sites/default/default.settings.php /var/www/drupal/sites/default/settings.php | |
sudo chown www-data:www-data /var/www/drupal/sites/default/settings.php | |
sudo mkdir /var/www/drupal/sites/default/files |
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
#!/usr/bin/env php | |
<?php | |
/** | |
* Basic tests for Akiban database. | |
* @author posulliva@akiban.com | |
* @package test/akiban | |
*/ | |
require_once dirname(__FILE__)."/../bootstrap/unit.php"; | |
require_once(SF_ROOT_DIR. '/lib/net/manhunt/search/SearchFactory.php'); |
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
IndexedSlicesQuery query; | |
vector<string> column_names; | |
column_names.push_back("full_name"); | |
column_names.push_back("birth_date"); | |
column_names.push_back("state"); | |
query.setColumns(column_names); | |
query.addGtExpression("birth_date", 1970); | |
query.addEqualsExpression("state", "UT"); | |
query.setColumnFamily("users"); | |
map<string, map<string, string> > res= c->getIndexedSlices(query); |
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
cf= tr1::shared_ptr<CassandraFactory>(new CassandraFactory("localhost", 9160)); | |
c= tr1::shared_ptr<Cassandra>(cf->create()); | |
KeyspaceDefinition ks_def; | |
ks_def.setName("demo"); | |
c->createKeyspace(ks_def); | |
ColumnFamilyDefinition cf_def; | |
cf_def.setName("users"); | |
cf_def.setKeyspaceName(ks_def.getName()); | |
ColumnDefinition name_col; |
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
c->insertColumn("bsanderson", cf_def.getName(), "full_name", "Brandon Sanderson"); | |
c->insertColumn("bsanderson", cf_def.getName(), "birth_date", 1975); | |
c->insertColumn("bsanderson", cf_def.getName(), "state", "UT"); | |
c->insertColumn("prothfuss", cf_def.getName(), "full_name", "Patrick Rothfuss"); | |
c->insertColumn("prothfuss", cf_def.getName(), "birth_date", 1973); | |
c->insertColumn("prothfuss", cf_def.getName(), "state", "WI"); | |
c->insertColumn("htayler", cf_def.getName(), "full_name", "Howard Tayler"); | |
c->insertColumn("htayler", cf_def.getName(), "birth_date", 1968); | |
c->insertColumn("htayler", cf_def.getName(), "state", "UT"); |
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
cf= tr1::shared_ptr<CassandraFactory>(new CassandraFactory("localhost", 9160)); | |
c= tr1::shared_ptr<Cassandra>(cf->create()); | |
KeyspaceDefinition ks_def; | |
ks_def.setName("demo"); | |
c->createKeyspace(ks_def); | |
ColumnFamilyDefinition cf_def; | |
cf_def.setName("users"); | |
cf_def.setKeyspaceName(ks_def.getName()); | |
ColumnDefinition name_col; |
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
require 'rubygems' | |
require 'drizzle' | |
require 'drizzle/connection' | |
host = "localhost" | |
port = 4427 | |
db = "data_dictionary" | |
con_opts = [ Drizzle::INJECTION_PREVENTION ] | |
conn = Drizzle::Connection.new(host, port, db, con_opts) |
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
require 'rubygems' | |
require 'drizzle' | |
require 'drizzle/connection' | |
host = "localhost" | |
port = 4427 | |
db = "test" | |
con_opts = [ Drizzle::INJECTION_PREVENTION ] | |
conn = Drizzle::Connection.new(host, port, db, con_opts) |
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
cluster_name: 'Drizzle Example Cluster' | |
auto_bootstrap: true | |
hinted_handoff_enabled: true | |
authenticator: org.apache.cassandra.auth.AllowAllAuthenticator | |
partitioner: org.apache.cassandra.dht.RandomPartitioner | |
data_file_directories: | |
- /u01/cassandra/data | |
seeds: | |
- 127.0.0.1 | |
disk_access_mode: auto |