{"action":"closed","issue":{"url":"https://api.github.com/repos/gitphill/es-spark/issues/1","repository_url":"https://api.github.com/repos/gitphill/es-spark","labels_url":"https://api.github.com/repos/gitphill/es-spark/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/gitphill/es-spark/issues/1/comments","events_url":"https://api.github.com/repos/gitphill/es-spark/issues/1/events","html_url":"https://github.com/gitphill/es-spark/issues/1","id":169556752,"number":1,"title":"es-spark","user":{"login":"styleNie","id":16898893,"avatar_url":"https://avatars.githubusercontent.com/u/16898893?v=3","gravatar_id":"","url":"https://api.github.com/users/styleNie","html_url":"https://github.com/styleNie","followers_url":"https://api.github.com/users/styleNie/followers","following_url":"https://api.github.com/users/styleNie/following{/other_user}","gists_url":"https://api.github.com/users/styleNie/gists{/gist_id}","starred_url":"https://api.github.com/users/styleNie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/styleNie/subscriptions","organizations_url":"https://api.github.com/users/styleNie/orgs","repos_url":"https://api.github.com/users/styleNie/repos","events_url":"https://api.github.com/users/styleNie/events{/privacy}","received_events_url":"https://api.github.com/users/styleNie/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-05T08:37:13Z","updated_at":"2016-08-19T07:26:36Z","closed_at":"2016-08-19T07:26:36Z","body":"thanks for your example for es-spark; I have some question. \r\nIs the information of elasticsearch set up in the docker-compose.yml ?\r\nI try to use es and spark in win7,but failed ,here my code\r\n\r\n```\r\nimport org.apache.spark.SparkConf\r\nimport org.apache.spark.SparkContext\r\nimport org.elasticsearch.spark._\r\nimport org.elasticsearch.spark.rdd.EsSpark\r\nobject Tryout {\r\n  def main(args: Array[String]) {\r\n    val conf = new SparkConf().setAppName(\"Tryout\").setMaster(\"local[8]\")\r\n    conf.set(\"es.index.auto.create\", \"true\")\r\n    conf.set(\"es.resource\", \"contacts/people\")\r\n    conf.set(\"es.resource.read\",\"contacts/people\")\r\n    conf.set(\"es.resource.write\",\"spark/docs\")\r\n    conf.set(\"es.nodes\",\"localhost\")\r\n    conf.set(\"es.port\",\"9200\")\r\n    conf.set(\"spark.driver.allowMultipleContexts\", \"true\")\r\n\r\n    val sc = new SparkContext(conf)\r\n    val numbers = Map(\"one\" -> 1, \"two\" -> 2, \"three\" -> 3)\r\n    val airports = Map(\"arrival\" -> \"Otopeni\", \"SFO\" -> \"San Fran\")\r\n    sc.makeRDD(Seq(numbers, airports)).saveToEs(\"spark/docs\")\r\n    sc.stop()\r\n  }\r\n}\r\n\r\n```\r\nand the maven pom\r\n```\r\n <properties>\r\n        <spark.version>1.5.2</spark.version>\r\n        <scala.binary.version>2.10</scala.binary.version>\r\n    </properties>\r\n    <dependencies>\r\n    <dependency>\r\n        <groupId>org.apache.spark</groupId>\r\n        <artifactId>spark-core_${scala.binary.version}</artifactId>\r\n        <version>${spark.version}</version>\r\n    </dependency>\r\n        <dependency>\r\n            <groupId>org.elasticsearch</groupId>\r\n            <artifactId>elasticsearch-hadoop</artifactId>\r\n            <version>2.1.0.Beta2</version>\r\n        </dependency>\r\n    </dependencies>\r\n\r\n```\r\nbut I get error \r\nException in thread \"main\" org.apache.spark.SparkException: Job aborted due to stage failure: Task 4 in stage 0.0 failed 1 times, most recent failure: Lost task 4.0 in stage 0.0 (TID 4, localhost): java.lang.StringIndexOutOfBoundsException: String index out of range: -1\r\n\r\ncan you help me? thanks!\r\n\r\n"}}
{"actor":{"display_login":"styleNie"}}