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
NEED TO ORDER COMPOSITE PRIMARY KEYS BY ORDER OF QUERY IN WHERE CLAUSE | |
ORDERING COMPOSITE PRIMARY KEYS WILL LET YOU QUERY ACCORDING TO ORDER | |
*********YOU CAN SELECT ANY NON PRIMARY KEY VALUE AS LONG AS YOU USE | |
COMPOSITE PRIMARY KEY SELECTIONS IN ORDER******************* | |
ALL DELETE QUERIES USING WHERE USE AND AND NOT , BETWEEN ALL THE PARTS OF THE COMPOSITE KEY | |
UPDATE IS AN UPSERT; YOU WILL BE WRITING OVER UNLESS YOU ARE USING COMPOSITE PRIMARY KEY TO DIFFERENTIATE | |
select * from system.schema_keyspaces; | |
create keyspace sample1 |
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
//table properties | |
with bloom_filter_fp_chance=0.01 //size tiered (default) and date tiered compaction strategy | |
with bloom_filter_fp_chance=0.1 //leveled compaction strategy | |
and caching = {'keys' : 'ALL', 'rows_per_partition' : 'NONE'} | |
//and caching = '{"keys":"ALL", "rows_per_partition":"NONE"}' |
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
with bloom_filter_fp_chance=0.01 | |
and caching = {'keys' : 'ALL', 'rows_per_partition' : 'NONE'} | |
and compaction = {'class' : 'SizeTieredCompactionStrategy', 'bucket_high' : '1.5', 'bucket_low' : '0.5', 'cold_reads_to_omit' : '0.05', 'enabled' : 'true', 'max_threshold' : '32', 'min_threshold' : '4', 'min_sstable_size' : '50', 'tombstone_compaction_interval' : '86400', 'tombstone_threshold' : '0.2', 'unchecked_tombstone_compaction' : 'false'} | |
and compression = {'sstable_compression' : 'LZ4Compressor', 'chunk_length_kb': 64, 'crc_check_chance': 1.0} | |
and dclocal_read_repair_chance = 0.1 | |
and default_time_to_live = 0 | |
and gc_grace_seconds = 864000 | |
and memtable_flush_period_in_ms = 0 | |
and read_repair_chance = 0.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
with bloom_filter_fp_chance=0.01 | |
and caching = {'keys' : 'ALL', 'rows_per_partition' : 'NONE'} | |
and compaction = {'class' : 'DateTieredCompactionStrategy', 'base_time_seconds' : '3600', 'enabled' : 'true', 'max_sstable_age_days' : '365', 'max_threshold' : '32', 'min_threshold' : '4', 'timestamp_resolution' : 'MICROSECONDS', 'tombstone_compaction_interval' : '86400', 'tombstone_threshold' : '0.2', 'unchecked_tombstone_compaction' : 'false'} | |
and compression = {'sstable_compression' : 'LZ4Compressor', 'chunk_length_kb': 64, 'crc_check_chance': 1.0} | |
and dclocal_read_repair_chance = 0.1 | |
and default_time_to_live = 0 | |
and gc_grace_seconds = 864000 | |
and memtable_flush_period_in_ms = 0 | |
and read_repair_chance = 0.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
http://docs.datastax.com/en/cql/3.3/cql/cql_reference/create_keyspace_r.html | |
CREATE KEYSPACE NTSkeyspace WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', 'datacenter1' : 1 }; | |
//gcp uses data center value | |
CREATE KEYSPACE something WITH replication = {'class': 'NetworkTopologyStrategy', 'us-central1': '3'} AND durable_writes = true; | |
define data center and rack names in the cassandra-topology.properties file |
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
create table users_by_userid ( | |
user_id timeuuid primary key, | |
username varchar, | |
hash varchar, | |
email varchar, | |
birthdate bigint) with bloom_filter_fp_chance=0.01 | |
and caching = {'keys' : 'ALL', 'rows_per_partition' : 'NONE'} | |
and compaction = {'class' : 'SizeTieredCompactionStrategy', 'bucket_high' : '1.5', 'bucket_low' : '0.5', 'cold_reads_to_omit' : '0.05', 'enabled' : 'true', 'max_threshold' : '32', 'min_threshold' : '4', 'min_sstable_size' : '50', 'tombstone_compaction_interval' : '86400', 'tombstone_threshold' : '0.2', 'unchecked_tombstone_compaction' : 'false'} | |
and compression = {'sstable_compression' : 'LZ4Compressor', 'chunk_length_kb': 64, 'crc_check_chance': 1.0} | |
and dclocal_read_repair_chance = 0.1 |
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
// | |
// UserViewController.swift | |
// | |
import UIKit | |
import DigitsKit | |
class UserViewController: UIViewController, DGTCompletionViewController { |
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
// | |
// UserViewController.swift | |
// | |
import UIKit | |
import DigitsKit | |
class UserViewController: UIViewController { |
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
#import "Helloworld.pbrpc.h" | |
#import <ProtoRPC/ProtoRPC.h> | |
#import <RxLibrary/GRXWriter+Immediate.h> | |
static NSString *const kPackageName = @"helloworld"; | |
static NSString *const kServiceName = @"Greeter"; | |
@implementation HLWGreeter |
OlderNewer