[ 
https://issues.apache.org/jira/browse/BEAM-6052?focusedWorklogId=165860&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-165860
 ]

ASF GitHub Bot logged work on BEAM-6052:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 14/Nov/18 10:48
            Start Date: 14/Nov/18 10:48
    Worklog Time Spent: 10m 
      Work Description: Grypse opened a new pull request #7035: [BEAM-6052] 
Fixes bug in ElasticSearchIO for checkForErrors
URL: https://github.com/apache/beam/pull/7035
 
 
    @timrobertson100 @echauchot 
   The checkFor Errors method can not parse the update response before. So i 
just add the judge logical for partial update, it's a minor bug fix. 
   
   The general update response looks like this below:
   
   {
        "took": 293,
        "errors": true,
        "items": [
        {
                "update": {
                        "_index": "test_kevin_2018-11",
                        "_type": "kevin",
                        "_id": "8d7664286c0887c637229166c7c613bc",
                        "_version": 1,
                        "result": "noop",
                        "_shards": {
                                "total": 1,
                                "successful": 1,
                                "failed": 0
                        },
                        "status": 200
                }
        },                              
        {
                "update": {
                        "_index": "test_kevin_2018-11",
                        "_type": "kevin",
                        "_id": "49952be98f4fc160f56bcdb33b1dbf7e",
                        "status": 429,
                        "error": {
                                "type": "es_rejected_execution_exception",
                                "reason": "rejected execution of 
org.elasticsearch.transport.TransportService$7@3f70bbe7 on 
EsThreadPoolExecutor[name = gjzx159-node2/write, queue capacity = 200, 
org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor@56b9faa3[Running, 
pool size = 40, active threads = 40, queued tasks = 200, completed tasks = 
10034174]]"
                        }
                }
        }
   }
   
   So, we need to judge update for update path of jsonnode.
   ------------------------
   
   Follow this checklist to help us incorporate your contribution quickly and 
easily:
   
    - [ ] Format the pull request title like `[BEAM-XXX] Fixes bug in 
ApproximateQuantiles`, where you replace `BEAM-XXX` with the appropriate JIRA 
issue, if applicable. This will automatically link the pull request to the 
issue.
    - [ ] If this contribution is large, please file an Apache [Individual 
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   It will help us expedite review of your Pull Request if you tag someone 
(e.g. `@username`) to look at it.
   
   Post-Commit Tests Status (on master branch)
   
------------------------------------------------------------------------------------------------
   
   Lang | SDK | Apex | Dataflow | Flink | Gearpump | Samza | Spark
   --- | --- | --- | --- | --- | --- | --- | ---
   Go | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Go_GradleBuild/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Go_GradleBuild/lastCompletedBuild/)
 | --- | --- | --- | --- | --- | ---
   Java | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Java_GradleBuild/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_GradleBuild/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Apex_Gradle/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Apex_Gradle/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow_Gradle/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow_Gradle/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink_Gradle/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink_Gradle/lastCompletedBuild/)
 [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Gearpump_Gradle/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Gearpump_Gradle/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Samza_Gradle/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Samza_Gradle/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Spark_Gradle/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Spark_Gradle/lastCompletedBuild/)
   Python | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Python_Verify/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Python_Verify/lastCompletedBuild/)
 | --- | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Py_VR_Dataflow/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Py_VR_Dataflow/lastCompletedBuild/)
 </br> [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Py_ValCont/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Py_ValCont/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Python_VR_Flink/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Python_VR_Flink/lastCompletedBuild/)
 | --- | --- | ---
   
   
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

            Worklog Id:     (was: 165860)
            Time Spent: 10m
    Remaining Estimate: 0h

> elasticsearchIO checkForErrors method bug
> -----------------------------------------
>
>                 Key: BEAM-6052
>                 URL: https://issues.apache.org/jira/browse/BEAM-6052
>             Project: Beam
>          Issue Type: Bug
>          Components: io-java-elasticsearch
>         Environment: beam-sdk-java-io-elasticsearch-2.8.0
>            Reporter: Fred k
>            Assignee: Etienne Chauchot
>            Priority: Minor
>              Labels: easyfix
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> When i use Write to write update bulk request to elasticsearch, it appear the 
> exception below:
> {code:java}
> Caused by: java.io.IOException: Error writing to Elasticsearch, some elements 
> could not be inserted:
>     at 
> org.apache.beam.sdk.io.elasticsearch.ElasticsearchIO.checkForErrors(ElasticsearchIO.java:215)
>     at 
> org.apache.beam.sdk.io.elasticsearch.ElasticsearchIO$Write$WriteFn.flushBatch(ElasticsearchIO.java:1235)
>     at 
> org.apache.beam.sdk.io.elasticsearch.ElasticsearchIO$Write$WriteFn.processElement(ElasticsearchIO.java:1199)
> {code}
> I check the method of checkForErrors, found out that can not parse the 
> response include update contents. So i add the logic for parse update, i can 
> see the output like below:
> {code:java}
> Caused by: java.io.IOException: Error writing to Elasticsearch, some elements 
> could not be inserted:
> Document id 1465285334751e039cc4883a8a270191: rejected execution of 
> org.elasticsearch.transport.TransportService$7@6c8edc37 on 
> EsThreadPoolExecutor[name = gjzx159-node2/write, queue capacity = 200, 
> org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor@56b9faa3[Running,
>  pool size = 40, active threads = 40, queued tasks = 198, completed tasks = 
> 10324166]] (es_rejected_execution_exception)
> Document id e2722c653c65a4cb119e9b8dc44e37ad: rejected execution of 
> org.elasticsearch.transport.TransportService$7@6c8edc37 on 
> EsThreadPoolExecutor[name = gjzx159-node2/write, queue capacity = 200, 
> org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor@56b9faa3[Running,
>  pool size = 40, active threads = 40, queued tasks = 198, completed tasks = 
> 10324166]] (es_rejected_execution_exception)
> Document id b25472e3665695c49861f6eceee5531a: rejected execution of 
> org.elasticsearch.transport.TransportService$7@6c8edc37 on 
> EsThreadPoolExecutor[name = gjzx159-node2/write, queue capacity = 200, 
> org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor@56b9faa3[Running,
>  pool size = 40, active threads = 40, queued tasks = 198, completed tasks = 
> 10324166]] (es_rejected_execution_exception)
> Document id 022c1accdae82f6fe4108ba7989732fc: rejected execution of 
> org.elasticsearch.transport.TransportService$7@6c8edc37 on 
> EsThreadPoolExecutor[name = gjzx159-node2/write, queue capacity = 200, 
> org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor@56b9faa3[Running,
>  pool size = 40, active threads = 40, queued tasks = 198, completed tasks = 
> 10324166]] (es_rejected_execution_exception)
>     at 
> org.apache.beam.sdk.io.elasticsearch.ElasticsearchIO.checkForErrors(ElasticsearchIO.java:215)
>     at 
> org.apache.beam.sdk.io.elasticsearch.ElasticsearchIO$Write$WriteFn.flushBatch(ElasticsearchIO.java:1235)
>     at 
> org.apache.beam.sdk.io.elasticsearch.ElasticsearchIO$Write$WriteFn.processElement(ElasticsearchIO.java:1199)
> {code}
> the reponse content is like below:
> {
>     "took": 293,
>     "errors": true,
>     "items": [
>     {
>         "update": {
>             "_index": "test_kevin_2018-11",
>             "_type": "kevin",
>             "_id": "8d7664286c0887c637229166c7c613bc",
>             "_version": 1,
>             "result": "noop",
>             "_shards": {
>                 "total": 1,
>                 "successful": 1,
>                 "failed": 0
>             },
>             "status": 200
>         }
>     },                
>     {
>         "update": {
>             "_index": "test_kevin_2018-11",
>             "_type": "kevin",
>             "_id": "49952be98f4fc160f56bcdb33b1dbf7e",
>             "status": 429,
>             "error": {
>                 "type": "es_rejected_execution_exception",
>                 "reason": "rejected execution of 
> org.elasticsearch.transport.TransportService$7@3f70bbe7 on 
> EsThreadPoolExecutor[name = gjzx159-node2/write, queue capacity = 200, 
> org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor@56b9faa3[Running,
>  pool size = 40, active threads = 40, queued tasks = 200, completed tasks = 
> 10034174]]"
>             }
>         }
>     }
> }



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to