[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:
committed by
GitHub
parent
30dcd5cf06
commit
4ebd2db05b
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user