docs: private static int lookup(final TSDB tsdb,
                              final boolean use_data_table,
                              final String[] args) throws Exception {
      if (!use_data_table) {
        tsdb.getClient().ensureTableExists(
            tsdb.getConfig().getString(
                "tsd.storage.hbase.meta_table")).joinUninterruptibly();
      }
      
      final SearchQuery query = new SearchQuery();
      query.setType(SearchType.LOOKUP);
      
      int index = 1;
      if (!args[index].contains("=")) {
        query.setMetric(args[index++]);
      }
      
      final List<Pair<String, String>> tags = 
          new ArrayList<Pair<String, String>>(args.length - index);
      for (; index < args.length; index++) {
        Tags.parse(tags, args[index]);
      }
      query.setTags(tags);
      if (use_data_table) {
        query.setUseMeta(false);
        LOG.warn("NOTE: Scanning the full data table may take a long time");
      }
      
      final TimeSeriesLookup lookup = new TimeSeriesLookup(tsdb, query);
      lookup.setToStdout(true);
      lookup.lookup();
      return 0;
    }