From 3730d4283d2766e19d247dfce1da64db0c36c723 Mon Sep 17 00:00:00 2001 From: Imran M Yousuf Date: Wed, 25 Aug 2010 09:35:22 +0600 Subject: [PATCH] Extend the converter to take table pool when converting row to object Signed-off-by: Imran M Yousuf --- .../com/smartitengineering/dao/impl/hbase/spi/ObjectRowConverter.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/smart-hbase-dao/src/main/java/com/smartitengineering/dao/impl/hbase/spi/ObjectRowConverter.java b/smart-hbase-dao/src/main/java/com/smartitengineering/dao/impl/hbase/spi/ObjectRowConverter.java index 6b6fc61..de1b27f 100644 --- a/smart-hbase-dao/src/main/java/com/smartitengineering/dao/impl/hbase/spi/ObjectRowConverter.java +++ b/smart-hbase-dao/src/main/java/com/smartitengineering/dao/impl/hbase/spi/ObjectRowConverter.java @@ -20,6 +20,7 @@ package com.smartitengineering.dao.impl.hbase.spi; import java.util.LinkedHashMap; import org.apache.hadoop.hbase.client.Delete; +import org.apache.hadoop.hbase.client.HTablePool; import org.apache.hadoop.hbase.client.Put; import org.apache.hadoop.hbase.client.Result; @@ -51,7 +52,8 @@ public interface ObjectRowConverter { * is obtained then, the root result will be passed to this converter, which in turn will load whatever it needs to * load. * @param startRow The root row of this object. + * @param tablePool The HBase table pool to fetch tables from a pool and use them to fetch related rows * @return Instance of the object from persisted {@link Result result(s)} */ - T rowsToObject(Result startRow); + T rowsToObject(Result startRow, HTablePool tablePool); } -- 2.11.4.GIT