cassandra-pr mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [cassandra] dineshjoshi commented on a change in pull request #354: CASSANDRA-15319 against 2.2
Date Tue, 01 Oct 2019 17:54:19 GMT
dineshjoshi commented on a change in pull request #354: CASSANDRA-15319 against 2.2
URL: https://github.com/apache/cassandra/pull/354#discussion_r330191844
 
 

 ##########
 File path: test/distributed/org/apache/cassandra/distributed/impl/TracingUtil.java
 ##########
 @@ -0,0 +1,115 @@
+/*
+ * 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
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.cassandra.distributed.impl;
+
+import java.net.InetAddress;
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.UUID;
+
+import org.apache.cassandra.db.ConsistencyLevel;
+
+
+/**
+ * Utilities for accessing the system_traces table from in-JVM dtests
+ */
+public class TracingUtil
+{
+    /**
+     * Represents an entry from system_traces
+     */
+    public static class TraceEntry
+    {
+        public final UUID sessionId;
+        public final UUID eventId;
+        public final String activity;
+        public final InetAddress source;
+        public final int sourceElapsed;
+        public final String thread;
+
+        private TraceEntry(UUID sessionId, UUID eventId, String activity, InetAddress sourceIP,
int sourceElapsed, String thread)
+        {
+            this.sessionId = sessionId;
+            this.eventId = eventId;
+            this.activity = activity;
+            this.source = sourceIP;
+            this.sourceElapsed = sourceElapsed;
+            this.thread = thread;
+        }
+
+        static TraceEntry fromObjects(Object[] objects)
 
 Review comment:
   The method name doesn't clearly convey the use of the method. Could we call this something
different? This method converts a row result (list of deserialized objects) to a trace entry.
Perhaps call this `fromRowResultObjects()`? I'm open to other name suggestions too.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Mime
View raw message