MCPcopy Create free account
hub / github.com/OpenTSDB/asynchbase / stats

Method stats

src/HBaseClient.java:728–774  ·  view source on GitHub ↗

Returns a snapshot of usage statistics for this client. @since 1.3

()

Source from the content-addressed store, hash-verified

726 * @since 1.3
727 */
728 public ClientStats stats() {
729 final LoadingCache<BufferedIncrement, BufferedIncrement.Amount> cache =
730 increment_buffer;
731
732 long inflight_rpcs = 0;
733 long pending_rpcs = 0;
734 long pending_batched_rpcs = 0;
735 int dead_region_clients = 0;
736
737 final Collection<RegionClient> region_clients = client2regions.keySet();
738
739 for (final RegionClient rc : region_clients) {
740 final RegionClientStats stats = rc.stats();
741 inflight_rpcs += stats.inflightRPCs();
742 pending_rpcs += stats.pendingRPCs();
743 pending_batched_rpcs += stats.pendingBatchedRPCs();
744 if (stats.isDead()) {
745 dead_region_clients++;
746 }
747 }
748
749 return new ClientStats(
750 num_connections_created.get(),
751 root_lookups.get(),
752 meta_lookups_with_permit.get(),
753 meta_lookups_wo_permit.get(),
754 num_flushes.get(),
755 num_nsres.get(),
756 num_nsre_rpcs.get(),
757 num_multi_rpcs.get(),
758 num_gets.get(),
759 num_scanners_opened.get(),
760 num_scans.get(),
761 num_puts.get(),
762 num_appends.get(),
763 num_row_locks.get(),
764 num_deletes.get(),
765 num_atomic_increments.get(),
766 cache != null ? cache.stats() : BufferedIncrement.ZERO_STATS,
767 inflight_rpcs,
768 pending_rpcs,
769 pending_batched_rpcs,
770 dead_region_clients,
771 region_clients.size(),
772 idle_connections_closed.get()
773 );
774 }
775
776 /**
777 * Returns a list of region client stats objects for debugging.

Callers 15

testMethod · 0.45
testMethod · 0.45
putBatchedMethod · 0.45
putNoFlushingMethod · 0.45
putBatchDisabledMethod · 0.45
appendBatchedMethod · 0.45
appendNoFlushingMethod · 0.45
appendBatchDisabledMethod · 0.45
getRequestMethod · 0.45
getRequestNoTimeoutMethod · 0.45

Calls 6

inflightRPCsMethod · 0.95
pendingRPCsMethod · 0.95
pendingBatchedRPCsMethod · 0.95
isDeadMethod · 0.95
getMethod · 0.45
sizeMethod · 0.45

Tested by 15

testMethod · 0.36
testMethod · 0.36
putBatchedMethod · 0.36
putNoFlushingMethod · 0.36
putBatchDisabledMethod · 0.36
appendBatchedMethod · 0.36
appendNoFlushingMethod · 0.36
appendBatchDisabledMethod · 0.36
getRequestMethod · 0.36
getRequestNoTimeoutMethod · 0.36