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 ( | |
// "flag" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"strings" |
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
#!/usr/bin/python | |
from kafka import SimpleProducer, KafkaClient, RoundRobinPartitioner, KeyedProducer | |
import os, time | |
broker = os.environ["broker"] | |
topic = os.environ["topic"] | |
parts = int(os.environ["parts"]) | |
# To send messages synchronously | |
kafka = KafkaClient(str.format('{}:9092', broker)) |
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 cascading.tuple.Fields | |
import cascading.scheme.Scheme | |
import cascading.scheme.local.{TextLine => CLTextLine, TextDelimited => CLTextDelimited} | |
import cascading.scheme.hadoop.{TextLine => CHTextLine, TextDelimited => CHTextDelimited, SequenceFile => CHSequenceFile} | |
import org.apache.hadoop.mapred.{JobConf, RecordReader, OutputCollector } | |
import com.twitter.scalding.{Args, FixedPathSource, Job, Source} | |
trait DelimitedScheme2 extends Source { | |
//override these as needed: |