集群同步-》位移对齐记录展示

This commit is contained in:
许晓东
2021-10-27 20:21:15 +08:00
parent 3b01f28446
commit 73080f7eb1
7 changed files with 260 additions and 4 deletions

View File

@@ -4,9 +4,12 @@ import com.xuxd.kafka.console.beans.dto.SyncDataDTO;
import com.xuxd.kafka.console.service.OperationService;
import org.apache.kafka.clients.admin.AdminClientConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
@@ -33,4 +36,14 @@ public class OperationController {
dto.getProperties().put(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG, dto.getAddress());
return operationService.minOffsetAlignment(dto.getGroupId(), dto.getTopic(), dto.getProperties());
}
@GetMapping("/sync/alignment/list")
public Object getAlignmentList() {
return operationService.getAlignmentList();
}
@DeleteMapping("/sync/alignment")
public Object deleteAlignment(@RequestParam Long id) {
return operationService.deleteAlignmentById(id);
}
}