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
from cassandra.cluster import Cluster | |
cluster = Cluster() | |
session = cluster.connect('hotbox') | |
stmt = session.prepare('INSERT INTO bitmap ( bitmap_id, db, frame, slice , filter, ChunkKey, BlockIndex, block) VALUES (?,?,?,?,?,?,?,?);') | |
data=[(8192,'007','b.n',0,0,0,0,1), | |
(8192,'007','b.n',0,0,-1,0,1), | |
(8192,'007','b.n',0,0,0,0,3), | |
(8192,'007','b.n',0,0,-1,0,2), | |
(8192,'007','b.n',0,0,0,0,7), |
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
package main | |
import ( | |
"fmt" | |
"github.com/gocql/gocql" | |
"time" | |
) | |
type bm struct { | |
id int64 |
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
curl -XPOST http://localhost:9200/parent_child --data-binary @mapping.json | |
curl -XPOST http://localhost:9200/_bulk --data-binary @bulk.json | |
curl -XPOST http://localhost:9200/parent_child/profile/_search -d'{"query":{"has_child": {"query": {"term": {"tag": 110475388978628}}, "type": "segment"}}}' | |
curl -XPOST http://localhost:9200/parent_child/profile/_count -d'{"query":{"has_child": {"query": {"term": {"tag": 110475388978628}}, "type": "segment"}}}' |
NewerOlder