curl -s https://gist.githubusercontent.com/drewr/b920250c3211650bdd40/raw/optimize.py | python - INDEXNAME
% curl -O download.elasticsearch.org/stream2es/stream2es; chmod +x stream2es
{-# LANGUAGE OverloadedStrings #-} | |
module Main where | |
-- Make static: | |
-- ghc -O2 --make -static -optc-static -optl-static -fvia-C -optl-pthread fix-facter-path.hs | |
import Turtle | |
import Data.Text (Text, pack) | |
import Filesystem.Path.CurrentOS (fromText, basename, dirname) | |
import Prelude hiding (FilePath) |
Started by user anonymous | |
Building remotely on hotel (server) in workspace /h/jenkins/workspace/elastic,runbld,master | |
No JDK named ‘null’ found | |
[elastic,runbld,master] $ /usr/local/bin/runbld /tmp/hudson5777054172083384843.sh | |
user.dir /h/jenkins/workspace/elastic,runbld,master | |
>>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>> | |
"repo dir" "/h/jenkins/git-cache/elastic/runbld" | |
Exception in thread "main" java.lang.ExceptionInInitializerError | |
at java.nio.file.FileSystems.getDefault(FileSystems.java:176) | |
at java.io.File.toPath(File.java:2234) |
(ns jenky.main | |
(:gen-class) | |
(:import (hudson.remoting FileSystemJarCache | |
Launcher | |
Channel$Mode | |
StandardOutputStream))) | |
(defn -main [& args] | |
(println "jenky start" (with-out-str (pr args))) | |
(let [in System/in |
#!/usr/bin/env stack | |
-- stack runghc --package turtle | |
{-# LANGUAGE OverloadedStrings #-} | |
import Data.List | |
import Turtle | |
main :: IO () | |
main = do |
curl -s localhost:9200/download-2015.06/_search\?search_type=count -d ' | |
{ | |
"aggs": { | |
"ip_count": { | |
"cardinality": { | |
"field": "last_origin.raw" | |
} | |
} | |
}, | |
"query": { |
+---------------+ +---------------+ +---------------+ | |
| | | | | | | |
| | | | | | | |
| APP | | APP | | APP | | |
| | | | | | | |
| +----+ +----+ | | +----+ +----+ | | +----+ +----+ | | |
| | LS | | ES | | | | LS | | ES | | | | LS | | ES | | | |
+-+----+-+----+-+ +-+----+-+----+-+ +-+----+-+----+-+ | |
| | | | |
| | | |
#!/usr/bin/env runhaskell | |
{-# LANGUAGE OverloadedStrings #-} | |
import Prelude hiding (unlines, lines, length, intercalate, interact) | |
import Data.Aeson | |
import Data.Text.Lazy (Text, unlines, lines, length, intercalate, pack) | |
import Data.Text.Lazy.IO (interact) | |
import Data.Text.Lazy.Encoding (encodeUtf8) | |
import Control.Applicative |
#!/bin/sh | |
pat='.marvel-*' | |
idxs=`curl -s localhost:9200/_cat/indices/${pat}\?h=index | sort` | |
single=`echo $idxs | tail -1` | |
id=`echo $pat | sed 's/[^a-zA-Z]*//g'`-`date -u +%s` | |
d=/tmp/$id | |
if [ -d $d ]; then | |
echo $d exists, delete and rerun $0 |
% curl -s -vv https://download.elasticsearch.org/health.txt | |
* Trying 54.225.133.195... | |
* Connected to download.elasticsearch.org (54.225.133.195) port 443 (#0) | |
* successfully set certificate verify locations: | |
* CAfile: /opt/local/share/curl/curl-ca-bundle.crt | |
CApath: none | |
* TLSv1.2, TLS Unknown, Unknown (22): | |
* TLSv1.2, TLS handshake, Client hello (1): | |
* SSLv2, Unknown (22): | |
* TLSv1.2, TLS handshake, Server hello (2): |