Skip to content
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

[SPARK-11043][SQL]BugFix:Set the operator log in the thrift server. #9056

Closed
wants to merge 1 commit into from

Conversation

SaintBacchus
Copy link
Contributor

SessionManager will set the operationLog if the configuration hive.server2.logging.operation.enabled is true in version of hive 1.2.1.
But the spark did not adapt to this change, so no matter enabled the configuration or not, spark thrift server will always log the warn message.
PS: if hive.server2.logging.operation.enabled is false, it should log the warn message (the same as hive thrift server).

@SparkQA
Copy link

SparkQA commented Oct 10, 2015

Test build #43510 has finished for PR 9056 at commit eeb0449.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@andrewor14
Copy link
Contributor

@yhuai @liancheng

@JoshRosen
Copy link
Contributor

It looks like this overlaps with #9074, by the way.

@SaintBacchus
Copy link
Contributor Author

It does the same issue.

@@ -133,6 +133,7 @@ private[hive] class SparkExecuteStatementOperation(
}

override def run(): Unit = {
beforeRun()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't forget the afterRun()

Something like?

beforeRun();
    try {
      runInternal();
    } finally {
      afterRun();
    }

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or as #9074 did, overriding the function runInternal instead?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel the same, seems that overriding runInternal directly is a cleaner fix?

@SparkQA
Copy link

SparkQA commented Nov 3, 2015

Test build #44894 has finished for PR 9056 at commit 3f38631.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SaintBacchus
Copy link
Contributor Author

I had modify the code as you @chenghao-intel comment and also add a simple test case for it @JoshRosen .

line = reader.readLine()
}
reader.close()
assert(found)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following lines should be enough for this test case.

    val expectedLine =
      "Operation log root directory is created: " + operationLogPath.getAbsoluteFile
    assert(Source.fromFile(logPath).getLines().exists(_.contains(expectedLine)))

@liancheng
Copy link
Contributor

Mostly looks good, left two minor comments.

@SparkQA
Copy link

SparkQA commented Nov 22, 2015

Test build #46487 has finished for PR 9056 at commit d831ccf.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@JoshRosen
Copy link
Contributor

Bump @liancheng for final review and sign-off.

@liancheng
Copy link
Contributor

Thanks! Merging to master and branch-1.6.

asfgit pushed a commit that referenced this pull request Nov 24, 2015
`SessionManager` will set the `operationLog` if the configuration `hive.server2.logging.operation.enabled` is true in version of hive 1.2.1.
But the spark did not adapt to this change, so no matter enabled the configuration or not, spark thrift server will always log the warn message.
PS: if `hive.server2.logging.operation.enabled` is false, it should log the warn message (the same as hive thrift server).

Author: huangzhaowei <carlmartinmax@gmail.com>

Closes #9056 from SaintBacchus/SPARK-11043.

(cherry picked from commit d4a5e6f)
Signed-off-by: Cheng Lian <lian@databricks.com>
@asfgit asfgit closed this in d4a5e6f Nov 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants