[SPARK-28763][SQL][TEST] Flaky Tests: SparkThriftServerProtocolVersionsSuite.HIVE_CLI_SERVICE_PROTOCOL_V1 get binary type#25480
[SPARK-28763][SQL][TEST] Flaky Tests: SparkThriftServerProtocolVersionsSuite.HIVE_CLI_SERVICE_PROTOCOL_V1 get binary type#25480wangyum wants to merge 2 commits into
Conversation
|
retest this please |
|
Test build #109253 has finished for PR 25480 at commit
|
|
Test build #109254 has finished for PR 25480 at commit
|
|
retest this please |
1 similar comment
|
retest this please |
| } | ||
| testExecuteStatementWithProtocolVersion(version, "SELECT cast(49960 as binary)") { rs => | ||
| testExecuteStatementWithProtocolVersion(version, | ||
| "SELECT cast(cast(49960 as int) as binary)") { rs => |
|
Test build #109256 has finished for PR 25480 at commit
|
|
Thank you for the fix. I also have the same question like @HyukjinKwon . |
| assert(rs.getString(1) === UTF8String.fromBytes(NumberConverter.toBinary(49960)).toString) | ||
| assertResult(Array(0, 0, 65533, 40).map(_.toChar)) { | ||
| rs.getString(1).toCharArray | ||
| } |
There was a problem hiding this comment.
@dongjoon-hyun @HyukjinKwon Maybe we should uses CharArray.
There was a problem hiding this comment.
What is the difference? Could you tell us the root cause you think?
There was a problem hiding this comment.
I'm not sure. May be related to environment:
https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/4832/
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/109194/testReport/
These two PullRequestBuilders are built on the same machine(amp-jenkins-worker-03). The first one failed, but the last one successful. The environment differences:

There was a problem hiding this comment.
Maybe, something like LANG=en_US.UTF_8?
There was a problem hiding this comment.
@shaneknapp I'd set it everywhere, personally, if it's easy.
There was a problem hiding this comment.
it's easy, but requires each worker to be disconnected/reconnected... i'll get that set up now but it won't go in to effect until i have the opportunity to restart things.
There was a problem hiding this comment.
Thank you for investigating this so far, @wangyum . Yes. It looks like that.
You can close this and the JIRA together. If the failure is reported again, we can reopen this.
|
Test build #109261 has finished for PR 25480 at commit
|
|
@wangyum . In the same test log, there are 8 protocols and |
## What changes were proposed in this pull request?
This PR fix Hive 0.12 JDBC client can not handle binary type:
```sql
Connected to: Hive (version 3.0.0-SNAPSHOT)
Driver: Hive (version 0.12.0)
Transaction isolation: TRANSACTION_REPEATABLE_READ
Beeline version 0.12.0 by Apache Hive
0: jdbc:hive2://localhost:10000> SELECT cast('ABC' as binary);
Error: java.lang.ClassCastException: [B incompatible with java.lang.String (state=,code=0)
```
Server log:
```
19/08/07 10:10:04 WARN ThriftCLIService: Error fetching results:
java.lang.RuntimeException: java.lang.ClassCastException: [B incompatible with java.lang.String
at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:83)
at org.apache.hive.service.cli.session.HiveSessionProxy.access$000(HiveSessionProxy.java:36)
at org.apache.hive.service.cli.session.HiveSessionProxy$1.run(HiveSessionProxy.java:63)
at java.security.AccessController.doPrivileged(AccessController.java:770)
at javax.security.auth.Subject.doAs(Subject.java:422)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1746)
at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:59)
at com.sun.proxy.$Proxy26.fetchResults(Unknown Source)
at org.apache.hive.service.cli.CLIService.fetchResults(CLIService.java:455)
at org.apache.hive.service.cli.thrift.ThriftCLIService.FetchResults(ThriftCLIService.java:621)
at org.apache.hive.service.cli.thrift.TCLIService$Processor$FetchResults.getResult(TCLIService.java:1553)
at org.apache.hive.service.cli.thrift.TCLIService$Processor$FetchResults.getResult(TCLIService.java:1538)
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:38)
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
at org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:53)
at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:819)
Caused by: java.lang.ClassCastException: [B incompatible with java.lang.String
at org.apache.hive.service.cli.ColumnValue.toTColumnValue(ColumnValue.java:198)
at org.apache.hive.service.cli.RowBasedSet.addRow(RowBasedSet.java:60)
at org.apache.hive.service.cli.RowBasedSet.addRow(RowBasedSet.java:32)
at org.apache.spark.sql.hive.thriftserver.SparkExecuteStatementOperation.$anonfun$getNextRowSet$1(SparkExecuteStatementOperation.scala:151)
at org.apache.spark.sql.hive.thriftserver.SparkExecuteStatementOperation$$Lambda$1923.000000009113BFE0.apply(Unknown Source)
at org.apache.spark.sql.hive.thriftserver.SparkExecuteStatementOperation.withSchedulerPool(SparkExecuteStatementOperation.scala:299)
at org.apache.spark.sql.hive.thriftserver.SparkExecuteStatementOperation.getNextRowSet(SparkExecuteStatementOperation.scala:113)
at org.apache.hive.service.cli.operation.OperationManager.getOperationNextRowSet(OperationManager.java:220)
at org.apache.hive.service.cli.session.HiveSessionImpl.fetchResults(HiveSessionImpl.java:785)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:78)
... 18 more
```
## How was this patch tested?
unit tests
Closes #25379 from wangyum/SPARK-28474.
Authored-by: Yuming Wang <yumwang@ebay.com>
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
What changes were proposed in this pull request?
This pr try to fix flaky tests:
https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/4832/testReport/
How was this patch tested?
N/A