private <T> List<Callable<T>> callable(TableName tableName, ResultsExtractor<T> action, Scan[] scans, Collection<ScanMetrics> scanMetricsList) {
        List<Callable<T>> callables = new ArrayList<>(scans.length);

        for (Scan scan : scans) {
            callables.add(new Callable<T>() {

                @Override
                public T call() throws Exception {
                    return execute(tableName, new TableCallback<>() {
                        @Override
                        public T doInTable(Table table) throws Throwable {
                            ResultScanner scanner = table.getScanner(scan);
                            try {
                                return action.extractData(scanner);
                            } finally {
                                IOUtils.closeQuietly(scanner);
                                scanMetricsList.add(scanner.getScanMetrics());
                            }
                        }
                    });
                }
            });
        }
        return callables;
    }
@author emeroad
@author HyunGil Jeong
@author minwoo.jung
@author Taejin Koo
commons-hbase/src/main/java/com/navercorp/pinpoint/common/hbase/HbaseTemplate.java