@Override public void after() { scope.close(); } }
public void stop() { if (scope == null) { if (span != null) { span.stop(); } } else { scope.close(); } } }
@Override public void close() throws SQLException { scope.close(); super.close(); }
private void closeTraceScope(final PhoenixConnection conn) { if(conn.getTraceScope()!=null) { conn.getTraceScope().close(); conn.setTraceScope(null); } }
/** * Finish the current trace. */ public static void off() { org.apache.htrace.Span span = org.apache.htrace.Trace.currentSpan(); if (span != null) { span.stop(); // close() will no-op, but ensure safety if the implementation changes org.apache.htrace.Tracer.getInstance().continueSpan(null).close(); } }
@Override public void close() throws SQLException { if (isClosed) { return; } try { clearMetrics(); try { if (traceScope != null) { traceScope.close(); } closeStatements(); } finally { services.removeConnection(this); } } finally { isClosed = true; GLOBAL_OPEN_PHOENIX_CONNECTIONS.decrement(); } }
traceScope.close();
@Override public void after() { scope.close(); } }
@Override public void close() throws SQLException { scope.close(); super.close(); }
trace.close();
public void stop() { if (scope == null) { if (span != null) { span.stop(); } } else { scope.close(); } } }
@Override public void hsync() throws IOException { TraceScope scope = dfsClient.getPathTraceScope("hsync", src); try { flushOrSync(true, EnumSet.noneOf(SyncFlag.class)); } finally { scope.close(); } }
/** * @see ClientProtocol#finalizeUpgrade() */ public void finalizeUpgrade() throws IOException { TraceScope scope = Trace.startSpan("finalizeUpgrade", traceSampler); try { namenode.finalizeUpgrade(); } finally { scope.close(); } }
@Override protected synchronized void writeChunk(byte[] b, int offset, int len, byte[] checksum, int ckoff, int cklen) throws IOException { TraceScope scope = dfsClient.getPathTraceScope("DFSOutputStream#writeChunk", src); try { writeChunkImpl(b, offset, len, checksum, ckoff, cklen); } finally { scope.close(); } }
@Override public synchronized int read(final ByteBuffer buf) throws IOException { ReaderStrategy byteBufferReader = new ByteBufferStrategy(buf); TraceScope scope = dfsClient.getPathTraceScope("DFSInputStream#byteBufferRead", src); try { return readWithStrategy(byteBufferReader, 0, buf.remaining()); } finally { scope.close(); } }
private void closeTraceScope(final PhoenixConnection conn) { if(conn.getTraceScope()!=null) { conn.getTraceScope().close(); conn.setTraceScope(null); } }
private void closeTraceScope(final PhoenixConnection conn) { if(conn.getTraceScope()!=null) { conn.getTraceScope().close(); conn.setTraceScope(null); } }
@VisibleForTesting public LocatedBlocks getLocatedBlocks(String src, long start, long length) throws IOException { TraceScope scope = getPathTraceScope("getBlockLocations", src); try { return callGetBlockLocations(namenode, src, start, length); } finally { scope.close(); } }
public long addCacheDirective( CacheDirectiveInfo info, EnumSet<CacheFlag> flags) throws IOException { checkOpen(); TraceScope scope = Trace.startSpan("addCacheDirective", traceSampler); try { return namenode.addCacheDirective(info, flags); } catch (RemoteException re) { throw re.unwrapRemoteException(); } finally { scope.close(); } }