package org.ts.ddcs.hbase;


import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Configuration;


@Configuration
@EnableConfigurationProperties(HBaseProperties.class)
public class HBaseConfig {
    private final HBaseProperties properties;

    public HBaseConfig(HBaseProperties properties) {
        this.properties = properties;
    }

//    @Bean
//    public HbaseTemplate hbaseTemplate() {
//        HbaseTemplate hbaseTemplate = new HbaseTemplate();
//        hbaseTemplate.setConfiguration(configuration());
//        hbaseTemplate.setAutoFlush(false);
//        return hbaseTemplate;
//    }

//    public org.apache.hadoop.conf.Configuration configuration() {
//        org.apache.hadoop.conf.Configuration configuration = HBaseConfiguration.create();
////        Map<String, String> config = properties.getConfig();
////        Set<String> keySet = config.keySet();
////        for (String key : keySet) {
////            configuration.set(key, config.get(key));
////        }
//        configuration.set("hbase.zookeeper.quorum", "hbase140");
//        configuration.set("hbase.zookeeper.property.clientPort", "2181");
//        //   configuration.set("hbase.master", "fdfsnode3:16000");
////        configuration.set("zookeeper.znode.parent", "/hbase");
////        configuration.setInt("hbase.rpc.timeout", 6000);
////        configuration.setInt("hbase.client.operation.timeout", 6000);
////        configuration.setInt("hbase.client.scanner.timeout.period", 6000);
//        return configuration;
//    }

}
