Github user marmbrus commented on a diff in the pull request:

    https://github.com/apache/spark/pull/7191#discussion_r35708168
  
    --- Diff: 
sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2Suites.scala
 ---
    @@ -545,23 +558,26 @@ abstract class HiveThriftServer2Test extends 
SparkFunSuite with BeforeAndAfterAl
     
         // Ensures that the following "tail" command won't fail.
         logPath.createNewFile()
    +    val successLines = Seq(THRIFT_BINARY_SERVICE_LIVE, 
THRIFT_HTTP_SERVICE_LIVE)
    +    val failureLines = Seq("HiveServer2 is stopped", "Exception in 
thread", "Error:")
         logTailingProcess =
           // Using "-n +0" to make sure all lines in the log file are checked.
           Process(s"/usr/bin/env tail -n +0 -f 
${logPath.getCanonicalPath}").run(ProcessLogger(
             (line: String) => {
               diagnosisBuffer += line
    -
    -          if (line.contains("ThriftBinaryCLIService listening on") ||
    -              line.contains("Started ThriftHttpCLIService in http")) {
    -            serverStarted.trySuccess(())
    -          } else if (line.contains("HiveServer2 is stopped")) {
    -            // This log line appears when the server fails to start and 
terminates gracefully (e.g.
    -            // because of port contention).
    -            serverStarted.tryFailure(new RuntimeException("Failed to start 
HiveThriftServer2"))
    -          }
    +          successLines.map(r => {
    --- End diff --
    
    `foreach`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to