public JSONArray scan(byte[] startkey, byte[] endkey) {
		HTable table = null;
		ResultScanner rs = null;
		try {
			long startT = System.currentTimeMillis();
			Scan scan = new Scan(startkey, endkey);
			
			table = (HTable)pool.getTable(tableName);
			rs = table.getScanner(scan);
			
			//get max return 
			int maxRowNum = Util.parseInt(props.getProperty("return.max"), 1000);
			JSONArray ret = new JSONArray();
			for (Result res : rs) {
				ret.put(toJSON(res));
				if (ret.length() >= maxRowNum)
					break;
			}
			LOG.info(String.format("scan on %s by start key: %s, end key: %s takes %s ms, get %s rows", 
					new String(table.getTableName()), 
					Util.bytes2String(startkey, MetaData.getRowKeyType(tableName)),
					Util.bytes2String(endkey, MetaData.getRowKeyType(tableName)),
					(System.currentTimeMillis() - startT),
					ret.length()));
			return ret;
		} catch (IOException e) {
			LOG.error(e.getMessage(), e);
			return null;
		} finally {
			if (rs!=null) rs.close();
			if (table!=null)
				try {
					table.close();
				} catch (IOException e) {
					LOG.error("table close error", e);
				}
		}
	}