2017-04-12 22 views
0

索引に3つの文書を索引付けしようとしています。最初の2つを正常に索引付けできましたが、3番目の索引付け中に、端末のヒープ・スペースに関連するエラーを受け取ります。 私は4GBのRAMしか持たないので、jvm.optionsファイルでヒープサイズを3gに増やしましたが、それでもまだ役に立ちませんでした。ここに私の文書は次のようになり、以前にインデックスを付けた文書だけ座標値の変化とそれに類似している方法です。Elasticsearch OutOfMemoryError文書を索引付けする際のJavaヒープ・スペース

curl -XPUT 'localhost:9200/test/test1/2?pretty&pretty' -H 'Content-Type: application/json' -d' 

    { 
    "createdAt": "2017-03-30T12:36:28.061Z", 
    "updatedAt": "2017-03-30T12:36:28.061Z", 
    "id": "g5G4c", 
    "user": "0000-0002-1194-2058", 
    "metadata": { 
     "raw": { 
      "author": [ 
       { 
        "affiliation": [], 
        "name": "Markus Konkol", 
        "orcid": "0000-0002-4898-0314" 
       } 
      ], 
      "community": "o2r", 
      "date": "30 November 2016", 
      "depends": [ 
       { 
        "category": "CRAN Top100", 
        "identifier": "shiny", 
        "packageSystem": "https://cloud.r-project.org/", 
        "version": null 
       }, 
       { 
        "category": "none", 
        "identifier": "likert", 
        "packageSystem": "https://cloud.r-project.org/", 
        "version": null 
       } 
      ], 
      "description": null, 
      "ercIdentifier": "g5G4c", 
      "file": { 
       "filename": "main.Rmd", 
       "filepath": "g5G4c/data/main.Rmd", 
       "mimetype": "text/markdown" 
      }, 
      "generatedBy": "o2r-meta metaextract.py", 
      "inputfiles": [ 
       "/tmp/o2r/compendium/g5G4c/data/quest.csv" 
      ], 
      "interaction": { 
       "interactive": true 
      }, 
      "keywords": [], 
      "license": null, 
      "output": { 
       "html_document": { 
        "number_sections": true 
       } 
      }, 
      "paperLanguage": [ 
       "en" 
      ], 
      "paperSource": "main.Rmd", 
      "publicationDate": null, 
      "r_comment": [ 
       { 
        "feature": "comment", 
        "line": 29, 
        "text": "sum of " 
       }, 
       { 
        "feature": "comment", 
        "line": 32, 
        "text": "sum of " 
       }, 
       { 
        "feature": "comment", 
        "line": 37, 
        "text": "sum of " 
       }, 
       { 
        "feature": "comment", 
        "line": 81, 
        "text": "Participants" 
       }, 
       { 
        "feature": "comment", 
        "line": 84, 
        "text": "What are you doing in the context of scientific publications" 
       }, 
       { 
        "feature": "comment", 
        "line": 86, 
        "text": "sum of " 
       }, 
       { 
        "feature": "comment", 
        "line": 89, 
        "text": "sum of " 
       }, 
       { 
        "feature": "comment", 
        "line": 92, 
        "text": "sum of " 
       }, 
       { 
        "feature": "comment", 
        "line": 118, 
        "text": "print" 
       }, 
       { 
        "feature": "comment", 
        "line": 119, 
        "text": "print" 
       }, 
       { 
        "feature": "comment", 
        "line": 120, 
        "text": "print" 
       }, 
       { 
        "feature": "comment", 
        "line": 123, 
        "text": "What are your research fields" 
       }, 
       { 
        "feature": "comment", 
        "line": 192, 
        "text": "Please tell us your age" 
       }, 
       { 
        "feature": "comment", 
        "line": 198, 
        "text": "Please tell us your gender" 
       }, 
       { 
        "feature": "comment", 
        "line": 203, 
        "text": "Reproducible research" 
       }, 
       { 
        "feature": "comment", 
        "line": 237, 
        "text": "Interaction" 
       }, 
       { 
        "feature": "comment", 
        "line": 239, 
        "text": "Relating to your last five publications" 
       }, 
       { 
        "feature": "comment", 
        "line": 262, 
        "text": "While reading a scientific publication that is related to my own research work" 
       }, 
       { 
        "feature": "comment", 
        "line": 273, 
        "text": "It would be useful for my research work" 
       }, 
       { 
        "feature": "comment", 
        "line": 283, 
        "text": "For my research work I would like to search for other scientific publications on the web by using" 
       } 
      ], 
      "r_input": [ 
       { 
        "feature": "data input", 
        "line": 8, 
        "text": "quest.csv" 
       } 
      ], 
      "r_output": [ 
       { 
        "feature": "result", 
        "line": 67, 
        "text": "plot" 
       }, 
       { 
        "feature": "result", 
        "line": 69, 
        "text": "plot" 
       }, 
       { 
        "feature": "result", 
        "line": 76, 
        "text": "plot" 
       }, 
       { 
        "feature": "result", 
        "line": 77, 
        "text": "print" 
       }, 
       { 
        "feature": "result", 
        "line": 112, 
        "text": "plot" 
       }, 
       { 
        "feature": "result", 
        "line": 118, 
        "text": "print" 
       }, 
       { 
        "feature": "result", 
        "line": 119, 
        "text": "print" 
       }, 
       { 
        "feature": "result", 
        "line": 120, 
        "text": "print" 
       }, 
       { 
        "feature": "result", 
        "line": 179, 
        "text": "plot" 
       }, 
       { 
        "feature": "result", 
        "line": 182, 
        "text": "print" 
       }, 
       { 
        "feature": "result", 
        "line": 183, 
        "text": "print" 
       }, 
       { 
        "feature": "result", 
        "line": 184, 
        "text": "print" 
       } 
      ], 
      "recordDateCreated": "2017-03-30", 
      "runtime": "shiny", 
      "softwarePaperCitation": null, 
      "spatial": { 
       "files": [], 
       "union": [] 
      }, 
      "temporal": { 
       "begin": "2016-11-30T00:00:00", 
       "end": "2016-12-08T13:55:02" 
      }, 
      "title": "Reproducible research in Geosciences", 
      "version": null 
     }, 
     "o2r": { 
      "author": [ 
       { 
        "affiliation": [], 
        "name": "Markus Konkol", 
        "orcid": "0000-0002-4898-0314" 
       } 
      ], 
      "community": "o2r", 
      "date": "30 November 2016", 
      "depends": [ 
       { 
        "category": "CRAN Top100", 
        "identifier": "shiny", 
        "packageSystem": "https://cloud.r-project.org/", 
        "version": null 
       }, 
       { 
        "category": "none", 
        "identifier": "likert", 
        "packageSystem": "https://cloud.r-project.org/", 
        "version": null 
       } 
      ], 
      "description": null, 
      "ercIdentifier": "g5G4c", 
      "file": { 
       "filename": "main.Rmd", 
       "filepath": "g5G4c/data/main.Rmd", 
       "mimetype": "text/markdown" 
      }, 
      "generatedBy": "o2r-meta metaextract.py", 
      "inputfiles": [ 
       "/tmp/o2r/compendium/g5G4c/data/quest.csv" 
      ], 
      "interaction": { 
       "interactive": true 
      }, 
      "keywords": [], 
      "license": null, 
      "output": { 
       "html_document": { 
        "number_sections": true 
       } 
      }, 
      "paperLanguage": [ 
       "en" 
      ], 
      "paperSource": "main.Rmd", 
      "publicationDate": null, 
      "r_comment": [ 
       { 
        "feature": "comment", 
        "line": 29, 
        "text": "sum of " 
       }, 
       { 
        "feature": "comment", 
        "line": 32, 
        "text": "sum of " 
       }, 
       { 
        "feature": "comment", 
        "line": 37, 
        "text": "sum of " 
       }, 
       { 
        "feature": "comment", 
        "line": 81, 
        "text": "Participants" 
       }, 
       { 
        "feature": "comment", 
        "line": 84, 
        "text": "What are you doing in the context of scientific publications" 
       }, 
       { 
        "feature": "comment", 
        "line": 86, 
        "text": "sum of " 
       }, 
       { 
        "feature": "comment", 
        "line": 89, 
        "text": "sum of " 
       }, 
       { 
        "feature": "comment", 
        "line": 92, 
        "text": "sum of " 
       }, 
       { 
        "feature": "comment", 
        "line": 118, 
        "text": "print" 
       }, 
       { 
        "feature": "comment", 
        "line": 119, 
        "text": "print" 
       }, 
       { 
        "feature": "comment", 
        "line": 120, 
        "text": "print" 
       }, 
       { 
        "feature": "comment", 
        "line": 123, 
        "text": "What are your research fields" 
       }, 
       { 
        "feature": "comment", 
        "line": 192, 
        "text": "Please tell us your age" 
       }, 
       { 
        "feature": "comment", 
        "line": 198, 
        "text": "Please tell us your gender" 
       }, 
       { 
        "feature": "comment", 
        "line": 203, 
        "text": "Reproducible research" 
       }, 
       { 
        "feature": "comment", 
        "line": 237, 
        "text": "Interaction" 
       }, 
       { 
        "feature": "comment", 
        "line": 239, 
        "text": "Relating to your last five publications" 
       }, 
       { 
        "feature": "comment", 
        "line": 262, 
        "text": "While reading a scientific publication that is related to my own research work" 
       }, 
       { 
        "feature": "comment", 
        "line": 273, 
        "text": "It would be useful for my research work" 
       }, 
       { 
        "feature": "comment", 
        "line": 283, 
        "text": "For my research work I would like to search for other scientific publications on the web by using" 
       } 
      ], 
      "r_input": [ 
       { 
        "feature": "data input", 
        "line": 8, 
        "text": "quest.csv" 
       } 
      ], 
      "r_output": [ 
       { 
        "feature": "result", 
        "line": 67, 
        "text": "plot" 
       }, 
       { 
        "feature": "result", 
        "line": 69, 
        "text": "plot" 
       }, 
       { 
        "feature": "result", 
        "line": 76, 
        "text": "plot" 
       }, 
       { 
        "feature": "result", 
        "line": 77, 
        "text": "print" 
       }, 
       { 
        "feature": "result", 
        "line": 112, 
        "text": "plot" 
       }, 
       { 
        "feature": "result", 
        "line": 118, 
        "text": "print" 
       }, 
       { 
        "feature": "result", 
        "line": 119, 
        "text": "print" 
       }, 
       { 
        "feature": "result", 
        "line": 120, 
        "text": "print" 
       }, 
       { 
        "feature": "result", 
        "line": 179, 
        "text": "plot" 
       }, 
       { 
        "feature": "result", 
        "line": 182, 
        "text": "print" 
       }, 
       { 
        "feature": "result", 
        "line": 183, 
        "text": "print" 
       }, 
       { 
        "feature": "result", 
        "line": 184, 
        "text": "print" 
       } 
      ], 
      "recordDateCreated": "2017-03-30", 
      "runtime": "shiny", 
      "softwarePaperCitation": null, 
      "spatial": { 
        "geometry": { 
        "type": "polygon", 
          "coordinates": [ 
      [ [-93.0, 66.0], [-96.0, 50.0], [-129.0, 50.0], [-131.0, 66.0], [-93.0, 66.0] ] 
            ] 
          } 
         },         
      "temporal": { 
       "begin": "2017-08-01T22:00:00.000Z", 
       "end": "2017-03-30T12:35:41.142Z" 
      }, 
      "title": "Reproducible research in Geosciences", 
      "version": null 
     }, 
     "zenodo": { 
      "title": "Reproducible research in Geosciences" 
     }, 
     "cris": { 
      "title": "Reproducible research in Geosciences" 
     }, 
     "orcid": { 
      "title": "Reproducible research in Geosciences" 
     }, 
     "datacite": { 
      "title": "Reproducible research in Geosciences" 
     } 
    }, 
    "jobs": [], 
    "created": "2017-03-30T12:35:35.774Z", 
    "__v": 0 

}' 

インデックスマッピング

curl -XPUT 'localhost:9200/test/?pretty' -H 'Content-Type: application/json' -d' 
{ 
"mappings": { 
"test1":{ 
"properties":{ 
"metadata":{ 
"properties":{ 
"o2r":{ 
"properties":{ 
"spatial": { 
"properties": { 
"geometry": { 
"type": "geo_shape", 
"tree": "quadtree", 
"precision": "1m" 
} 
} 
} 
} 
} 
}}}}}}' 
+0

elasticsearchを実行している間に実際にヒープメモリが割り当てられていることを確認するには、htopを使用してください。 – RoiHatam

+0

ここで@RoiHatamは、インデックス作成が突然停止してヒープエラーをスローする直前のhtopターミナルです。[HTOP OUTPUT] (http://imgur.com/a/GPxSS)。おそらくそれは私がRAMではなくファイルに作成している座標オブジェクトと関係があるが、わからない! – Rehan

+0

私の提案は、メモリヒープを物理メモリーの2GBの%50に設定することです。私はそれがあなたの記憶の挫折を防ぐのに役立つかどうかはわかりません。 – RoiHatam

答えて

0

私はそれを解決することができました私のインデックスマッピングの精度を1mから2mに変更しました。私のRAMは下側にあるので、空間インデックスの精度は少し低くする必要があります。

関連する問題