LideaLogErrorDAO { public List<LideaLogErrorDetailBO> list(List<String> traceIds) { return hbaseTemplate.execute(Const.LIDEA_LOG_DEATIL_TABLE, table -> { List<LideaLogErrorDetailBO> bos = new ArrayList<>(); if (traceIds.size() > 1) { List<Get> list = new ArrayList<>(); for (String traceId : traceIds) { Get get = new Get(BytesUtils.toBytes(traceId)); list.add(get); } Result[] rs = table.get(list); for (Result r : rs) { LideaLogErrorDetailBO bo = LideaLogResultsExtractor.mapErrorDetail(r); bos.add(bo); } return bos; } else { Get get = new Get(BytesUtils.toBytes(traceIds.get(0))); Result r = table.get(get); if (r.isEmpty()) { return null; } LideaLogErrorDetailBO bo = LideaLogResultsExtractor.mapErrorDetail(r); return Collections.singletonList(bo); } }); }  List<LideaLogErrorDetailBO> list(List<String> traceIds);  }
@Test public void list() { List<String> traceIds = new ArrayList<>(); traceIds.add("a3f2f2660d6c4a869626c878be92961d"); List<LideaLogErrorDetailBO> ret = lideaLogErrorDAO.list(traceIds); System.out.println("=========================================================================================="); System.out.println(JSON.toJSONString(ret)); }