Skip to content

Instantly share code, notes, and snippets.

View andrassy's full-sized avatar

Neil Andrassy andrassy

View GitHub Profile
{"took":653,"timed_out":false,"_shards":{"total":140,"successful":140,"skipped":0,"failed":0},"_clusters":{"total":7,"successful":7,"skipped":0},"hits":{"total":328,"max_score":null,"hits":[{"_index":"qa:applicationlogs.2018-07","_type":"taskrun","_id":"AWTRXV9Rv3z5VChZQAFB","_score":null,"_source":{"customerId":6,"ended":"2018-07-25T12:15:40.1897496+00:00","started":"2018-07-25T12:15:14.7691791+00:00","serviceId":6,"durationMs":25421,"taskId":57,"status":"Success","timestamp":"2018-07-25T12:15:14.7691791+00:00"},"fields":{"started_trimmed":[1532520914769]},"sort":[1532520914769]},{"_index":"prel:applicationlogs.2018-07","_type":"taskrun","_id":"AWTRXVsMUK3qg73fkgBl","_score":null,"_source":{"customerId":29,"ended":"2018-07-25T12:15:57.4363502+00:00","started":"2018-07-25T12:15:13.6761062+00:00","serviceId":45,"durationMs":43761,"taskId":720,"status":"Success","timestamp":"2018-07-25T12:15:13.6761062+00:00"},"fields":{"started_trimmed":[1532520913676]},"sort":[1532520913676]},{"_index":"prel:applicationlogs.2
POST _bulk/
{ "index" : { "_index" : "script_field_timefilter_20872", "_type" : "task", "_id" : "totally_inside" } }
{ "start_time": "2018-07-05T12:30:00", "end_time": "2018-07-05T13:30:00" }
{ "index" : { "_index" : "script_field_timefilter_20872", "_type" : "task", "_id" : "extends_before_and_after" } }
{ "start_time": "2018-07-05T00:00:00", "end_time": "2018-07-06T00:00:00" }
{ "index" : { "_index" : "script_field_timefilter_20872", "_type" : "task", "_id" : "extends_before" } }
{ "start_time": "2018-07-05T00:00:00", "end_time": "2018-07-05T13:00:00" }
{ "index" : { "_index" : "script_field_timefilter_20872st", "_type" : "task", "_id" : "extends_after" } }
{ "start_time": "2018-07-05T13:00:00", "end_time": "2018-07-06T00:00:00" }
import org.apache.spark.SparkContext
import org.apache.spark.SparkContext._
import org.apache.spark.SparkConf
import org.elasticsearch.spark._
import org.elasticsearch.spark.rdd.EsSpark
object ParentWithBackslash {
def main(args: Array[String]) {