1
0

[MINOR] Suppressing full hive log and fetching only exceptions with context (#1903)

Co-authored-by: Bhavani Sudha Saktheeswaran <bsaktheeswaran@moveworks.ai>
This commit is contained in:
Bhavani Sudha Saktheeswaran
2020-08-02 19:44:51 -07:00
committed by GitHub
parent 30dcd5cf06
commit 4ebd2db05b

View File

@@ -236,7 +236,7 @@ public abstract class ITTestBase {
try {
// save up the Hive log files for introspection
String hiveLogStr =
executeCommandStringInDocker(HIVESERVER, "cat /tmp/root/hive.log", true).getStdout().toString();
executeCommandStringInDocker(HIVESERVER, "cat /tmp/root/hive.log | grep -i exception -A 10 -B 5", true).getStdout().toString();
String filePath = System.getProperty("java.io.tmpdir") + "/" + System.currentTimeMillis() + "-hive.log";
FileIOUtils.writeStringToFile(hiveLogStr, filePath);
LOG.info("Hive log saved up at : " + filePath);