Skip to content

Instantly share code, notes, and snippets.

View ORBAT's full-sized avatar

Tom Eklöf ORBAT

  • Helsinki, Finland
View GitHub Profile
@ORBAT
ORBAT / kafka-node.log
Created September 29, 2015 17:08
kafka-node log output
2015-09-29 08:55:19 DEBUG hostname 230 [kafka-node hostname] kafka-node client connecting
2015-09-29 08:55:19 DEBUG hostname 230 [kafka-node hostname] zk init event. broker metadata {"1":{"jmx_port":9999,"timestamp":"1439178614659","host":"193.128.123.1","version":1,"port":9092},"2":{"jmx_port":9999,"timestamp":"1441420307613","host":"193.128.123.2","version":1,"port":9092},"3":{"jmx_port":9999,"timestamp":"1436510621933","host":"193.128.123.3","version":1,"port":9092}}
2015-09-29 08:55:19 DEBUG hostname 230 [kafka-node hostname] Creating broker at 193.128.123.1:9092 socketId 0 longpolling false
2015-09-29 08:55:20 DEBUG hostname 230 [kafka-node hostname] loadMetadataForTopics topics topic1 broker 193.128.123.1:9092 (socketId 0)
2015-09-29 08:55:20 DEBUG hostname 230 [kafka-node hostname] loadMetadataForTopics topics topic1 broker 193.128.123.1:9092 (socketId 0)
2015-09-29 08:55:21 DEBUG hostname 230 [kafka-node hostname] loadMetadataForTopics topics topic2 broker 193.128.123.1:9092 (socketId 0)
2015-09
@ORBAT
ORBAT / working.log
Created September 29, 2015 17:20
Working kafka-node
2015-09-29 08:53:01 DEBUG hostname2 224 [kafka-node hostname2] kafka-node client connecting
2015-09-29 08:53:01 DEBUG hostname2 224 [kafka-node hostname2] zk init event. broker metadata {"1":{"jmx_port":9999,"timestamp":"1439178614659","host":"193.128.123.1","version":1,"port":9092},"2":{"jmx_port":9999,"timestamp":"1441420307613","host":"193.128.123.2","version":1,"port":9092},"3":{"jmx_port":9999,"timestamp":"1436510621933","host":"193.128.123.3","version":1,"port":9092}}
2015-09-29 08:53:01 DEBUG hostname2 224 [kafka-node hostname2] Creating broker at 193.128.123.1:9092 socketId 0 longpolling false
2015-09-29 08:53:01 DEBUG hostname2 224 [kafka-node hostname2] socketId 0 connected to 193.128.123.1:9092
2015-09-29 08:53:03 DEBUG hostname2 224 [kafka-node hostname2] loadMetadataForTopics topics topic1 broker 193.128.123.1:9092 (socketId 0)
2015-09-29 08:53:03 DEBUG hostname2 224 [kafka-node hostname2] updateMetadatas with metadatas [{"1":{"nodeId":1,"host":"193.128.123.1","port":9092},"2":{"nodeId":2,"
@ORBAT
ORBAT / multierror.go
Created March 1, 2016 14:26
Golang snippets
import (
"fmt"
"strings"
)
// MultiError holds multiple errors
type MultiError []error
// Error implements the error interface. The returned string is not memoized, so calling
// this method ranges over the error slice and allocates a new string
2017/03/23 12:17:22 [INFO] Terraform version: 0.9.1
2017/03/23 12:17:22 [INFO] Go runtime version: go1.8
2017/03/23 12:17:22 [INFO] CLI args: []string{"/usr/local/Cellar/terraform/0.9.1_1/bin/terraform", "apply"}
2017/03/23 12:17:22 [DEBUG] Detected home directory from env var: /Users/username
2017/03/23 12:17:22 [DEBUG] Detected home directory from env var: /Users/username
2017/03/23 12:17:22 [DEBUG] Attempting to open CLI config file: /Users/username/.terraformrc
2017/03/23 12:17:22 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2017/03/23 12:17:22 [DEBUG] Detected home directory from env var: /Users/username
2017/03/23 12:17:22 [INFO] CLI command args: []string{"apply"}
2017/03/23 12:17:22 [DEBUG] command: loading backend config file: /Users/username/temp
@ORBAT
ORBAT / tree.go
Created April 25, 2017 19:41
Tree DSL
package tree
import "errors"
const (
InstrBranch = Instruction('B')
InstrRemove = Instruction('R')
InstrLeaf = Instruction('L')
)
@ORBAT
ORBAT / .block
Last active November 2, 2017 12:07 — forked from COLTstreet/.block
Zoomable Sunburst on d3.js v4 with labels
license: gpl-3.0
@ORBAT
ORBAT / README.md
Last active December 13, 2017 11:52
Zoomable sunburst with explanation text

Zoomable sunburst implementation in D3. A combination of multiple different sunburst implementations, but I can't remember which ones.

Usage

Load a CSV file using the "Browse..." button (or whatever it's called in your browser). Click on a segment to zoom in on it, click in the middle to zoom out.

The "min to show" value determines the minimum number of items required to show a branch. If you want to change it, you must do it before loading a CSV file; it can't be modified after a file has been loaded.

To load a new file, you must reload the page.

@ORBAT
ORBAT / stack.out
Created November 13, 2017 15:08
presto stack trace
com.facebook.presto.spi.PrestoException: Unexpected response from http://172.18.36.178:18080/v1/task/20171113_150356_31926_jw4ax.2.7?summarize
at com.facebook.presto.server.remotetask.SimpleHttpResponseHandler.onSuccess(SimpleHttpResponseHandler.java:71)
at com.facebook.presto.server.remotetask.SimpleHttpResponseHandler.onSuccess(SimpleHttpResponseHandler.java:27)
at com.google.common.util.concurrent.Futures$4.run(Futures.java:1135)
at io.airlift.concurrent.BoundedExecutor.drainQueue(BoundedExecutor.java:78)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException: Unable to create class com.facebook.presto.execution.TaskInfo from JSON response:
[io.airlift.jaxrs.JsonMapperParsingException: Invalid json for Java type com.facebook.presto.server.TaskUpdateRequest
@ORBAT
ORBAT / presto_session.out
Created November 13, 2017 18:40
presto isue session
Name | Value | Default | Type | Description
-------------------------------------------+----------------+----------------+---------+------------------------------------------------------------------------------------------------------
aggregation_operator_unspill_memory_limit | 4MB | 4MB | varchar | Experimental: How much memory can should be allocated per aggragation operator in unspilling process
colocated_join | false | false | boolean | Experimental: Use a colocated join when possible
dictionary_aggregation | true | true | boolean | Enable optimization for aggregations on dictionaries
distributed_index_join | false | false | boolean | Distribute index joins on join keys instead of executing inline
distributed_join | true | tru
explain with a (id, num) as (values
(1, 10)
, (2, 20)
, (4, 40)
, (5, 50)
)
, b (id, num) as (values
(1, 100)
, (2, 200)