[jira] [Commented] (HIVE-28007) Java 11: Failure of TimeStamp tests

2024-04-19 Thread Ayush Saxena (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-28007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17839109#comment-17839109
 ] 

Ayush Saxena commented on HIVE-28007:
-

[~kokila19] I think already have a RCA & fix, fancy a PR?

> Java 11: Failure of TimeStamp tests 
> 
>
> Key: HIVE-28007
> URL: https://issues.apache.org/jira/browse/HIVE-28007
> Project: Hive
>  Issue Type: Sub-task
>  Components: Hive
>Affects Versions: 4.1.0
>Reporter: Kokila N
>Assignee: Kokila N
>Priority: Major
>
> Test cases are failing with value changes in timestamp. Check if its jdk 
> behavioural change and solve.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Resolved] (HIVE-26339) Vectorized LIKE UDF optimization

2024-04-19 Thread Denys Kuzmenko (Jira)


 [ 
https://issues.apache.org/jira/browse/HIVE-26339?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Denys Kuzmenko resolved HIVE-26339.
---
Fix Version/s: 4.1.0
   Resolution: Fixed

> Vectorized LIKE UDF optimization
> 
>
> Key: HIVE-26339
> URL: https://issues.apache.org/jira/browse/HIVE-26339
> Project: Hive
>  Issue Type: Bug
>  Components: Vectorization
>Affects Versions: 4.0.0
>Reporter: Ryu Kobayashi
>Assignee: Ryu Kobayashi
>Priority: Major
>  Labels: pull-request-available
> Fix For: 4.1.0
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Fixed https://issues.apache.org/jira/browse/HIVE-26047 without using regular 
> expressions. Current code also confirmed that the current regular expression 
> pattern cannot be supported by the following LIKE patterns.
> End pattern
> {code:java}
> %abc\%def {code}
> Start pattern
> {code:java}
> abc\%def% {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (HIVE-26339) Vectorized LIKE UDF optimization

2024-04-19 Thread Denys Kuzmenko (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-26339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17838981#comment-17838981
 ] 

Denys Kuzmenko commented on HIVE-26339:
---

Merged to master.
Thanks for the contribution, [~ryu_kobayashi]!

> Vectorized LIKE UDF optimization
> 
>
> Key: HIVE-26339
> URL: https://issues.apache.org/jira/browse/HIVE-26339
> Project: Hive
>  Issue Type: Bug
>  Components: Vectorization
>Affects Versions: 4.0.0
>Reporter: Ryu Kobayashi
>Assignee: Ryu Kobayashi
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Fixed https://issues.apache.org/jira/browse/HIVE-26047 without using regular 
> expressions. Current code also confirmed that the current regular expression 
> pattern cannot be supported by the following LIKE patterns.
> End pattern
> {code:java}
> %abc\%def {code}
> Start pattern
> {code:java}
> abc\%def% {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (HIVE-26339) Vectorized LIKE UDF optimization

2024-04-19 Thread Denys Kuzmenko (Jira)


 [ 
https://issues.apache.org/jira/browse/HIVE-26339?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Denys Kuzmenko updated HIVE-26339:
--
Summary: Vectorized LIKE UDF optimization  (was: HIVE-26047: Vectorized 
LIKE UDF optimization)

> Vectorized LIKE UDF optimization
> 
>
> Key: HIVE-26339
> URL: https://issues.apache.org/jira/browse/HIVE-26339
> Project: Hive
>  Issue Type: Bug
>  Components: Vectorization
>Affects Versions: 4.0.0
>Reporter: Ryu Kobayashi
>Assignee: Ryu Kobayashi
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Fixed https://issues.apache.org/jira/browse/HIVE-26047 without using regular 
> expressions. Current code also confirmed that the current regular expression 
> pattern cannot be supported by the following LIKE patterns.
> End pattern
> {code:java}
> %abc\%def {code}
> Start pattern
> {code:java}
> abc\%def% {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Updated] (HIVE-26339) HIVE-26047: Vectorized LIKE UDF optimization

2024-04-19 Thread Denys Kuzmenko (Jira)


 [ 
https://issues.apache.org/jira/browse/HIVE-26339?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Denys Kuzmenko updated HIVE-26339:
--
Summary: HIVE-26047: Vectorized LIKE UDF optimization  (was: HIVE-26047 
Related LIKE pattern issues)

> HIVE-26047: Vectorized LIKE UDF optimization
> 
>
> Key: HIVE-26339
> URL: https://issues.apache.org/jira/browse/HIVE-26339
> Project: Hive
>  Issue Type: Bug
>  Components: Vectorization
>Affects Versions: 4.0.0
>Reporter: Ryu Kobayashi
>Assignee: Ryu Kobayashi
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Fixed https://issues.apache.org/jira/browse/HIVE-26047 without using regular 
> expressions. Current code also confirmed that the current regular expression 
> pattern cannot be supported by the following LIKE patterns.
> End pattern
> {code:java}
> %abc\%def {code}
> Start pattern
> {code:java}
> abc\%def% {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Created] (HIVE-28206) Preparing for 4.0.1 development

2024-04-19 Thread Denys Kuzmenko (Jira)
Denys Kuzmenko created HIVE-28206:
-

 Summary: Preparing for 4.0.1 development
 Key: HIVE-28206
 URL: https://issues.apache.org/jira/browse/HIVE-28206
 Project: Hive
  Issue Type: Task
Reporter: Denys Kuzmenko






--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Comment Edited] (HIVE-28194) Fix flaky tests in TestRetryingThriftCLIServiceClient (Failed to start HS2)

2024-04-19 Thread Araika Singh (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-28194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17838911#comment-17838911
 ] 

Araika Singh edited comment on HIVE-28194 at 4/19/24 8:41 AM:
--

Hi [~zhangbutao] ,
Thanks for replying!

Here we are not trying to solve this issue for the same test class, but for 
several classes/group of classes. There is a time gap between when we have 
chosen the port vs when actually the HS2 is started. By that time, some other 
test in parallel test split execution may pick it up as free port. 
Similar issues were fixed for other classes in the following jiras:
https://issues.apache.org/jira/browse/HIVE-18147

https://issues.apache.org/jira/browse/HIVE-19595

Moreover, test class _TestRetryingThriftCLIServiceClient_ was missed, and this 
Jira is just an extension of the same.


was (Author: JIRAUSER301024):
Hi [~zhangbutao] ,
Thanks for replying!

Here we are not trying to solve this issue for the same test class, but for 
several classes/group of class. There is a time gap between when we have chosen 
the port vs when actually the HS2 is started. By that time, some other test in 
parallel test split execution may pick it up as free port. 
Similar issues were fixed for other classes in the following jiras:
https://issues.apache.org/jira/browse/HIVE-18147

https://issues.apache.org/jira/browse/HIVE-19595

Moreover, test class _TestRetryingThriftCLIServiceClient_ was missed, and this 
Jira is just an extension of the same.

> Fix flaky tests in TestRetryingThriftCLIServiceClient (Failed to start HS2)
> ---
>
> Key: HIVE-28194
> URL: https://issues.apache.org/jira/browse/HIVE-28194
> Project: Hive
>  Issue Type: Bug
>Reporter: Araika Singh
>Assignee: Araika Singh
>Priority: Major
> Attachments: image-2024-04-19-12-21-57-577.png, 
> image-2024-04-19-12-22-47-006.png
>
>
> The following testcases are flaky in this test class:
>  # 
> *org.apache.hive.service.cli.TestRetryingThriftCLIServiceClient.testTransportClose*
>  # 
> *org.apache.hive.service.cli.TestRetryingThriftCLIServiceClient.testRetryBehaviour*
>  # 
> {*}org.apache.hive.service.cli.TestRetryingThriftCLIServiceClient.testSessionLifeAfterTransportClose{*}{*}{*}
> {code:java}
> org.apache.hive.service.ServiceException: Failed to Start HiveServer2
> at org.apache.hive.service.CompositeService.start(CompositeService.java:80)
> at org.apache.hive.service.server.HiveServer2.start(HiveServer2.java:715)
> at
> org.apache.hive.service.cli.TestRetryingThriftCLIServiceClient.startHiveServer(TestRetryingThriftCLIServiceClient.java:72)
> at
> org.apache.hive.service.cli.TestRetryingThriftCLIServiceClient.testRetryBehaviour(TestRetryingThriftCLIServiceClient.java:1
> 19)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
> Method)
> at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
> at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.lang.reflect.Method.invoke(Method.java:568)
> at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
> at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
> at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
> at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
> at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
> at 
> org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
> at 
> org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
> at 
> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
> at 
> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
> at 
> org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:379)
> at 
> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProces

[jira] [Commented] (HIVE-28194) Fix flaky tests in TestRetryingThriftCLIServiceClient (Failed to start HS2)

2024-04-19 Thread Butao Zhang (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-28194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17838912#comment-17838912
 ] 

Butao Zhang commented on HIVE-28194:


OK, if you have the solution to fix this, please feel free to submit a PR.

Thanks.

> Fix flaky tests in TestRetryingThriftCLIServiceClient (Failed to start HS2)
> ---
>
> Key: HIVE-28194
> URL: https://issues.apache.org/jira/browse/HIVE-28194
> Project: Hive
>  Issue Type: Bug
>Reporter: Araika Singh
>Assignee: Araika Singh
>Priority: Major
> Attachments: image-2024-04-19-12-21-57-577.png, 
> image-2024-04-19-12-22-47-006.png
>
>
> The following testcases are flaky in this test class:
>  # 
> *org.apache.hive.service.cli.TestRetryingThriftCLIServiceClient.testTransportClose*
>  # 
> *org.apache.hive.service.cli.TestRetryingThriftCLIServiceClient.testRetryBehaviour*
>  # 
> {*}org.apache.hive.service.cli.TestRetryingThriftCLIServiceClient.testSessionLifeAfterTransportClose{*}{*}{*}
> {code:java}
> org.apache.hive.service.ServiceException: Failed to Start HiveServer2
> at org.apache.hive.service.CompositeService.start(CompositeService.java:80)
> at org.apache.hive.service.server.HiveServer2.start(HiveServer2.java:715)
> at
> org.apache.hive.service.cli.TestRetryingThriftCLIServiceClient.startHiveServer(TestRetryingThriftCLIServiceClient.java:72)
> at
> org.apache.hive.service.cli.TestRetryingThriftCLIServiceClient.testRetryBehaviour(TestRetryingThriftCLIServiceClient.java:1
> 19)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
> Method)
> at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
> at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.lang.reflect.Method.invoke(Method.java:568)
> at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
> at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
> at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
> at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
> at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
> at 
> org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
> at 
> org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
> at 
> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
> at 
> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
> at 
> org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:379)
> at 
> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:340)
> at 
> org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:125)
> at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:413)
> Caused by: java.lang.RuntimeException: Failed to init thrift server
> at 
> org.apache.hive.service.cli.thrift.ThriftBinaryCLIService.initServer(ThriftBinaryCLIService.java:159)
> at 
> org.apache.hive.service.cli.thrift.ThriftCLIService.start(ThriftCLIService.java:226)
> at org.apache.hive.service.CompositeService.start(CompositeService.java:70)
> ... 29 more
> Caused by: org.apache.thrift.transport.TTransportException: Could not create 
> ServerSocket on address 0.0.0.0/0.0.0.0:15000.
> at org.apache.thrift.transport.TServerSocket.(TServerSocket.java:109)
> at org.apache.thrift.transport.TServerSocket.(TServerSocket.java:91)
> at org.apache.thrift.transport.TServerSocket.(TServerSocket.java:87)
> at 
> org.apache.hadoop.hive.common.auth.HiveAuthUtils.getServerSocket(HiveAuthUtils.java:159)
> at 
> org.apache.hive.service.cli.thrift.ThriftBinaryCLIService.initServer(ThriftBinaryCLIService.java:80)
> ... 31 more
> Caused by: java.net.BindException: Address already in use
> at java.base/sun.nio.ch.Net.bind0(Native Method)
> at java.base/sun.nio.ch

[jira] [Commented] (HIVE-28194) Fix flaky tests in TestRetryingThriftCLIServiceClient (Failed to start HS2)

2024-04-19 Thread Araika Singh (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-28194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17838911#comment-17838911
 ] 

Araika Singh commented on HIVE-28194:
-

Hi [~zhangbutao] ,
Thanks for replying!

Here we are not trying to solve this issue for the same test class, but for 
several classes/group of class. There is a time gap between when we have chosen 
the port vs when actually the HS2 is started. By that time, some other test in 
parallel test split execution may pick it up as free port. 
Similar issues were fixed for other classes in the following jiras:
https://issues.apache.org/jira/browse/HIVE-18147

https://issues.apache.org/jira/browse/HIVE-19595

Moreover, test class _TestRetryingThriftCLIServiceClient_ was missed, and this 
Jira is just an extension of the same.

> Fix flaky tests in TestRetryingThriftCLIServiceClient (Failed to start HS2)
> ---
>
> Key: HIVE-28194
> URL: https://issues.apache.org/jira/browse/HIVE-28194
> Project: Hive
>  Issue Type: Bug
>Reporter: Araika Singh
>Assignee: Araika Singh
>Priority: Major
> Attachments: image-2024-04-19-12-21-57-577.png, 
> image-2024-04-19-12-22-47-006.png
>
>
> The following testcases are flaky in this test class:
>  # 
> *org.apache.hive.service.cli.TestRetryingThriftCLIServiceClient.testTransportClose*
>  # 
> *org.apache.hive.service.cli.TestRetryingThriftCLIServiceClient.testRetryBehaviour*
>  # 
> {*}org.apache.hive.service.cli.TestRetryingThriftCLIServiceClient.testSessionLifeAfterTransportClose{*}{*}{*}
> {code:java}
> org.apache.hive.service.ServiceException: Failed to Start HiveServer2
> at org.apache.hive.service.CompositeService.start(CompositeService.java:80)
> at org.apache.hive.service.server.HiveServer2.start(HiveServer2.java:715)
> at
> org.apache.hive.service.cli.TestRetryingThriftCLIServiceClient.startHiveServer(TestRetryingThriftCLIServiceClient.java:72)
> at
> org.apache.hive.service.cli.TestRetryingThriftCLIServiceClient.testRetryBehaviour(TestRetryingThriftCLIServiceClient.java:1
> 19)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
> Method)
> at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
> at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.lang.reflect.Method.invoke(Method.java:568)
> at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
> at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
> at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
> at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
> at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
> at 
> org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
> at 
> org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
> at 
> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
> at 
> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
> at 
> org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:379)
> at 
> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:340)
> at 
> org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:125)
> at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:413)
> Caused by: java.lang.RuntimeException: Failed to init thrift server
> at 
> org.apache.hive.service.cli.thrift.ThriftBinaryCLIService.initServer(ThriftBinaryCLIService.java:159)
> at 
> org.apache.hive.service.cli.thrift.ThriftCLIService.start(ThriftCLIService.java:226)
> at org.apache.hive.service.CompositeService.start(CompositeService.java:70)
> ... 29 more
> Caused by: org.apache.thrift.transport.TTransportException: Could not create 
> ServerSocket on address 0.0.0.0/0.0.0.0:15000.
> at org.apache.thrift.tra

[jira] [Commented] (HIVE-28194) Fix flaky tests in TestRetryingThriftCLIServiceClient (Failed to start HS2)

2024-04-19 Thread Butao Zhang (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-28194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17838904#comment-17838904
 ] 

Butao Zhang commented on HIVE-28194:


If you run all three tests simultaneously, you may encounter the flaky case as 
the three will launch HS2 server and they will try to use the same address port.

But in the normal test situation, we only run the root test class 
*_TestRetryingThriftCLIServiceClient,_* and it will run the three tests one by 
one, so we won't encounter the issue. Hive CI also uses this way to run class 
test.

I want to know why you want to run the tests on parallel? Running one by one 
can not fit your situation?

> Fix flaky tests in TestRetryingThriftCLIServiceClient (Failed to start HS2)
> ---
>
> Key: HIVE-28194
> URL: https://issues.apache.org/jira/browse/HIVE-28194
> Project: Hive
>  Issue Type: Bug
>Reporter: Araika Singh
>Assignee: Araika Singh
>Priority: Major
> Attachments: image-2024-04-19-12-21-57-577.png, 
> image-2024-04-19-12-22-47-006.png
>
>
> The following testcases are flaky in this test class:
>  # 
> *org.apache.hive.service.cli.TestRetryingThriftCLIServiceClient.testTransportClose*
>  # 
> *org.apache.hive.service.cli.TestRetryingThriftCLIServiceClient.testRetryBehaviour*
>  # 
> {*}org.apache.hive.service.cli.TestRetryingThriftCLIServiceClient.testSessionLifeAfterTransportClose{*}{*}{*}
> {code:java}
> org.apache.hive.service.ServiceException: Failed to Start HiveServer2
> at org.apache.hive.service.CompositeService.start(CompositeService.java:80)
> at org.apache.hive.service.server.HiveServer2.start(HiveServer2.java:715)
> at
> org.apache.hive.service.cli.TestRetryingThriftCLIServiceClient.startHiveServer(TestRetryingThriftCLIServiceClient.java:72)
> at
> org.apache.hive.service.cli.TestRetryingThriftCLIServiceClient.testRetryBehaviour(TestRetryingThriftCLIServiceClient.java:1
> 19)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
> Method)
> at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
> at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.lang.reflect.Method.invoke(Method.java:568)
> at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
> at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
> at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
> at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
> at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
> at 
> org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
> at 
> org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
> at 
> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
> at 
> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
> at 
> org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:379)
> at 
> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:340)
> at 
> org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:125)
> at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:413)
> Caused by: java.lang.RuntimeException: Failed to init thrift server
> at 
> org.apache.hive.service.cli.thrift.ThriftBinaryCLIService.initServer(ThriftBinaryCLIService.java:159)
> at 
> org.apache.hive.service.cli.thrift.ThriftCLIService.start(ThriftCLIService.java:226)
> at org.apache.hive.service.CompositeService.start(CompositeService.java:70)
> ... 29 more
> Caused by: org.apache.thrift.transport.TTransportException: Could not create 
> ServerSocket on address 0.0.0.0/0.0.0.0:15000.
> at org.apache.thrift.transport.TServerSocket.(TServerSocket.java:109)
> at org.apache.thrift.transport.TServerSocket.(TServerSocket.java:91)
> at org.a