forked from zznate/cassandra-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnpanxx_script.txt
73 lines (58 loc) · 2.41 KB
/
npanxx_script.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
drop keyspace Tutorial;
create keyspace Tutorial
with strategy_options = [{replication_factor:1}]
and placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy';
use Tutorial;
drop column family StateCity;
create column family StateCity
with comparator = LongType
and default_validation_class = 'UTF8Type'
and key_validation_class = 'UTF8Type';
drop column family AreaCode;
create column family AreaCode
with comparator = UTF8Type
and default_validation_class = 'UTF8Type'
and key_validation_class = 'UTF8Type';
drop column family Npanxx;
create column family Npanxx
with comparator = AsciiType
and default_validation_class = 'UTF8Type'
and key_validation_class = 'UTF8Type';
create column family StateNpaIndexStatic
with comparator = 'CompositeType(UTF8Type,LongType,LongType)'
and key_validation_class = 'UTF8Type'
and default_validation_class = 'UTF8Type';
create column family StateNpaIndexDynamic
with comparator = 'DynamicCompositeType(s=>UTF8Type,l=>LongType)'
and key_validation_class = 'UTF8Type'
and default_validation_class = 'UTF8Type';
set StateCity['TX Austin']['202'] = '30.27x097.74';
set StateCity['TX Austin']['203'] = '30.27x097.74';
set StateCity['TX Austin']['204'] = '30.32x097.73';
set StateCity['TX Austin']['205'] = '30.32x097.73';
set StateCity['TX Austin']['206'] = '30.32x097.73';
set AreaCode['512']['Austin__202'] = '30.27x097.74';
set AreaCode['512']['Austin__203'] = '30.27x097.74';
set AreaCode['512']['Austin__204'] = '30.32x097.73';
set AreaCode['512']['Austin__205'] = '30.32x097.73';
set AreaCode['512']['Austin__206'] = '30.32x097.73';
set Npanxx['512202']['city'] = 'Austin';
set Npanxx['512202']['state'] = 'TX';
set Npanxx['512202']['lat'] = '30.27';
set Npanxx['512202']['lng'] = '097.74';
set Npanxx['512203']['city'] = 'Austin';
set Npanxx['512203']['state'] = 'TX';
set Npanxx['512203']['lat'] = '30.27';
set Npanxx['512203']['lng'] = '097.74';
set Npanxx['512204']['city'] = 'Austin';
set Npanxx['512204']['state'] = 'TX';
set Npanxx['512204']['lat'] = '30.32';
set Npanxx['512204']['lng'] = '097.73';
set Npanxx['512205']['city'] = 'Austin';
set Npanxx['512205']['state'] = 'TX';
set Npanxx['512205']['lat'] = '30.32';
set Npanxx['512205']['lng'] = '097.73';
set Npanxx['512206']['city'] = 'Austin';
set Npanxx['512206']['state'] = 'TX';
set Npanxx['512206']['lat'] = '30.32';
set Npanxx['512206']['lng'] = '097.73';