package com.highdatas.mdm.controller;
|
|
import com.highdatas.mdm.pojo.Result;
|
import com.highdatas.mdm.service.HBaseService;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import java.util.List;
|
|
/**
|
* @author kimi
|
* @description
|
* @date 2019-12-13 10:57
|
*/
|
|
@Slf4j
|
@RestController
|
@RequestMapping("/hbase")
|
public class HbaseController {
|
|
@Autowired
|
HBaseService hBaseService;
|
|
|
@RequestMapping(value = "/test")
|
public Result deleteActUser(){
|
List<org.apache.hadoop.hbase.client.Result> rowKeyAndColumn = hBaseService.getRowKeyAndColumn("test", "1", "2", "name", " 1 = 1");
|
return Result.success(rowKeyAndColumn);
|
}
|
|
@RequestMapping(value = "/create/{tableName}")
|
public Result create(@PathVariable String tableName){
|
hBaseService.createTable(tableName);
|
return Result.success(null);
|
}
|
|
}
|