Repository: ambari Updated Branches: refs/heads/branch-2.2 5edcf8a27 -> f36059e26
AMBARI-15753. Ambari Views : Reverting the changes for separation of logs in ambari branch-2.2 (Nitiraj Rathore via pallavkul) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f36059e2 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f36059e2 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f36059e2 Branch: refs/heads/branch-2.2 Commit: f36059e262dc62b560580c5e98af0323f44be4d4 Parents: 5edcf8a Author: Pallav Kulshreshtha <[email protected]> Authored: Thu Apr 7 18:39:51 2016 +0530 Committer: Pallav Kulshreshtha <[email protected]> Committed: Thu Apr 7 18:39:51 2016 +0530 ---------------------------------------------------------------------- .../apache/ambari/server/view/ViewRegistry.java | 13 ---------- contrib/views/capacity-scheduler/pom.xml | 1 - .../src/main/resources/view.log4j.properties | 24 ------------------- contrib/views/files/pom.xml | 1 - .../src/main/resources/view.log4j.properties | 24 ------------------- contrib/views/hive/pom.xml | 1 - .../src/main/resources/view.log4j.properties | 25 -------------------- contrib/views/jobs/pom.xml | 1 - .../src/main/resources/view.log4j.properties | 25 -------------------- contrib/views/pig/pom.xml | 1 - .../src/main/resources/view.log4j.properties | 24 ------------------- contrib/views/slider/pom.xml | 1 - .../src/main/resources/view.log4j.properties | 24 ------------------- .../src/main/resources/view.log4j.properties | 24 ------------------- contrib/views/tez/pom.xml | 1 - .../src/main/resources/view.log4j.properties | 24 ------------------- 16 files changed, 214 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/f36059e2/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java index a75126e..8b1f26e 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java @@ -89,7 +89,6 @@ import org.apache.ambari.view.ViewDefinition; import org.apache.ambari.view.ViewResourceHandler; import org.apache.ambari.view.events.Event; import org.apache.ambari.view.events.Listener; -import org.apache.log4j.PropertyConfigurator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.security.core.GrantedAuthority; @@ -100,7 +99,6 @@ import javax.inject.Singleton; import java.beans.IntrospectionException; import java.io.File; -import java.net.URL; import java.util.Collection; import java.util.Collections; import java.util.HashMap; @@ -129,7 +127,6 @@ public class ViewRegistry { protected static final int DEFAULT_REQUEST_CONNECT_TIMEOUT = 5000; protected static final int DEFAULT_REQUEST_READ_TIMEOUT = 10000; private static final String VIEW_AMBARI_VERSION_REGEXP = "^((\\d+\\.)?)*(\\*|\\d+)$"; - private static final String VIEW_LOG_FILE = "view.log4j.properties"; /** * Thread pool @@ -1544,8 +1541,6 @@ public class ViewRegistry { // extract the archive and get the class loader ClassLoader cl = extractor.extractViewArchive(viewDefinition, archiveFile, extractedArchiveDirFile); - configureViewLogging(viewDefinition,cl); - ViewConfig viewConfig = archiveUtility.getViewConfigFromExtractedArchive(extractedArchiveDirPath, configuration.isViewValidationEnabled()); @@ -1578,14 +1573,6 @@ public class ViewRegistry { } } - private void configureViewLogging(ViewEntity viewDefinition,ClassLoader cl) { - URL resourceURL = cl.getResource(VIEW_LOG_FILE); - if( null != resourceURL ){ - LOG.info("setting up logging for view {} as per property file {}",viewDefinition.getName(), resourceURL); - PropertyConfigurator.configure(resourceURL); - } - } - private void addAutoInstanceDefinition(ViewEntity viewEntity) { ViewConfig viewConfig = viewEntity.getConfiguration(); String viewName = viewEntity.getViewName(); http://git-wip-us.apache.org/repos/asf/ambari/blob/f36059e2/contrib/views/capacity-scheduler/pom.xml ---------------------------------------------------------------------- diff --git a/contrib/views/capacity-scheduler/pom.xml b/contrib/views/capacity-scheduler/pom.xml index e523eb7..5569859 100644 --- a/contrib/views/capacity-scheduler/pom.xml +++ b/contrib/views/capacity-scheduler/pom.xml @@ -248,7 +248,6 @@ <filtering>false</filtering> <includes> <include>view.xml</include> - <include>view.log4j.properties</include> </includes> </resource> <resource> http://git-wip-us.apache.org/repos/asf/ambari/blob/f36059e2/contrib/views/capacity-scheduler/src/main/resources/view.log4j.properties ---------------------------------------------------------------------- diff --git a/contrib/views/capacity-scheduler/src/main/resources/view.log4j.properties b/contrib/views/capacity-scheduler/src/main/resources/view.log4j.properties deleted file mode 100644 index 10b73a5..0000000 --- a/contrib/views/capacity-scheduler/src/main/resources/view.log4j.properties +++ /dev/null @@ -1,24 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -log4j.appender.capshedView=org.apache.log4j.RollingFileAppender -log4j.appender.capshedView.File=/var/log/ambari-server/capshed-view/capshed-view.log -log4j.appender.capshedView.MaxFileSize=80MB -log4j.appender.capshedView.MaxBackupIndex=60 -log4j.appender.capshedView.layout=org.apache.log4j.PatternLayout -log4j.appender.capshedView.layout.ConversionPattern=%d{DATE} %5p [%t] %c{1}:%L - %m%n - -log4j.logger.org.apache.ambari.view.capacityscheduler=INFO,capshedView -log4j.additivity.org.apache.ambari.view.capacityscheduler = false http://git-wip-us.apache.org/repos/asf/ambari/blob/f36059e2/contrib/views/files/pom.xml ---------------------------------------------------------------------- diff --git a/contrib/views/files/pom.xml b/contrib/views/files/pom.xml index c60ba9e..ccea5ab 100644 --- a/contrib/views/files/pom.xml +++ b/contrib/views/files/pom.xml @@ -241,7 +241,6 @@ <filtering>false</filtering> <includes> <include>view.xml</include> - <include>view.log4j.properties</include> </includes> </resource> http://git-wip-us.apache.org/repos/asf/ambari/blob/f36059e2/contrib/views/files/src/main/resources/view.log4j.properties ---------------------------------------------------------------------- diff --git a/contrib/views/files/src/main/resources/view.log4j.properties b/contrib/views/files/src/main/resources/view.log4j.properties deleted file mode 100644 index 80f135e..0000000 --- a/contrib/views/files/src/main/resources/view.log4j.properties +++ /dev/null @@ -1,24 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -log4j.appender.filesView=org.apache.log4j.RollingFileAppender -log4j.appender.filesView.File=/var/log/ambari-server/files-view/files-view.log -log4j.appender.filesView.MaxFileSize=80MB -log4j.appender.filesView.MaxBackupIndex=60 -log4j.appender.filesView.layout=org.apache.log4j.PatternLayout -log4j.appender.filesView.layout.ConversionPattern=%d{DATE} %5p [%t] %c{1}:%L - %m%n - -log4j.logger.org.apache.ambari.view.filebrowser=INFO,filesView -log4j.additivity.org.apache.ambari.view.filebrowser= false http://git-wip-us.apache.org/repos/asf/ambari/blob/f36059e2/contrib/views/hive/pom.xml ---------------------------------------------------------------------- diff --git a/contrib/views/hive/pom.xml b/contrib/views/hive/pom.xml index fd6fcfe..1f150ff 100644 --- a/contrib/views/hive/pom.xml +++ b/contrib/views/hive/pom.xml @@ -336,7 +336,6 @@ <includes> <include>META-INF/**/*</include> <include>view.xml</include> - <include>view.log4j.properties</include> </includes> </resource> <resource> http://git-wip-us.apache.org/repos/asf/ambari/blob/f36059e2/contrib/views/hive/src/main/resources/view.log4j.properties ---------------------------------------------------------------------- diff --git a/contrib/views/hive/src/main/resources/view.log4j.properties b/contrib/views/hive/src/main/resources/view.log4j.properties deleted file mode 100644 index 227d74b..0000000 --- a/contrib/views/hive/src/main/resources/view.log4j.properties +++ /dev/null @@ -1,25 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -log4j.appender.hiveView=org.apache.log4j.RollingFileAppender -log4j.appender.hiveView.File=/var/log/ambari-server/hive-view/hive-view.log -log4j.appender.hiveView.MaxFileSize=80MB -log4j.appender.hiveView.MaxBackupIndex=60 -log4j.appender.hiveView.layout=org.apache.log4j.PatternLayout -log4j.appender.hiveView.layout.ConversionPattern=%d{DATE} %5p [%t] %c{1}:%L - %m%n - -log4j.logger.org.apache.ambari.view.hive=INFO,hiveView -log4j.additivity.org.apache.ambari.view.hive = false http://git-wip-us.apache.org/repos/asf/ambari/blob/f36059e2/contrib/views/jobs/pom.xml ---------------------------------------------------------------------- diff --git a/contrib/views/jobs/pom.xml b/contrib/views/jobs/pom.xml index 045920f..d797ebd 100644 --- a/contrib/views/jobs/pom.xml +++ b/contrib/views/jobs/pom.xml @@ -156,7 +156,6 @@ <include>WEB-INF/web.xml</include> <include>META-INF/**/*</include> <include>view.xml</include> - <include>view.log4j.properties</include> </includes> </resource> <resource> http://git-wip-us.apache.org/repos/asf/ambari/blob/f36059e2/contrib/views/jobs/src/main/resources/view.log4j.properties ---------------------------------------------------------------------- diff --git a/contrib/views/jobs/src/main/resources/view.log4j.properties b/contrib/views/jobs/src/main/resources/view.log4j.properties deleted file mode 100644 index 03d193e..0000000 --- a/contrib/views/jobs/src/main/resources/view.log4j.properties +++ /dev/null @@ -1,25 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -log4j.appender.jobsView=org.apache.log4j.RollingFileAppender -log4j.appender.jobsView.File=/var/log/ambari-server/jobs-view/jobs-view.log -log4j.appender.jobsView.MaxFileSize=80MB -log4j.appender.jobsView.MaxBackupIndex=60 -log4j.appender.jobsView.layout=org.apache.log4j.PatternLayout -log4j.appender.jobsView.layout.ConversionPattern=%d{DATE} %5p [%t] %c{1}:%L - %m%n - - -log4j.logger.org.apache.ambari.view.jobs=INFO,jobsView -log4j.additivity.org.apache.ambari.view.jobs=false \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/f36059e2/contrib/views/pig/pom.xml ---------------------------------------------------------------------- diff --git a/contrib/views/pig/pom.xml b/contrib/views/pig/pom.xml index c0beeb8..97160cc 100644 --- a/contrib/views/pig/pom.xml +++ b/contrib/views/pig/pom.xml @@ -305,7 +305,6 @@ <includes> <include>META-INF/**/*</include> <include>view.xml</include> - <include>view.log4j.properties</include> </includes> </resource> <resource> http://git-wip-us.apache.org/repos/asf/ambari/blob/f36059e2/contrib/views/pig/src/main/resources/view.log4j.properties ---------------------------------------------------------------------- diff --git a/contrib/views/pig/src/main/resources/view.log4j.properties b/contrib/views/pig/src/main/resources/view.log4j.properties deleted file mode 100644 index 756fd3c..0000000 --- a/contrib/views/pig/src/main/resources/view.log4j.properties +++ /dev/null @@ -1,24 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -log4j.appender.pigView=org.apache.log4j.RollingFileAppender -log4j.appender.pigView.File=/var/log/ambari-server/pig-view/pig-view.log -log4j.appender.pigView.MaxFileSize=80MB -log4j.appender.pigView.MaxBackupIndex=60 -log4j.appender.pigView.layout=org.apache.log4j.PatternLayout -log4j.appender.pigView.layout.ConversionPattern=%d{DATE} %5p [%t] %c{1}:%L - %m%n - -log4j.logger.org.apache.ambari.view.pig=INFO,pigView -log4j.additivity.org.apache.ambari.view.pig=false \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/f36059e2/contrib/views/slider/pom.xml ---------------------------------------------------------------------- diff --git a/contrib/views/slider/pom.xml b/contrib/views/slider/pom.xml index 4188bb2..608988f 100644 --- a/contrib/views/slider/pom.xml +++ b/contrib/views/slider/pom.xml @@ -336,7 +336,6 @@ <filtering>false</filtering> <includes> <include>view.xml</include> - <include>view.log4j.properties</include> </includes> </resource> <resource> http://git-wip-us.apache.org/repos/asf/ambari/blob/f36059e2/contrib/views/slider/src/main/resources/view.log4j.properties ---------------------------------------------------------------------- diff --git a/contrib/views/slider/src/main/resources/view.log4j.properties b/contrib/views/slider/src/main/resources/view.log4j.properties deleted file mode 100644 index aaed084..0000000 --- a/contrib/views/slider/src/main/resources/view.log4j.properties +++ /dev/null @@ -1,24 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -log4j.appender.sliderView=org.apache.log4j.RollingFileAppender -log4j.appender.sliderView.File=/var/log/ambari-server/slider-view/slider-view.log -log4j.appender.sliderView.MaxFileSize=80MB -log4j.appender.sliderView.MaxBackupIndex=60 -log4j.appender.sliderView.layout=org.apache.log4j.PatternLayout -log4j.appender.sliderView.layout.ConversionPattern=%d{DATE} %5p [%t] %c{1}:%L - %m%n - -log4j.logger.org.apache.ambari.view.slider=INFO,sliderView -log4j.additivity.org.apache.ambari.view.slider=false \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/f36059e2/contrib/views/storm/src/main/resources/view.log4j.properties ---------------------------------------------------------------------- diff --git a/contrib/views/storm/src/main/resources/view.log4j.properties b/contrib/views/storm/src/main/resources/view.log4j.properties deleted file mode 100644 index 8d4f483..0000000 --- a/contrib/views/storm/src/main/resources/view.log4j.properties +++ /dev/null @@ -1,24 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -log4j.appender.stormView=org.apache.log4j.RollingFileAppender -log4j.appender.stormView.File=/var/log/ambari-server/storm-view/storm-view.log -log4j.appender.stormView.MaxFileSize=80MB -log4j.appender.stormView.MaxBackupIndex=60 -log4j.appender.stormView.layout=org.apache.log4j.PatternLayout -log4j.appender.stormView.layout.ConversionPattern=%d{DATE} %5p [%t] %c{1}:%L - %m%n - -log4j.logger.org.apache.ambari.storm=INFO,stormView -log4j.additivity.org.apache.ambari.storm=false \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/f36059e2/contrib/views/tez/pom.xml ---------------------------------------------------------------------- diff --git a/contrib/views/tez/pom.xml b/contrib/views/tez/pom.xml index 2daf7cc..8e82c5e 100644 --- a/contrib/views/tez/pom.xml +++ b/contrib/views/tez/pom.xml @@ -145,7 +145,6 @@ <include>WEB-INF/web.xml</include> <include>META-INF/**/*</include> <include>view.xml</include> - <include>view.log4j.properties</include> </includes> </resource> <resource> http://git-wip-us.apache.org/repos/asf/ambari/blob/f36059e2/contrib/views/tez/src/main/resources/view.log4j.properties ---------------------------------------------------------------------- diff --git a/contrib/views/tez/src/main/resources/view.log4j.properties b/contrib/views/tez/src/main/resources/view.log4j.properties deleted file mode 100644 index 8608da0..0000000 --- a/contrib/views/tez/src/main/resources/view.log4j.properties +++ /dev/null @@ -1,24 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -log4j.appender.tezView=org.apache.log4j.RollingFileAppender -log4j.appender.tezView.File=/var/log/ambari-server/tez-view/tez-view.log -log4j.appender.tezView.MaxFileSize=80MB -log4j.appender.tezView.MaxBackupIndex=60 -log4j.appender.tezView.layout=org.apache.log4j.PatternLayout -log4j.appender.tezView.layout.ConversionPattern=%d{DATE} %5p [%t] %c{1}:%L - %m%n - -log4j.logger.org.apache.ambari.view.tez=INFO,tezView -log4j.additivity.org.apache.ambari.view.tez=false \ No newline at end of file
