diff --git a/chunjun-connectors/chunjun-connector-hbase-base/src/main/java/com/dtstack/chunjun/connector/hbase/table/lookup/HBaseLruTableFunction.java b/chunjun-connectors/chunjun-connector-hbase-base/src/main/java/com/dtstack/chunjun/connector/hbase/table/lookup/HBaseLruTableFunction.java index a8babf6a4b..088cf3edb0 100644 --- a/chunjun-connectors/chunjun-connector-hbase-base/src/main/java/com/dtstack/chunjun/connector/hbase/table/lookup/HBaseLruTableFunction.java +++ b/chunjun-connectors/chunjun-connector-hbase-base/src/main/java/com/dtstack/chunjun/connector/hbase/table/lookup/HBaseLruTableFunction.java @@ -107,28 +107,31 @@ public void run() { byte[] key = serde.getRowKey(rowKey); String keyStr = new String(key); try { - Get get = new Get(key); - Result result = table.get(get); - if (!result.isEmpty()) { - RowData data = serde.convertToNewRow(result); - if (openCache()) { - sideCache.putCache( - keyStr, - CacheObj.buildCacheObj( - ECacheContentType.MultiLine, - Collections.singletonList(data))); - } - future.complete(Collections.singletonList(data)); - } else { - dealMissKey(future); - if (openCache()) { - sideCache.putCache(keyStr, CacheMissVal.getMissKeyObj()); + if (!keyStr.isEmpty()) { + Get get = new Get(key); + Result result = table.get(get); + if (!result.isEmpty()) { + RowData data = serde.convertToNewRow(result); + if (openCache()) { + sideCache.putCache( + keyStr, + CacheObj.buildCacheObj( + ECacheContentType.MultiLine, + Collections.singletonList(data))); + } + future.complete(Collections.singletonList(data)); + return; } } + dealMissKey(future); + if (openCache()) { + sideCache.putCache(keyStr, CacheMissVal.getMissKeyObj()); + } + } catch (IOException e) { LOG.error("record:" + keyStr); LOG.error("get side record exception:" + e); - future.complete(Collections.emptyList()); + dealMissKey(future); } } });