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"}}}' |
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
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
package main | |
import ( | |
"fmt" | |
"github.com/gocql/gocql" | |
"os" | |
"time" | |
) | |
type bm struct { |
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 bitmap2 ( bitmap_id, block) VALUES (?,?);') | |
session.execute('truncate bitmap2') | |
out = open("/tmp/cass_py","w") | |
for ids in range(32): | |
val=0 | |
for i in range(0,64): |
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" | |
func takesString(str string) {} | |
func returnInterface(str string) interface{} { | |
return str | |
} |
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
. | |
└── taxi | |
├── cab_type | |
│ └── views | |
│ └── standard | |
│ └── fragments | |
├── cost_cents | |
│ └── views | |
│ └── bsig_cost_cents | |
│ └── fragments |
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
Script started on 2019-08-14 19:13:19+0000 | |
To run a command as administrator (user "root"), use "sudo <command>". | |
See "man sudo_root" for details. | |
]0;ubuntu@experiment-33bafd31037788eb: ~[01;32mubuntu@experiment-33bafd31037788eb[00m:[01;34m~[00m$ df | |
Filesystem 1K-blocks Used Available Use% Mounted on | |
udev 61870868 0 61870868 0% /dev | |
tmpfs 12376772 892 12375880 1% /run | |
/dev/sda1 9983232 1655520 8311328 17% / | |
tmpfs 61883856 0 61883856 0% /dev/shm |
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
import org.apache.spark.sql.SparkSession | |
import org.apache.log4j.{Level, Logger} | |
object SimpleApp { | |
def main(args: Array[String]) { | |
Logger.getLogger("org.apache.spark").setLevel(Level.WARN) | |
val logFile = "/mnt/disks/data1/yellow_tripdata_2015-01.csv" | |
val spark = SparkSession.builder.appName("Simple Application").getOrCreate() |
OlderNewer