Repository: tez
Updated Branches:
refs/heads/branch-0.7 af6d86c35 -> b06afabb9
TEZ-3223. Support a NullHistoryLogger to disable history logging if needed.
(hitesh)
(cherry picked from commit 36ab0c043113bdd99f3121c9fb4348dbd39f18ab)
Conflicts:
CHANGES.txt
Project: http://git-wip-us.apache.org/repos/asf/tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/b06afabb
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/b06afabb
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/b06afabb
Branch: refs/heads/branch-0.7
Commit: b06afabb9e3c64b54adf96889228e55b09ae3758
Parents: af6d86c
Author: Hitesh Shah <[email protected]>
Authored: Tue Jul 5 13:53:34 2016 -0700
Committer: Hitesh Shah <[email protected]>
Committed: Tue Jul 5 13:59:45 2016 -0700
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../apache/tez/dag/api/TezConfiguration.java | 3 +-
.../impl/DevNullHistoryLoggingService.java | 39 ++++++++++++++++++++
3 files changed, 42 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tez/blob/b06afabb/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 18408e4..8696a59 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-3293. Fetch failures can cause a shuffle hang waiting for memory merge
that never starts.
TEZ-3305. TestAnalyzer fails on Hadoop 2.7.
TEZ-3304. TestHistoryParser fails with Hadoop 2.7.
http://git-wip-us.apache.org/repos/asf/tez/blob/b06afabb/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 45aac5d..3bbc0f9 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
@@ -1120,7 +1120,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)
public static final String TEZ_HISTORY_LOGGING_SERVICE_CLASS =
http://git-wip-us.apache.org/repos/asf/tez/blob/b06afabb/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.
+ }
+
+}