forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
check bulk indexing error for permanent problems
fixes elastic#50122
- Loading branch information
Hendrik Muhs
committed
Jan 22, 2020
1 parent
a6fa577
commit d2b17bf
Showing
7 changed files
with
159 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
...orm/src/main/java/org/elasticsearch/xpack/transform/transforms/BulkIndexingException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
package org.elasticsearch.xpack.transform.transforms; | ||
|
||
import org.elasticsearch.ElasticsearchException; | ||
|
||
// Wrapper for indexing failures thrown internally in the transform indexer | ||
class BulkIndexingException extends ElasticsearchException { | ||
private final boolean irrecoverable; | ||
|
||
/** | ||
* Create a BulkIndexingException | ||
* | ||
* @param msg The message | ||
* @param cause The most important cause of the bulk indexing failure | ||
* @param irrecoverable whether this is a permanent or irrecoverable error (controls retry) | ||
* @param args arguments for formating the message | ||
*/ | ||
BulkIndexingException(String msg, Throwable cause, boolean irrecoverable, Object... args) { | ||
super(msg, cause, args); | ||
this.irrecoverable = irrecoverable; | ||
} | ||
|
||
public boolean isIrrecoverable() { | ||
return irrecoverable; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...nsform/src/main/java/org/elasticsearch/xpack/transform/transforms/TransformException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
package org.elasticsearch.xpack.transform.transforms; | ||
|
||
import org.elasticsearch.ElasticsearchException; | ||
|
||
class TransformException extends ElasticsearchException { | ||
TransformException(String msg, Throwable cause, Object... args) { | ||
super(msg, cause, args); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters