@Override public Tuple next() throws SQLException { if (!started) { scope.getSpan().addTimelineAnnotation("First request completed"); started = true; } return super.next(); }
traceScope.getSpan().addTimelineAnnotation("Getting a lock"); traceScope.getSpan().addTimelineAnnotation("Failed to get row lock"); iie.initCause(ie); if (traceScope != null) { traceScope.getSpan().addTimelineAnnotation("Interrupted exception getting row lock");
@Override public void postBatchMutateIndispensably(ObserverContext<RegionCoprocessorEnvironment> c, MiniBatchOperationInProgress<Mutation> miniBatchOp, final boolean success) throws IOException { BatchMutateContext context = getBatchMutateContext(c); if (context == null || context.indexUpdates == null) { return; } // get the current span, or just use a null-span to avoid a bunch of if statements try (TraceScope scope = Trace.startSpan("Starting to write index updates")) { Span current = scope.getSpan(); if (current == null) { current = NullSpan.INSTANCE; } if (success) { // if miniBatchOp was successfully written, write index updates if (!context.indexUpdates.isEmpty()) { this.writer.write(context.indexUpdates, false, context.clientVersion); } current.addTimelineAnnotation("Wrote index updates"); } } catch (Throwable t) { String msg = "Failed to write index updates:" + context.indexUpdates; LOG.error(msg, t); ServerUtil.throwIOException(msg, t); } finally { removeBatchMutateContext(c); } }
private void doPostWithExceptions(ObserverContext<RegionCoprocessorEnvironment> c, BatchMutateContext context) throws IOException { //short circuit, if we don't need to do any work if (context == null || context.indexUpdates.isEmpty()) { return; } // get the current span, or just use a null-span to avoid a bunch of if statements try (TraceScope scope = Trace.startSpan("Completing index writes")) { Span current = scope.getSpan(); if (current == null) { current = NullSpan.INSTANCE; } long start = EnvironmentEdgeManager.currentTimeMillis(); current.addTimelineAnnotation("Actually doing index update for first time"); writer.writeAndKillYourselfOnFailure(context.indexUpdates, false, context.clientVersion); long duration = EnvironmentEdgeManager.currentTimeMillis() - start; if (duration >= slowIndexWriteThreshold) { if (LOG.isDebugEnabled()) { LOG.debug(getCallTooSlowMessage("indexWrite", duration, slowIndexWriteThreshold)); } metricSource.incrementNumSlowIndexWriteCalls(); } metricSource.updateIndexWriteTime(duration); } }
child.addTimelineAnnotation("Attempt " + retryCount); List<List<Mutation>> mutationBatchList = getMutationBatchList(batchSize, batchSizeBytes, mutationList); child.addTimelineAnnotation(msg); child.stop(); child = Tracing.child(span, "Failed batch, attempting retry");
current.addTimelineAnnotation("Built index updates, doing preStep"); TracingUtils.addAnnotation(current, "index update count", context.indexUpdates.size()); } catch (Throwable t) {
current.addTimelineAnnotation("Built index updates, doing preStep"); TracingUtils.addAnnotation(current, "index update count", indexUpdates.size()); byte[] tableName = c.getEnvironment().getRegion().getTableDescriptor().getTableName().getName();
child.addTimelineAnnotation("timeline annotation"); TracingUtils.addAnnotation(child, "test annotation", 10); child.stop();
/** * Annotate the current span with the given message. */ public static void addTimelineAnnotation(String msg) { Span s = currentSpan(); if (s != null) { s.addTimelineAnnotation(msg); } }
@Override public Tuple next() throws SQLException { if (!started) { scope.getSpan().addTimelineAnnotation("First request completed"); started = true; } return super.next(); }
@Override public Tuple next() throws SQLException { if (!started) { scope.getSpan().addTimelineAnnotation("First request completed"); started = true; } return super.next(); }
Span span = Trace.currentSpan(); if (span != null) { span.addTimelineAnnotation("dataQueue.wait"); Span span = Trace.currentSpan(); if ((span != null) && (!firstWait)) { span.addTimelineAnnotation("end.wait");
Span span = Trace.currentSpan(); if (span != null) { span.addTimelineAnnotation("dataQueue.wait"); Span span = Trace.currentSpan(); if ((span != null) && (!firstWait)) { span.addTimelineAnnotation("end.wait");
traceScope.getSpan().addTimelineAnnotation("Getting a lock"); traceScope.getSpan().addTimelineAnnotation("Failed to get row lock"); iie.initCause(ie); if (traceScope != null) { traceScope.getSpan().addTimelineAnnotation("Interrupted exception getting row lock");
traceScope.getSpan().addTimelineAnnotation("Getting a lock"); traceScope.getSpan().addTimelineAnnotation("Failed to get row lock"); iie.initCause(ie); if (traceScope != null) { traceScope.getSpan().addTimelineAnnotation("Interrupted exception getting row lock");
@Override public void postBatchMutateIndispensably(ObserverContext<RegionCoprocessorEnvironment> c, MiniBatchOperationInProgress<Mutation> miniBatchOp, final boolean success) throws IOException { BatchMutateContext context = getBatchMutateContext(c); if (context == null || context.indexUpdates == null) { return; } // get the current span, or just use a null-span to avoid a bunch of if statements try (TraceScope scope = Trace.startSpan("Starting to write index updates")) { Span current = scope.getSpan(); if (current == null) { current = NullSpan.INSTANCE; } if (success) { // if miniBatchOp was successfully written, write index updates if (!context.indexUpdates.isEmpty()) { this.writer.write(context.indexUpdates, false, context.clientVersion); } current.addTimelineAnnotation("Wrote index updates"); } } catch (Throwable t) { String msg = "Failed to write index updates:" + context.indexUpdates; LOG.error(msg, t); ServerUtil.throwIOException(msg, t); } finally { removeBatchMutateContext(c); } }
@Override public void postBatchMutateIndispensably(ObserverContext<RegionCoprocessorEnvironment> c, MiniBatchOperationInProgress<Mutation> miniBatchOp, final boolean success) throws IOException { BatchMutateContext context = getBatchMutateContext(c); if (context == null || context.indexUpdates == null) { return; } // get the current span, or just use a null-span to avoid a bunch of if statements try (TraceScope scope = Trace.startSpan("Starting to write index updates")) { Span current = scope.getSpan(); if (current == null) { current = NullSpan.INSTANCE; } if (success) { // if miniBatchOp was successfully written, write index updates if (!context.indexUpdates.isEmpty()) { this.writer.write(context.indexUpdates, false, context.clientVersion); } current.addTimelineAnnotation("Wrote index updates"); } } catch (Throwable t) { String msg = "Failed to write index updates:" + context.indexUpdates; LOG.error(msg, t); ServerUtil.throwIOException(msg, t); } finally { removeBatchMutateContext(c); } }
private void doPostWithExceptions(ObserverContext<RegionCoprocessorEnvironment> c, BatchMutateContext context) throws IOException { //short circuit, if we don't need to do any work if (context == null || context.indexUpdates.isEmpty()) { return; } // get the current span, or just use a null-span to avoid a bunch of if statements try (TraceScope scope = Trace.startSpan("Completing index writes")) { Span current = scope.getSpan(); if (current == null) { current = NullSpan.INSTANCE; } long start = EnvironmentEdgeManager.currentTimeMillis(); current.addTimelineAnnotation("Actually doing index update for first time"); writer.writeAndKillYourselfOnFailure(context.indexUpdates, false, context.clientVersion); long duration = EnvironmentEdgeManager.currentTimeMillis() - start; if (duration >= slowIndexWriteThreshold) { if (LOG.isDebugEnabled()) { LOG.debug(getCallTooSlowMessage("indexWrite", duration, slowIndexWriteThreshold)); } metricSource.incrementNumSlowIndexWriteCalls(); } metricSource.updateIndexWriteTime(duration); } }
private void doPostWithExceptions(ObserverContext<RegionCoprocessorEnvironment> c, BatchMutateContext context) throws IOException { //short circuit, if we don't need to do any work if (context == null || context.indexUpdates.isEmpty()) { return; } // get the current span, or just use a null-span to avoid a bunch of if statements try (TraceScope scope = Trace.startSpan("Completing index writes")) { Span current = scope.getSpan(); if (current == null) { current = NullSpan.INSTANCE; } long start = EnvironmentEdgeManager.currentTimeMillis(); current.addTimelineAnnotation("Actually doing index update for first time"); writer.writeAndKillYourselfOnFailure(context.indexUpdates, false, context.clientVersion); long duration = EnvironmentEdgeManager.currentTimeMillis() - start; if (duration >= slowIndexWriteThreshold) { if (LOG.isDebugEnabled()) { LOG.debug(getCallTooSlowMessage("indexWrite", duration, slowIndexWriteThreshold)); } metricSource.incrementNumSlowIndexWriteCalls(); } metricSource.updateIndexWriteTime(duration); } }
MemStoreScanner(long readPoint) { super(); this.readPoint = readPoint; cellSetAtCreation = cellSet; snapshotAtCreation = snapshot; if (allocator != null) { this.allocatorAtCreation = allocator; this.allocatorAtCreation.incScannerCount(); } if (snapshotAllocator != null) { this.snapshotAllocatorAtCreation = snapshotAllocator; this.snapshotAllocatorAtCreation.incScannerCount(); } if (Trace.isTracing() && Trace.currentSpan() != null) { Trace.currentSpan().addTimelineAnnotation("Creating MemStoreScanner"); } }