Skip to content

Instantly share code, notes, and snippets.

View chaudum's full-sized avatar
🏠
Working from home

Christian Haudum chaudum

🏠
Working from home
View GitHub Profile
# CrateDB 2.2.7 - 2 nodes - 4GB heap
=> ~ $ cr8 timeit -s "select i.date_created as date, i.indicators as value from indicators i left join message m on i.message_id=m.id where m.sensor_id = 's:128' and i.date_created>=1489331358210 and i.date_created<=1520867358210 and m.type_id=1 order by i.date_created asc limit 1000;" --hosts st1.p.fir.io:4222 -r 100 -w 10
100%|███████████████████████████████████| 10/10 [00:00<00:00, 10.38 requests/s]
100%|█████████████████████████████████| 100/100 [00:05<00:00, 20.13 requests/s]
Runtime (in ms):
mean: 13.625 ± 0.309
min/max: 10.185 → 16.304
Percentile:
50: 13.776 ± 1.574 (stdev)
95: 16.061
<?php
require 'vendor/autoload.php';
use Crate\PDO\PDO as PDO;
$dsn = 'crate:st1.p.fir.io:44200'; // CrateDB 2.3.3 with SSL over HTTP
$crate = new PDO($dsn, 'crate', null, null);
// This is the statement from your MySQL source
// In my case I read a different table from same CrateDB cluster.
$SELECT_STMT = "SELECT siteid, interfaceid, lineid, address, userid, sitelogtypeid, title, hidden, datetime, timereceived FROM haudi.pdo_read";
diff --git a/benchmarks/src/test/java/io/crate/execution/engine/aggregation/AggregateCollectorBenchmark.java b/benchmarks/src/test/java/io/crate/execution/engine/aggregation/AggregateCollectorBenchmark.java
index 30bbd6120..7a397ec68 100644
--- a/benchmarks/src/test/java/io/crate/execution/engine/aggregation/AggregateCollectorBenchmark.java
+++ b/benchmarks/src/test/java/io/crate/execution/engine/aggregation/AggregateCollectorBenchmark.java
@@ -72,7 +72,6 @@ public class AggregateCollectorBenchmark {
RAM_ACCOUNTING_CONTEXT,
AggregateMode.ITER_FINAL,
new AggregationFunction[] { sumAggregation },
- Version.CURRENT,
BigArrays.NON_RECYCLING_INSTANCE,
@chaudum
chaudum / gist:5d0be2bd7b486bff5c8377cd408326f6
Last active December 12, 2017 07:48
Starting CrateDB with SecurityManager enabled
[2017-12-12T08:47:58,123][INFO ][o.e.n.Node ] [n1] initializing ...
[2017-12-12T08:47:58,195][INFO ][o.e.e.NodeEnvironment ] [n1] using [1] data paths, mounts [[/ (/dev/sda5)]], net usable_space [13.4gb], net total_space [54.7gb], spins? [no], types [ext4]
[2017-12-12T08:47:58,195][INFO ][o.e.e.NodeEnvironment ] [n1] heap size [3.8gb], compressed ordinary object pointers [true]
[2017-12-12T08:47:58,450][INFO ][i.c.plugin ] [n1] plugins loaded: [lang-js, jmx-monitoring]
[2017-12-12T08:47:58,557][ERROR][i.c.p.PluginLoaderPlugin ] Failed initializing TrustStore: access denied ("javax.net.ssl.SSLPermission" "setDefaultSSLContext")
[2017-12-12T08:47:58,747][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [n1] fatal error in thread [main], exiting
java.lang.ExceptionInInitializerError: null
at com.amazonaws.util.VersionInfoUtils.userAgent(VersionInfoUtils.java:142) ~[aws-java-sdk-core-1.11.218.jar:?]
at com.amazonaws.util.VersionInfoUtils.initializeUserAgent(VersionInfoUtils
REPRODUCE WITH: gradle null -Dtests.seed=50D9621F3B3625EA -Dtests.class=io.crate.integrationtests.PartitionedTableConcurrentIntegrationTest -Dtests.method="testInsertIntoDynamicObjectColumnAddsAllColumnsToTemplate" -Dtests.locale=pt -Dtests.timezone=BET
java.lang.AssertionError:
Expected: is <53L>
but: was <48L>
at __randomizedtesting.SeedInfo.seed([50D9621F3B3625EA:B3CD19454DC578C1]:0)
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at org.junit.Assert.assertThat(Assert.java:956)
at org.junit.Assert.assertThat(Assert.java:923)
at io.crate.integrationtests.PartitionedTableConcurrentIntegrationTest.testInsertIntoDynamicObjectColumnAddsAllColumnsToTemplate(PartitionedTableConcurrentIntegrationTest.java:360)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
@Nullable
private AuthenticationMethod methodForNameAndProtocol(String method, Protocol protocol) {
switch (method) {
case (TrustAuthenticationMethod.NAME):
return new TrustAuthenticationMethod(userLookup);
case (ClientCertAuth.NAME):
return new ClientCertAuth(userLookup);
case (PasswordAuthenticationMethod.NAME):
if (Protocol.POSTGRES.equals(protocol)) {
return new PasswordAuthenticationMethod(userLookup);
/*
* Licensed to Crate under one or more contributor license agreements.
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership. Crate licenses this file
* to you under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
CREATE TABLE "mqtt"."raw" (
"client_id" STRING,
"packet_id" INTEGER,
"topic" STRING,
"ts" TIMESTAMP,
"payload" OBJECT(ignored),
"day__generated" TIMESTAMP GENERATED ALWAYS AS date_trunc('day', ts)
) PARTITIONED BY ("day__generated");
CREATE TABLE t_a (
ts TIMESTAMP,
hash STRING,
granularity STRING,
value FLOAT,
part_key__generated TIMESTAMP GENERATED ALWAYS AS date_trunc(granularity, ts)
) PARTITIONED BY (granularity, part_key__generated);
INSERT INTO t_a (ts, hash, granularity, value) VALUES (1508848674000, 'abc', 'day', 0.1);
(env) dba:bwc (master*) $ python -m unittest
data path: /tmp/tmp14ka5tta
# Starting: 0.54.x
SELECT * FROM t1
SELECT * FROM t1 WHERE id = 1
SELECT * FROM t1 WHERE col_ip > '127.0.0.1'
SELECT col_bool, count(*) FROM t1 GROUP BY col_bool
Getting blob: 3579307d55e123bde331b3eefce08090bea3fbe7
# Starting: 0.57.x
SELECT * FROM t1