Skip to content

Instantly share code, notes, and snippets.

/**
* @file Defines the API for a QueryRewriter.
*/
namespace drizzled
{
namespace plugin
{
<Keyspace Name="drizzle">
<ColumnFamily CompareWith="BytesType"
Name="Data"
RowsCached="10%"
KeysCachedFraction="0"/>
<ColumnFamily CompareWith="UTF8Type" Name="Tables"/>
</Keyspace>
#include <string.h>
#include <sstream>
#include <iostream>
#include <stdlib.h>
#include "Cassandra.h"
#include <protocol/TBinaryProtocol.h>
#include <transport/TSocket.h>
#include <transport/TTransportUtils.h>
export JAVA_HOME=/usr/lib/jvm/java-6-openjdk
export HADOOP_HOME=/opt/hadoop
export HADOOP_CONF=$HADOOP_HOME/conf
export HADOOP_PATH=$HADOOP_HOME/bin
export HIVE_HOME=/opt/hive
export HIVE_PATH=$HIVE_HOME/bin
export PATH=$HIVE_PATH:$HADOOP_PATH:$PATH
use strict;
use warnings;
my $CUR_HOSTNAME = `hostname -s`;
chomp($CUR_HOSTNAME);
my $NUM_OF_RECORDS_1TB = 10000000000;
my $NUM_OF_RECORDS_535MB = 100;
my $BASE_OUTPUT_DIR = "/data";
my $PATTERN_STRING = "XYZ";
#Properties for Catalog Generation
##################################
nodes_file=machines.txt
relations_unchunked=grep, EntireRankings
relations_chunked=Rankings, UserVisits
catalog_file=HadoopDB.xml
##
#DB Connection Parameters
##
port=3306
core-site.xml
<configuration>
<property>
<name>hadoop.tmp.dir</name>
<value>/opt/hadoop-data/tmp-base</value>
<description>A base for other temporary directories</description>
</property>
[plugin]
name=cassandra_applier
version=0.1
author=Padraig O'Sullivan
license=PLUGIN_LICENSE_BSD
title=Cassandra Applier
description=Replicator plugin that publishes transactions to Cassandra
load_by_default=yes
disabled=no
sources=cassandra_applier.cc
PANDORA_HAVE_LIBCASSANDRA
PANDORA_HAVE_THRIFT
AS_IF([test "x$ac_cv_libcassandra" = "xno" -a "x$ac_cv_libthrift" = "xno"],
AC_MSG_WARN([libcassandra not found: not building cassandra storage engine.]))
DRIZZLED_PLUGIN_DEP_LIBS="${DRIZZLED_PLUGIN_DEP_LIBS} ${LTLIBCASSANDRA} ${LTLIBTHRIFT}"
plugin::ReplicationReturnCode CassandraApplier::apply(Session &,
const message::Transaction &to_apply)
{
try
{
tr1::shared_ptr<Cassandra> client(factory->create());
tr1::shared_ptr<Keyspace> keyspace(client->getKeyspace(keyspace_name));
size_t num_stmts= to_apply.statement_size();
size_t x;