-
Notifications
You must be signed in to change notification settings - Fork 988
TransportPool validation failures are not handled correctly in Spark environment #1362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
We ran into the same issue. One of the nodes on
|
Ran into this issue as well, identical to what is described in the comments above. One of the nodes in Stack trace:
|
Do we have a solution to this?
|
@jbaiera I bet this one was caused by #1244, with the addition of this line. That would be easy enough to fix here -- we could just change validate to catch EsHadoopException and check if the root cause is IOException. But I wonder if there are other things that has broken -- there are other places we have special logic for IOException. Maybe we ought to change User.doAs() to throw IOException? |
I opened #2150 as a potential fix for this. |
Fixed by #2150 |
What kind an issue is this?
[x ] Bug report.
Issue description
When elasticsearch-hadoop is used with Spark structured streaming, method org.elasticsearch.hadoop.rest.pooling.TransportPool#validate rethrows a org.elasticsearch.hadoop.EsHadoopException instead of returning false when validation fails
Steps to reproduce
Expected:
Processing continues seamlessly and the transport pool connects to the next master node in the configuration
Actual:
Spark task fails with the stack trace below
Stack trace:
The issue appears to be caused by the fact that method org.elasticsearch.hadoop.rest.commonshttp.CommonsHttpTransport#execute calls org.elasticsearch.hadoop.security.User#doAs(java.security.PrivilegedExceptionAction) when a UserProvider is defined, which in turn wraps any IOException produced by the http call in a EsHadoopException. On the other hand, the method org.elasticsearch.hadoop.rest.pooling.TransportPool#validate expects an IOException from the transport and cannot handle an EsHadoopException
Version Info
OS: : GNU/Linux (Docker) 3.10.0-957.1.3.el7.x86_64
JVM : OpenJDK 64-Bit Server VM (Zulu 8.34.0.1-CA-linux64) (build 25.201-b10, mixed mode)
Hadoop/Spark: Spark 2.4.4
ES-Hadoop : 6.7.2
ES : 6.7.2
The text was updated successfully, but these errors were encountered: