This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2012-03-02 08:15:25,808 [main] INFO org.apache.pig.Main - Logging error messages to: /home/developer/workspace/accumulo-pig/pig_1330694125807.log | |
2012-03-02 08:15:25,937 [main] INFO org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to hadoop file system at: hdfs://127.0.0.1/ | |
2012-03-02 08:15:26,032 [main] INFO org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to map-reduce job tracker at: 127.0.0.1:9001 | |
grunt> register /home/developer/workspace/accumulo-pig/lib/accumulo-core-1.5.0-incubating-SNAPSHOT.jar | |
grunt> register /home/developer/workspace/accumulo-pig/lib/cloudtrace-1.5.0-incubating-SNAPSHOT.jar | |
grunt> register /home/developer/workspace/accumulo-pig/lib/libthrift-0.6.1.jar | |
grunt> register /home/developer/workspace/accumulo-pig/lib/zookeeper-3.3.1.jar | |
grunt> register /home/developer/workspace/accumulo-pig/target/accumulo-pig-1.5.0-incubating-SNAPSHOT.jar | |
grunt> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ traceroute 216.81.59.173 | |
traceroute to 216.81.59.173 (216.81.59.173), 30 hops max, 60 byte packets | |
1 192.168.1.254 (192.168.1.254) 13.813 ms 13.813 ms 13.808 ms | |
2 * * * | |
3 * * * | |
4 * * * | |
5 * * * | |
6 * * * | |
7 * * * | |
8 * * * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys | |
import re | |
lines = sys.stdin.readlines() | |
num = 1 | |
total = len(lines) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo dd if=/dev/disk3 of=disk.copy bs=$[1024*1024] | |
3823+0 records in | |
3823+0 records out | |
4008706048 bytes transferred in 534.470609 secs (7500330 bytes/sec) | |
$ brew install foremost | |
Warning: A newer Command Line Tools release is available | |
You should install the latest version from: | |
https://developer.apple.com/downloads | |
==> Downloading http://foremost.sourceforge.net/pkg/foremost-1.5.7.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package storm.starter; | |
import backtype.storm.Config; | |
import backtype.storm.LocalCluster; | |
import backtype.storm.StormSubmitter; | |
import backtype.storm.metric.LoggingMetricsConsumer; | |
import backtype.storm.metric.api.CountMetric; | |
import backtype.storm.metric.api.MeanReducer; | |
import backtype.storm.metric.api.MultiCountMetric; | |
import backtype.storm.metric.api.ReducedMetric; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/jvm/storm/starter/ExclamationTopology.java b/src/jvm/storm/starter/ExclamationTopology.java | |
index fed8b1e..db5a03f 100644 | |
--- a/src/jvm/storm/starter/ExclamationTopology.java | |
+++ b/src/jvm/storm/starter/ExclamationTopology.java | |
@@ -3,6 +3,11 @@ package storm.starter; | |
import backtype.storm.Config; | |
import backtype.storm.LocalCluster; | |
import backtype.storm.StormSubmitter; | |
+import backtype.storm.metric.LoggingMetricsConsumer; | |
+import backtype.storm.metric.api.CountMetric; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
transient CountMetric _countMetric; | |
transient MultiCountMetric _wordCountMetric; | |
transient ReducedMetric _wordLengthMeanMetric; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void prepare(Map conf, TopologyContext context, OutputCollector collector) { | |
_collector = collector; | |
initMetrics(context); | |
} | |
void initMetrics(TopologyContext context) | |
{ | |
_countMetric = new CountMetric(); | |
_wordCountMetric = new MultiCountMetric(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void execute(Tuple tuple) { | |
_collector.emit(tuple, new Values(tuple.getString(0) + "!!!")); | |
_collector.ack(tuple); | |
updateMetrics(tuple.getString(0)); | |
} | |
void updateMetrics(String word) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
conf.registerMetricsConsumer(LoggingMetricsConsumer.class, 2); |