class HBase implements Lifecycle {

    private static final Logger logger =
            Logger.getLogger(HBase.class.getName());

    protected Configuration conf = null;

    private Map<String,String> properties;

    public Map<String,String> getProperties() {
        return properties;
    }

    public void setProperties(Map<String,String> properties) {
        this.properties = properties;

        if (conf == null) {
            conf = HBaseConfiguration.create();
        }
        for (Entry<String, String> entry: getProperties().entrySet()) {
            conf.set(entry.getKey(), entry.getValue());
        }
    }

    public synchronized Configuration configuration() {<FILL_FUNCTION_BODY>}
    
    // convenience setters
    public void setZookeeperQuorum(String value) {
        configuration().set("hbase.zookeeper.quorum", value);
    }
    public void setZookeeperClientPort(int port) {
        configuration().setInt("hbase.zookeeper.property.clientPort", port);
    }

    protected transient HBaseAdmin admin;

    public synchronized HBaseAdmin admin() throws IOException {
        if (admin == null) {
            admin = new HBaseAdmin(configuration());
        }

        return admin;
    }

    @Override
    public synchronized void stop() {
        isRunning = false;
        if (admin != null) {
            try {
                admin.close();
            } catch (IOException e) {
                logger.warning("problem closing HBaseAdmin " + admin + " - " + e);
            }

            admin = null;
        }
        if (conf != null) {
            // HConnectionManager.deleteConnection(conf); // XXX?
            conf = null;
        }
    }

    protected transient boolean isRunning = false;
    @Override
    public boolean isRunning() {
        return isRunning;
    }

    @Override
    public void start() {
        isRunning = true;
    }

    public synchronized void reset() {
        if (admin != null) {
            try {
                admin.close();
            } catch (IOException e) {
                logger.warning("problem closing HBaseAdmin " + admin + " - " + e);
            }

            admin = null;
        }
    }
}

        if (conf == null) {
            conf = HBaseConfiguration.create();
        }

        return conf;
    
<no_super_class>