@Override public List<SpanBo> selectSpan(TransactionId transactionId) { if (transactionId == null) { throw new NullPointerException("transactionId must not be null"); } byte[] transactionIdRowKey = rowKeyDecoder.encodeRowKey(transactionId); return template2.get( HBaseTables.TRACES, transactionIdRowKey, HBaseTables.TRACES_CF_SPAN, spanMapper); }
@Override public List<SpanBo> selectSpans(TransactionId transactionId) { if (transactionId == null) { throw new NullPointerException("transactionId must not be null"); } byte[] transactionIdRowKey = rowKeyDecoder.encodeRowKey(transactionId); Get get = new Get(transactionIdRowKey); get.addFamily(HBaseTables.TRACES_CF_SPAN); get.addFamily(HBaseTables.TRACES_CF_TERMINALSPAN); return template2.get(HBaseTables.TRACES, get, spanMapper); }
private List<List<SpanBo>> getSpans0( List<TransactionId> transactionIdList, List<byte[]> hBaseFamiliyList) { if (transactionIdList == null || transactionIdList.isEmpty()) { return Collections.emptyList(); } if (hBaseFamiliyList == null) { throw new NullPointerException("hBaseFamiliyList may not be null."); } final List<Get> getList = new ArrayList<>(transactionIdList.size()); for (TransactionId transactionId : transactionIdList) { byte[] transactionIdRowKey = rowKeyDecoder.encodeRowKey(transactionId); final Get get = new Get(transactionIdRowKey); for (byte[] hbaseFamily : hBaseFamiliyList) { get.addFamily(hbaseFamily); } getList.add(get); } return template2.get(HBaseTables.TRACES, getList, spanMapper); }