cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [1/3] git commit: fix event_id ordering and remove happened_at
Date Wed, 24 Oct 2012 01:59:11 GMT
Updated Branches:
  refs/heads/trunk 880334b63 -> 1ded4ff29


fix event_id ordering and remove happened_at


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

Branch: refs/heads/trunk
Commit: 1ded4ff294120b2f92b581784f7c6314be2c1e9d
Parents: 069de3d
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Tue Oct 23 20:54:39 2012 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Tue Oct 23 20:58:38 2012 -0500

----------------------------------------------------------------------
 bin/cqlsh                                          |    2 +-
 .../org/apache/cassandra/config/CFMetaData.java    |    1 -
 .../apache/cassandra/tracing/TracingAppender.java  |    7 ++-----
 3 files changed, 3 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1ded4ff2/bin/cqlsh
----------------------------------------------------------------------
diff --git a/bin/cqlsh b/bin/cqlsh
index 1958ba4..4229b81 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -1023,7 +1023,7 @@ class Shell(cmd.Cmd):
     def print_trace(self, session_id):
         out = self.query_out
         out.write('\nTracing session: %s\n\n' % session_id)
-        self.perform_statement_untraced("SELECT activity, happened_at, source, source_elapsed
FROM system_traces.events WHERE session_id = '%s'" % session_id)
+        self.perform_statement_untraced("SELECT activity, source, source_elapsed FROM system_traces.events
WHERE session_id = '%s'" % session_id)
 
     # these next two functions are not guaranteed perfect; just checks if the
     # statement parses fully according to cqlsh's own understanding of the

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1ded4ff2/src/java/org/apache/cassandra/config/CFMetaData.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/CFMetaData.java b/src/java/org/apache/cassandra/config/CFMetaData.java
index 899ba75..670e86b 100644
--- a/src/java/org/apache/cassandra/config/CFMetaData.java
+++ b/src/java/org/apache/cassandra/config/CFMetaData.java
@@ -197,7 +197,6 @@ public final class CFMetaData
                                                                + "  source inet,"
                                                                + "  thread text,"
                                                                + "  activity text,"
-                                                               + "  happened_at timestamp,"
                                                                + "  source_elapsed int,"
                                                                + "  PRIMARY KEY (session_id,
event_id)"
                                                                + ");", Tracing.TRACE_KS);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1ded4ff2/src/java/org/apache/cassandra/tracing/TracingAppender.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tracing/TracingAppender.java b/src/java/org/apache/cassandra/tracing/TracingAppender.java
index d96ffcf..e971389 100644
--- a/src/java/org/apache/cassandra/tracing/TracingAppender.java
+++ b/src/java/org/apache/cassandra/tracing/TracingAppender.java
@@ -49,18 +49,15 @@ public class TracingAppender extends AppenderSkeleton
             return;
 
         final int elapsed = state.elapsed();
-        final String threadName = event.getThreadName();
+        final ByteBuffer eventId = ByteBufferUtil.bytes(UUIDGen.makeType1UUIDFromHost(FBUtilities.getBroadcastAddress()));
         StageManager.getStage(Stage.TRACING).execute(new WrappedRunnable()
         {
             public void runMayThrow() throws Exception
             {
-                ByteBuffer eventId = ByteBufferUtil.bytes(UUIDGen.makeType1UUIDFromHost(FBUtilities
-                        .getBroadcastAddress()));
                 CFMetaData cfMeta = CFMetaData.TraceEventsCf;
                 ColumnFamily cf = ColumnFamily.create(cfMeta);
                 addColumn(cf, buildName(cfMeta, eventId, bytes("source")), FBUtilities.getBroadcastAddress());
-                addColumn(cf, buildName(cfMeta, eventId, bytes("thread")), threadName);
-                addColumn(cf, buildName(cfMeta, eventId, bytes("happened_at")), event.getTimeStamp());
+                addColumn(cf, buildName(cfMeta, eventId, bytes("thread")), event.getThreadName());
                 addColumn(cf, buildName(cfMeta, eventId, bytes("source_elapsed")), elapsed);
                 addColumn(cf, buildName(cfMeta, eventId, bytes("activity")), event.getMessage());
                 RowMutation mutation = new RowMutation(Tracing.TRACE_KS, state.sessionIdBytes);


Mime
View raw message