Skip to content

Instantly share code, notes, and snippets.

View rsrini7's full-sized avatar
😃
Happy

Srinivasan Ragothaman rsrini7

😃
Happy
View GitHub Profile
import org.apache.spark.storage.StorageLevel
import org.apache.spark.streaming.{ Seconds, StreamingContext }
import org.apache.spark.streaming.StreamingContext._
import org.apache.spark.streaming.twitter._
import org.sedis._
import redis.clients.jedis._
object TwitterWordCount {
def main(args: Array[String]) {
:: Name: Startup.Cmd.cmd
:: Purpose: Initializes a Windows command prompt shell
:: Author: stevejansen_github@mac.com
:: Revision: April 2012
@ECHO OFF
SETLOCAL ENABLEEXTENSIONS
:: self-install this script, but, don't force an overwrite if an auto run script is already configured
IF /I "%~1"=="/install" (
###################################################
###################################################
# Crash course
###################################################
###################################################
En
###################################################
# Quickstart
###################################################
# Remove old data
curl -XDELETE "http://localhost:9200/testindex"
# Create index with mapping
curl -XPOST "http://localhost:9200/testindex/" -d '
{
"mappings" : {
"testtype" : {
"properties" : {
"available_for_client" : {
#!/bin/sh
# one way (older scala version will be installed)
# sudo apt-get install scala
#2nd way
sudo apt-get remove scala-library scala
wget http://www.scala-lang.org/files/archive/scala-2.11.4.deb
sudo dpkg -i scala-2.11.4.deb
sudo apt-get update
### USAGE
###
### ./ElasticSearch.sh 1.5.0 will install Elasticsearch 1.5.0
### ./ElasticSearch.sh 1.4.4 will install Elasticsearch 1.4.4
### ./ElasticSearch.sh will fail because no version was specified (exit code 1)
###
### CLI options Contributed by @janpieper
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch
### ElasticSearch version
# stacktrace java as one message
multiline {
#type => "all" # no type means for all inputs
pattern => "(^.+Exception: .+)|(^\s+at .+)|(^\s+... \d+ more)|(^\s*Caused by:.+)"
what => "previous"
}
# stacktrace java as one message
multiline {
#type => "all" # no type means for all inputs
pattern => "(^.+Exception: .+)|(^\s+at .+)|(^\s+... \d+ more)|(^\s*Caused by:.+)"
what => "previous"
}
@rsrini7
rsrini7 / rc.d
Last active August 29, 2015 14:18 — forked from jippi/rc.d
update-rc.d logstash-shipper defaults
update-rc.d logstash-reader defaults
{
"title": "Apache and Tomcat Logs",
"services": {
"query": {
"list": {
"0": {
"query": "apache !tomcat !static",
"alias": "",
"color": "#7EB26D",
"id": 0,