tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hit...@apache.org
Subject tez git commit: TEZ-3223. Support a NullHistoryLogger to disable history logging if needed. (hitesh)
Date Tue, 05 Jul 2016 20:54:52 GMT
Repository: tez
Updated Branches:
  refs/heads/branch-0.8 250f346f5 -> 6aceaed0e


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/6aceaed0
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/6aceaed0
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/6aceaed0

Branch: refs/heads/branch-0.8
Commit: 6aceaed0e3d03cc51454314dd7826c0bf5a652c0
Parents: 250f346
Author: Hitesh Shah <hitesh@apache.org>
Authored: Tue Jul 5 13:53:34 2016 -0700
Committer: Hitesh Shah <hitesh@apache.org>
Committed: Tue Jul 5 13:54:43 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/6aceaed0/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index b8c8751..1c7e130 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -14,6 +14,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/6aceaed0/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/6aceaed0/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.
+  }
+
+}


Mime
View raw message