Skip to content

Instantly share code, notes, and snippets.

/**
* @author Danny Miller k2xl@k2xl.com
*/
import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import backtype.storm.task.OutputCollector;
// Copyright 2014 BrightTag, Inc. All rights reserved.
package com.brighttag.storm.utils;
import backtype.storm.tuple.Values;
import storm.trident.operation.BaseFunction;
import storm.trident.operation.TridentCollector;
import storm.trident.tuple.TridentTuple;
/**
* Converts the first tuple from a byte array into a string.
import java.io.IOException;
import java.util.Properties;
import kafka.server.KafkaConfig;
import kafka.server.KafkaServerStartable;
public class KafkaLocal {
public KafkaServerStartable kafka;
public ZooKeeperLocal zookeeper;

Live Coding a KSQL Application

Introduction

# Get all the top-5 charts across all instances
$ http://localhost:7070/kafka-music/charts/genre/punk
[
  {
    "artist":"Wheres The Pope?",
 "album":"PSI",
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF 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
*
@miguno
miguno / Mac Keyboard Symbols.md
Created September 9, 2019 19:28 — forked from Zenexer/Mac Keyboard Symbols.md
List of Mac/Apple keyboard symbols

Common symbols

Modifiers

When a key combination is displayed, the modifiers are written in the order presented here. For example, Control + Option + Shift + Command + Q would be written as ⌃⌥⇧⌘Q.

Sym Key Alt
Control
Option
@miguno
miguno / interactive-queries_app-instances-for-a-store.md
Created October 31, 2018 16:27 — forked from enothereska/interactive-queries_app-instances-for-a-store.md
List running app instances that currently manage (parts of) state store "top-five-songs"
# List running app instances that currently manage (parts of) state store "top-five-songs"
$ http://localhost:7070/kafka-music/instances/top-five-songs
[
	{
		"host": "localhost",
 "port": 7070,
@miguno
miguno / interactive-queries_list-app-instances.md
Last active May 14, 2021 15:37 — forked from enothereska/interactive-queries_list-app-instances.md
List all running instances of this application
# List all running instances of this application
$ http://localhost:7070/kafka-music/instances
[
	{
		"host": "localhost",
 "port": 7070,
# Get all the top-5 charts across all instances
$ http://localhost:7070/kafka-music/charts/top-five
[
  {
    "artist":"Hilltop Hoods",
 "album":"The Calling",