MCPcopy Index your code
hub / github.com/OpenTSDB/opentsdb / close

Method close

src/core/SaltScanner.java:874–916  ·  view source on GitHub ↗

Closes the scanner and sets the various stats after filtering @param ok Whether or not the scanner closed with an exception or closed due to natural causes (e.g. ran out of data or we wanted to stop it early)

(final boolean ok)

Source from the content-addressed store, hash-verified

872 * it early)
873 */
874 void close(final boolean ok) {
875 scanner.close();
876
877 if (query_stats != null) {
878 query_stats.addScannerStat(query_index, index, QueryStat.SCANNER_TIME,
879 DateTime.nanoTime() - scanner_start);
880
881 // Scanner Stats
882 /* Uncomment when AsyncHBase has this feature:
883 query_stats.addScannerStat(query_index, index,
884 QueryStat.ROWS_FROM_STORAGE, scanner.getRowsFetched());
885 query_stats.addScannerStat(query_index, index,
886 QueryStat.COLUMNS_FROM_STORAGE, scanner.getColumnsFetched());
887 query_stats.addScannerStat(query_index, index,
888 QueryStat.BYTES_FROM_STORAGE, scanner.getBytesFetched()); */
889 query_stats.addScannerStat(query_index, index,
890 QueryStat.HBASE_TIME, fetch_time);
891 query_stats.addScannerStat(query_index, index,
892 QueryStat.SUCCESSFUL_SCAN, ok ? 1 : 0);
893
894 // Post Scan stats
895 query_stats.addScannerStat(query_index, index,
896 QueryStat.ROWS_PRE_FILTER, rows_pre_filter);
897 query_stats.addScannerStat(query_index, index,
898 QueryStat.DPS_PRE_FILTER, dps_pre_filter);
899 query_stats.addScannerStat(query_index, index,
900 QueryStat.ROWS_POST_FILTER, rows_post_filter);
901 query_stats.addScannerStat(query_index, index,
902 QueryStat.DPS_POST_FILTER, dps_post_filter);
903 query_stats.addScannerStat(query_index, index,
904 QueryStat.SCANNER_UID_TO_STRING_TIME, uid_resolve_time);
905 query_stats.addScannerStat(query_index, index,
906 QueryStat.UID_PAIRS_RESOLVED, uids_resolved);
907 query_stats.addScannerStat(query_index, index,
908 QueryStat.COMPACTION_TIME, compaction_time);
909 }
910
911 if (ok && exception == null) {
912 validateAndTriggerCallback(kvs, annotations, histograms);
913 } else {
914 countdown.decrementAndGet();
915 }
916 }
917 }
918
919 /**

Callers 15

callMethod · 0.95
processRowMethod · 0.95
handleMethod · 0.45
requestMethod · 0.45
TestConfigArgPClass · 0.45
newTSDBConfigMethod · 0.45
exceptionCaughtMethod · 0.45
beforeMethod · 0.45
verifyE2EKryoMethod · 0.45
testToFromBytesMethod · 0.45

Calls 3

nanoTimeMethod · 0.95
addScannerStatMethod · 0.80

Tested by 13

newTSDBConfigMethod · 0.36
exceptionCaughtMethod · 0.36
beforeMethod · 0.36
verifyE2EKryoMethod · 0.36
testToFromBytesMethod · 0.36
testSinglePercentileMethod · 0.36
testPercentileListMethod · 0.36