flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmetz...@apache.org
Subject [1/2] flink git commit: [FLINK-1650] Let Netty(Akka) use Slf4j
Date Fri, 27 Mar 2015 15:34:22 GMT
Repository: flink
Updated Branches:
  refs/heads/master 2d1f8b07c -> c9d29f264


[FLINK-1650] Let Netty(Akka) use Slf4j

This closes #518


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/c9d29f26
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/c9d29f26
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/c9d29f26

Branch: refs/heads/master
Commit: c9d29f2643203f4a6b330a0fff48d3760e1c6539
Parents: 973d778
Author: Robert Metzger <rmetzger@apache.org>
Authored: Mon Mar 23 14:44:19 2015 +0100
Committer: Robert Metzger <rmetzger@apache.org>
Committed: Fri Mar 27 14:50:14 2015 +0100

----------------------------------------------------------------------
 .../src/main/scala/org/apache/flink/runtime/akka/AkkaUtils.scala | 3 +++
 .../scala/org/apache/flink/runtime/jobmanager/JobManager.scala   | 1 -
 .../scala/org/apache/flink/runtime/taskmanager/TaskManager.scala | 1 -
 .../src/main/java/org/apache/flink/yarn/YarnTestBase.java        | 2 +-
 .../org/apache/flink/yarn/appMaster/YarnTaskManagerRunner.java   | 1 -
 .../src/main/scala/org/apache/flink/yarn/ApplicationMaster.scala | 4 ++--
 6 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/c9d29f26/flink-runtime/src/main/scala/org/apache/flink/runtime/akka/AkkaUtils.scala
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/scala/org/apache/flink/runtime/akka/AkkaUtils.scala b/flink-runtime/src/main/scala/org/apache/flink/runtime/akka/AkkaUtils.scala
index 423cdfd..e898f44 100644
--- a/flink-runtime/src/main/scala/org/apache/flink/runtime/akka/AkkaUtils.scala
+++ b/flink-runtime/src/main/scala/org/apache/flink/runtime/akka/AkkaUtils.scala
@@ -25,6 +25,7 @@ import akka.actor._
 import akka.pattern.{ask => akkaAsk}
 import com.typesafe.config.{Config, ConfigFactory}
 import org.apache.flink.configuration.{ConfigConstants, Configuration}
+import org.jboss.netty.logging.{Slf4JLoggerFactory, InternalLoggerFactory}
 import org.slf4j.LoggerFactory
 import scala.concurrent.{ExecutionContext, Future}
 import scala.concurrent.duration._
@@ -65,6 +66,8 @@ object AkkaUtils {
    * @return created actor system
    */
   def createActorSystem(akkaConfig: Config): ActorSystem = {
+    // Initialize slf4j as logger of Akka's Netty instead of java.util.logging (FLINK-1650)
+    InternalLoggerFactory.setDefaultFactory(new Slf4JLoggerFactory)
     ActorSystem.create("flink", akkaConfig)
   }
 

http://git-wip-us.apache.org/repos/asf/flink/blob/c9d29f26/flink-runtime/src/main/scala/org/apache/flink/runtime/jobmanager/JobManager.scala
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/scala/org/apache/flink/runtime/jobmanager/JobManager.scala
b/flink-runtime/src/main/scala/org/apache/flink/runtime/jobmanager/JobManager.scala
index 2112364..2233dbf 100644
--- a/flink-runtime/src/main/scala/org/apache/flink/runtime/jobmanager/JobManager.scala
+++ b/flink-runtime/src/main/scala/org/apache/flink/runtime/jobmanager/JobManager.scala
@@ -647,7 +647,6 @@ object JobManager {
    * @param args The command line arguments.
    */
   def main(args: Array[String]): Unit = {
-
     // startup checks and logging
     EnvironmentInformation.logEnvironmentInfo(LOG, "JobManager", args)
     EnvironmentInformation.checkJavaVersion()

http://git-wip-us.apache.org/repos/asf/flink/blob/c9d29f26/flink-runtime/src/main/scala/org/apache/flink/runtime/taskmanager/TaskManager.scala
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/scala/org/apache/flink/runtime/taskmanager/TaskManager.scala
b/flink-runtime/src/main/scala/org/apache/flink/runtime/taskmanager/TaskManager.scala
index e948dae..2f262c9 100644
--- a/flink-runtime/src/main/scala/org/apache/flink/runtime/taskmanager/TaskManager.scala
+++ b/flink-runtime/src/main/scala/org/apache/flink/runtime/taskmanager/TaskManager.scala
@@ -15,7 +15,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.flink.runtime.taskmanager
 
 import java.io.{File, IOException}

http://git-wip-us.apache.org/repos/asf/flink/blob/c9d29f26/flink-yarn-tests/src/main/java/org/apache/flink/yarn/YarnTestBase.java
----------------------------------------------------------------------
diff --git a/flink-yarn-tests/src/main/java/org/apache/flink/yarn/YarnTestBase.java b/flink-yarn-tests/src/main/java/org/apache/flink/yarn/YarnTestBase.java
index 8924eea..db1766a 100644
--- a/flink-yarn-tests/src/main/java/org/apache/flink/yarn/YarnTestBase.java
+++ b/flink-yarn-tests/src/main/java/org/apache/flink/yarn/YarnTestBase.java
@@ -78,7 +78,7 @@ public abstract class YarnTestBase {
 
 	// The tests are scanning for these strings in the final output.
 	protected final static String[] PROHIBITED_STRINGS = {
-//			"Exception", // we don't want any exceptions to happen
+			"Exception", // we don't want any exceptions to happen
 			"Started SelectChannelConnector@0.0.0.0:8081" // Jetty should start on a random port in
YARN mode.
 	};
 

http://git-wip-us.apache.org/repos/asf/flink/blob/c9d29f26/flink-yarn/src/main/java/org/apache/flink/yarn/appMaster/YarnTaskManagerRunner.java
----------------------------------------------------------------------
diff --git a/flink-yarn/src/main/java/org/apache/flink/yarn/appMaster/YarnTaskManagerRunner.java
b/flink-yarn/src/main/java/org/apache/flink/yarn/appMaster/YarnTaskManagerRunner.java
index 829007e..6fa7a61 100644
--- a/flink-yarn/src/main/java/org/apache/flink/yarn/appMaster/YarnTaskManagerRunner.java
+++ b/flink-yarn/src/main/java/org/apache/flink/yarn/appMaster/YarnTaskManagerRunner.java
@@ -45,7 +45,6 @@ public class YarnTaskManagerRunner {
 
 
 	public static void main(final String[] args) throws IOException {
-
 		EnvironmentInformation.logEnvironmentInfo(LOG, "YARN TaskManager", args);
 		EnvironmentInformation.checkJavaVersion();
 		org.apache.flink.runtime.util.SignalHandler.register(LOG);

http://git-wip-us.apache.org/repos/asf/flink/blob/c9d29f26/flink-yarn/src/main/scala/org/apache/flink/yarn/ApplicationMaster.scala
----------------------------------------------------------------------
diff --git a/flink-yarn/src/main/scala/org/apache/flink/yarn/ApplicationMaster.scala b/flink-yarn/src/main/scala/org/apache/flink/yarn/ApplicationMaster.scala
index 9c3311b..91434ee 100644
--- a/flink-yarn/src/main/scala/org/apache/flink/yarn/ApplicationMaster.scala
+++ b/flink-yarn/src/main/scala/org/apache/flink/yarn/ApplicationMaster.scala
@@ -15,7 +15,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.flink.yarn
 
 import java.io.{PrintWriter, FileWriter, BufferedWriter}
@@ -45,7 +44,8 @@ object ApplicationMaster {
   val MODIFIED_CONF_FILE = "flink-conf-modified.yaml"
   val MAX_REGISTRATION_DURATION = "5 minutes"
 
-  def main(args: Array[String]): Unit ={
+  def main(args: Array[String]): Unit = {
+
     val yarnClientUsername = System.getenv(FlinkYarnClient.ENV_CLIENT_USERNAME)
     LOG.info(s"YARN daemon runs as ${UserGroupInformation.getCurrentUser.getShortUserName}
" +
       s"setting user to execute Flink ApplicationMaster/JobManager to ${yarnClientUsername}")


Mime
View raw message