cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject git commit: who forgets to add files? I do.
Date Tue, 11 Feb 2014 17:34:36 GMT
Updated Branches:
  refs/heads/cassandra-2.0 b9aece45e -> 662f546aa


who forgets to add files? I do.


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

Branch: refs/heads/cassandra-2.0
Commit: 662f546aa76b7f6473b8da8b9ea675a9fd9757e1
Parents: b9aece4
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Tue Feb 11 11:30:02 2014 -0600
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Tue Feb 11 11:30:02 2014 -0600

----------------------------------------------------------------------
 .../cassandra/hadoop/ReporterWrapper.java       | 57 ++++++++++++++++++++
 1 file changed, 57 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/662f546a/src/java/org/apache/cassandra/hadoop/ReporterWrapper.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/hadoop/ReporterWrapper.java b/src/java/org/apache/cassandra/hadoop/ReporterWrapper.java
new file mode 100644
index 0000000..9940ba4
--- /dev/null
+++ b/src/java/org/apache/cassandra/hadoop/ReporterWrapper.java
@@ -0,0 +1,57 @@
+package org.apache.cassandra.hadoop;
+
+import org.apache.hadoop.mapred.Counters;
+import org.apache.hadoop.mapred.InputSplit;
+import org.apache.hadoop.mapred.Reporter;
+import org.apache.hadoop.mapreduce.StatusReporter;
+
+/**
+ * A reporter that works with both mapred and mapreduce APIs.
+ */
+public class ReporterWrapper extends StatusReporter implements Reporter {
+    private Reporter wrappedReporter;
+
+    public ReporterWrapper(Reporter reporter) {
+        wrappedReporter = reporter;
+    }
+
+    @Override
+    public Counters.Counter getCounter(Enum<?> anEnum) {
+        return wrappedReporter.getCounter(anEnum);
+    }
+
+    @Override
+    public Counters.Counter getCounter(String s, String s1) {
+        return wrappedReporter.getCounter(s, s1);
+    }
+
+    @Override
+    public void incrCounter(Enum<?> anEnum, long l) {
+        wrappedReporter.incrCounter(anEnum, l);
+    }
+
+    @Override
+    public void incrCounter(String s, String s1, long l) {
+        wrappedReporter.incrCounter(s, s1, l);
+    }
+
+    @Override
+    public InputSplit getInputSplit() throws UnsupportedOperationException {
+        return wrappedReporter.getInputSplit();
+    }
+
+    @Override
+    public void progress() {
+        wrappedReporter.progress();
+    }
+
+    // @Override
+    public float getProgress() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public void setStatus(String s) {
+        wrappedReporter.setStatus(s);
+    }
+}
\ No newline at end of file


Mime
View raw message