[
https://issues.apache.org/jira/browse/HADOOP-17424?focusedWorklogId=541563&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-541563
]
ASF GitHub Bot logged work on HADOOP-17424:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 26/Jan/21 03:59
Start Date: 26/Jan/21 03:59
Worklog Time Spent: 10m
Work Description: steveloughran commented on a change in pull request
#2645:
URL: https://github.com/apache/hadoop/pull/2645#discussion_r563791470
##########
File path:
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/tracing/TraceScope.java
##########
@@ -0,0 +1,59 @@
+/**
+ * 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.hadoop.tracing;
+
+import java.io.Closeable;
+
+public class TraceScope implements Closeable {
+ Span span;
+
+ public TraceScope(Span span) {
+ this.span = span;
+ }
+
+ // Add tag to the span
+ public Span addKVAnnotation(String key, String value) {
+ return span;
+ }
+
+ public Span addKVAnnotation(String key, Number value) {
+ return span;
+ }
+
+ public Span addTimelineAnnotation(String msg) {
+ return span;
+ }
+
+ public Span span() {
+ return span;
+ }
+
+ public Span getSpan() {
+ return span;
+ }
+
+ public void reattach() {
+ }
+
+ public void detach() {
+ }
+
+ public void close() {
+ span.close();
Review comment:
any risk of span ever == null?
----------------------------------------------------------------
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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 541563)
Time Spent: 4.5h (was: 4h 20m)
> Replace HTrace with No-Op tracer
> --------------------------------
>
> Key: HADOOP-17424
> URL: https://issues.apache.org/jira/browse/HADOOP-17424
> Project: Hadoop Common
> Issue Type: Sub-task
> Reporter: Siyao Meng
> Assignee: Siyao Meng
> Priority: Major
> Labels: pull-request-available
> Time Spent: 4.5h
> Remaining Estimate: 0h
>
> Remove HTrace dependency as it is depending on old jackson jars. Use a no-op
> tracer for now to eliminate potential security issues.
> The plan is to move part of the code in
> [PR#1846|https://github.com/apache/hadoop/pull/1846] out here for faster
> review.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]