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

[LIVY-1005][RSC][server][thriftserver] Optimize server logs to facili… #450

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions rsc/src/main/java/org/apache/livy/rsc/ContextLauncher.java
Original file line number Diff line number Diff line change
Expand Up @@ -397,11 +397,11 @@ public void run() {
fail(new IOException(String.format("Child process exited with code %d.", exitCode)));
}
} catch (InterruptedException ie) {
LOG.warn("Waiting thread interrupted, killing child process.");
LOG.error("Waiting thread interrupted, killing child process.", ie);
Thread.interrupted();
child.destroy();
} catch (Exception e) {
LOG.warn("Exception while waiting for child process.", e);
LOG.error("Exception while waiting for child process.", e);
} finally {
RSCClientFactory.childProcesses().decrementAndGet();
}
Expand Down Expand Up @@ -436,7 +436,7 @@ public void detach() {
try {
monitor.join(conf.getTimeAsMs(CLIENT_SHUTDOWN_TIMEOUT));
} catch (InterruptedException ie) {
LOG.debug("Interrupted before driver thread was finished.");
LOG.error("Interrupted before driver thread was finished.", ie);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public SparkSession sparkSession() {
LOG.info("Created Spark session.");
}
} catch (Exception e) {
LOG.warn("SparkSession is not supported", e);
LOG.error("SparkSession is not supported", e);
throw e;
}
}
Expand Down
2 changes: 1 addition & 1 deletion rsc/src/main/java/org/apache/livy/rsc/rpc/Rpc.java
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ private void handleCall(ChannelHandlerContext ctx, Object msg, Class<?> handleCl
}
writeMessage(MessageType.REPLY, payload);
} catch (InvocationTargetException ite) {
LOG.debug(String.format("[%s] Error in RPC handler.", name()), ite.getCause());
LOG.warn(String.format("[%s] Error in RPC handler.", name()), ite.getCause());
writeMessage(MessageType.ERROR, Utils.stackTraceAsString(ite.getCause()));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ class SparkYarnApp private[utils] (
}
} catch {
case e: Exception =>
error("Get application info error ", e)
appIdPromise.failure(e)
throw e
}
Expand Down Expand Up @@ -329,6 +330,7 @@ class SparkYarnApp private[utils] (
} catch {
// This exception might be thrown during app is starting up. It's transient.
case e: ApplicationAttemptNotFoundException =>
debug("Encountered ApplicationAttemptNotFoundException. ", e)
// Workaround YARN-4411: No enum constant FINAL_SAVING from getApplicationAttemptReport()
case e: IllegalArgumentException =>
if (e.getMessage.contains("FINAL_SAVING")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ class LivyThriftSessionManager(val server: LivyThriftServer, val livyConf: LivyC
} else {
future.value match {
case Some(Success(session)) => session
case Some(Failure(e)) => throw Option(e.getCause).getOrElse(e)
// It can`t be e.getCause because we need know the specific reason!
case Some(Failure(e)) => e
case None => throw new RuntimeException("Future cannot be None when it is completed")
}
}
Expand Down