Package org.cloudera.htrace

Examples of org.cloudera.htrace.Span.stop()


      if (getListener() != null)
        getListener().afterProcess(this);
    } catch (Throwable t) {
      LOG.error("Caught throwable while processing event " + eventType, t);
    } finally {
      chunk.stop();
    }
  }

  /**
   * This method is the main processing loop to be implemented by the various
View Full Code Here


          } catch (Throwable e) {
            LOG.debug(getName() + ": " + call.toString() + " error: " + e, e);
            errorThrowable = e;
            error = StringUtils.stringifyException(e);
          } finally {
            currentRequestSpan.stop();
            // Must always clear the request context to avoid leaking
            // credentials between requests.
            RequestContext.clear();
          }
          CurCall.set(null);
View Full Code Here

      process();
      if (getListener() != null) getListener().afterProcess(this);
    } catch(Throwable t) {
      LOG.error("Caught throwable while processing event " + eventType, t);
    } finally {
      chunk.stop();
    }
  }

  /**
   * This method is the main processing loop to be implemented by the various
View Full Code Here

        // add a child with some annotations
        Span child = span.child("child 1");
        child.addTimelineAnnotation("timeline annotation");
        TracingCompat.addAnnotation(child, "test annotation", 10);
        child.stop();

        // sleep a little bit to get some time difference
        Thread.sleep(100);

        trace.close();
View Full Code Here

                RegionScanner scanner = doPostScannerOpen(c, scan, s);
                scanner = new DelegateRegionScanner(scanner) {
                    @Override
                    public void close() throws IOException {
                        if (child != null) {
                            child.stop();
                        }
                        delegate.close();
                    }
                };
                success = true;
View Full Code Here

                };
                success = true;
                return scanner;
            } finally {
                if (!success && child != null) {
                    child.stop();
                }
            }
        } catch (Throwable t) {
            ServerUtil.throwIOException(c.getEnvironment().getRegion().getRegionNameAsString(), t);
            return null; // impossible
View Full Code Here

                    try {
                        if (logger.isDebugEnabled()) logMutationSize(hTable, mutations);
                        long startTime = System.currentTimeMillis();
                        child.addTimelineAnnotation("Attempt " + retryCount);
                        hTable.batch(mutations);
                        child.stop();
                        shouldRetry = false;
                        if (logger.isDebugEnabled()) logger.debug("Total time for batch call of  " + mutations.size() + " mutations into " + table.getName().getString() + ": " + (System.currentTimeMillis() - startTime) + " ms");
                        committedList.add(entry);
                    } catch (Exception e) {
                        SQLException inferredE = ServerUtil.parseServerExceptionOrNull(e);
View Full Code Here

                                logger.warn(msg);
                                connection.getQueryServices().clearTableRegionCache(htableName);

                                // add a new child span as this one failed
                                child.addTimelineAnnotation(msg);
                                child.stop();
                                child = Tracing.child(span,"Failed batch, attempting retry");

                                continue;
                            }
                            e = inferredE;
View Full Code Here

    HTable table;
    try {
      table = TEST_UTIL.createTable("table".getBytes(),
        FAMILY_BYTES);
    } finally {
      tableCreationSpan.stop();
    }

    Collection<Span> spans = rcvr.getSpans();
    TraceTree traceTree = new TraceTree(spans);
    Collection<Span> roots = traceTree.getRoots();
View Full Code Here

    Span putSpan = Trace.startSpan("doing put", Sampler.ALWAYS);
    try {
      table.put(put);
    } finally {
      putSpan.stop();
    }

    spans = rcvr.getSpans();
    traceTree = new TraceTree(spans);
    roots = traceTree.getRoots();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.