Repository: tez Updated Branches: refs/heads/master 59935e33b -> 36ab0c043
TEZ-3223. Support a NullHistoryLogger to disable history logging if needed. (hitesh) Project: http://git-wip-us.apache.org/repos/asf/tez/repo Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/36ab0c04 Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/36ab0c04 Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/36ab0c04 Branch: refs/heads/master Commit: 36ab0c043113bdd99f3121c9fb4348dbd39f18ab Parents: 59935e3 Author: Hitesh Shah <[email protected]> Authored: Tue Jul 5 13:53:34 2016 -0700 Committer: Hitesh Shah <[email protected]> Committed: Tue Jul 5 13:53:34 2016 -0700 ---------------------------------------------------------------------- CHANGES.txt | 2 + .../apache/tez/dag/api/TezConfiguration.java | 3 +- .../impl/DevNullHistoryLoggingService.java | 39 ++++++++++++++++++++ 3 files changed, 43 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tez/blob/36ab0c04/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index b7ad666..5202373 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,7 @@ INCOMPATIBLE CHANGES ALL CHANGES: + TEZ-3223. Support a NullHistoryLogger to disable history logging if needed. TEZ-3313. ATSFileParser : Wrong args passed in VersionInfo. TEZ-3286. Allow clients to set processor reserved memory per vertex (instead of per container). TEZ-3293. Fetch failures can cause a shuffle hang waiting for memory merge that never starts. @@ -79,6 +80,7 @@ INCOMPATIBLE CHANGES ALL CHANGES: + TEZ-3223. Support a NullHistoryLogger to disable history logging if needed. TEZ-3286. Allow clients to set processor reserved memory per vertex (instead of per container). TEZ-3293. Fetch failures can cause a shuffle hang waiting for memory merge that never starts. TEZ-3314. Double counting input bytes in MultiMRInput. http://git-wip-us.apache.org/repos/asf/tez/blob/36ab0c04/tez-api/src/main/java/org/apache/tez/dag/api/TezConfiguration.java ---------------------------------------------------------------------- diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/TezConfiguration.java b/tez-api/src/main/java/org/apache/tez/dag/api/TezConfiguration.java index 936c5db..1de2eda 100644 --- a/tez-api/src/main/java/org/apache/tez/dag/api/TezConfiguration.java +++ b/tez-api/src/main/java/org/apache/tez/dag/api/TezConfiguration.java @@ -1217,7 +1217,8 @@ public class TezConfiguration extends Configuration { /** * String value that is a class name. - * Specify the class to use for logging history data + * Specify the class to use for logging history data. + * To disable, set this to "org.apache.tez.dag.history.logging.impl.DevNullHistoryLoggingService" */ @ConfigurationScope(Scope.AM) @ConfigurationProperty http://git-wip-us.apache.org/repos/asf/tez/blob/36ab0c04/tez-dag/src/main/java/org/apache/tez/dag/history/logging/impl/DevNullHistoryLoggingService.java ---------------------------------------------------------------------- diff --git a/tez-dag/src/main/java/org/apache/tez/dag/history/logging/impl/DevNullHistoryLoggingService.java b/tez-dag/src/main/java/org/apache/tez/dag/history/logging/impl/DevNullHistoryLoggingService.java new file mode 100644 index 0000000..7e8a335 --- /dev/null +++ b/tez-dag/src/main/java/org/apache/tez/dag/history/logging/impl/DevNullHistoryLoggingService.java @@ -0,0 +1,39 @@ +/** + * 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 + * <p/> + * http://www.apache.org/licenses/LICENSE-2.0 + * <p/> + * 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. + */ + +package org.apache.tez.dag.history.logging.impl; + +import org.apache.tez.dag.history.DAGHistoryEvent; +import org.apache.tez.dag.history.logging.HistoryLoggingService; + +/** + * No-op history logger. + */ +public class DevNullHistoryLoggingService extends HistoryLoggingService { + + public DevNullHistoryLoggingService() { + super(DevNullHistoryLoggingService.class.getName()); + } + + @Override + public void handle(DAGHistoryEvent event) { + // Sending all events to /dev/null + // Done. + } + +}
