diff --git a/pom.xml b/pom.xml
index 1a696fd..3f1a3c1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
com.kafkamgt.clusterapi
kafkawizeclusterapi
- 3.3
+ 3.5
jar
kafkaclusterapi
@@ -14,7 +14,7 @@
org.springframework.boot
spring-boot-starter-parent
- 2.1.3.RELEASE
+ 2.1.11.RELEASE
@@ -44,22 +44,28 @@
org.springframework.boot
spring-boot-starter-test
test
+
+
+
+
+
+
io.springfox
springfox-swagger2
- 2.7.0
+ 2.9.2
io.springfox
springfox-swagger-ui
- 2.7.0
+ 2.9.2
- io.swagger
+ io.swagger.core.v3
swagger-annotations
- 1.5.18
+ 2.1.0
log4j
@@ -77,6 +83,20 @@
2.2.2.RELEASE
test
+
+
+ org.powermock
+ powermock-module-junit4
+ 2.0.0
+ test
+
+
+
+ org.powermock
+ powermock-api-mockito2
+ 2.0.0
+ test
+
diff --git a/src/main/java/com/kafkamgt/clusterapi/controller/ClusterApiController.java b/src/main/java/com/kafkamgt/clusterapi/controller/ClusterApiController.java
index 6d54468..d83ca70 100644
--- a/src/main/java/com/kafkamgt/clusterapi/controller/ClusterApiController.java
+++ b/src/main/java/com/kafkamgt/clusterapi/controller/ClusterApiController.java
@@ -1,47 +1,63 @@
package com.kafkamgt.clusterapi.controller;
import com.kafkamgt.clusterapi.services.ManageKafkaComponents;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.*;
import org.springframework.util.MultiValueMap;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
+import java.util.Map;
import java.util.Set;
+import java.util.concurrent.ExecutionException;
@RestController
@RequestMapping("/topics")
+@Slf4j
public class ClusterApiController {
- private static Logger LOG = LoggerFactory.getLogger(ClusterApiController.class);
-
@Autowired
- ManageKafkaComponents kafkaTopics;
+ ManageKafkaComponents manageKafkaComponents;
- @RequestMapping(value = "/getTopics/{env}", method = RequestMethod.GET,produces = {MediaType.APPLICATION_JSON_VALUE})
- public ResponseEntity> getTopics(@PathVariable String env){
- Set topics = kafkaTopics.loadTopics(env);
+ @RequestMapping(value = "/getApiStatus", method = RequestMethod.GET,produces = {MediaType.APPLICATION_JSON_VALUE})
+ public ResponseEntity getApiStatus(){
+ return new ResponseEntity<>("ONLINE", HttpStatus.OK);
+ }
+
+ @RequestMapping(value = "/getStatus/{env}", method = RequestMethod.GET,produces = {MediaType.APPLICATION_JSON_VALUE})
+ public ResponseEntity getStatus(@PathVariable String env){
+ String envStatus = manageKafkaComponents.getStatus(env);
+
+ return new ResponseEntity<>(envStatus, HttpStatus.OK);
+ }
+ @RequestMapping(value = "/getTopics/{env}", method = RequestMethod.GET, produces = {MediaType.APPLICATION_JSON_VALUE})
+ public ResponseEntity> getTopics(@PathVariable String env){
+ Set topics = manageKafkaComponents.loadTopics(env);
return new ResponseEntity<>(topics, HttpStatus.OK);
}
@RequestMapping(value = "/getAcls/{env}", method = RequestMethod.GET,produces = {MediaType.APPLICATION_JSON_VALUE})
public ResponseEntity>> getAcls(@PathVariable String env){
- Set> acls = kafkaTopics.loadAcls(env);
+ Set> acls = manageKafkaComponents.loadAcls(env);
return new ResponseEntity<>(acls, HttpStatus.OK);
}
@PostMapping(value = "/createTopics")
public ResponseEntity createTopics(@RequestBody MultiValueMap topicRequest){
- kafkaTopics.createTopic(
- topicRequest.get("topicName").get(0),
- topicRequest.get("partitions").get(0),
- topicRequest.get("rf").get(0),
- topicRequest.get("env").get(0)
- );
+ try {
+ manageKafkaComponents.createTopic(
+ topicRequest.get("topicName").get(0),
+ topicRequest.get("partitions").get(0),
+ topicRequest.get("rf").get(0),
+ topicRequest.get("env").get(0)
+ );
+ } catch (Exception e) {
+ e.printStackTrace();
+ return new ResponseEntity("failure "+e, HttpStatus.OK);
+ }
return new ResponseEntity("success", HttpStatus.OK);
}
@@ -49,32 +65,36 @@ public ResponseEntity createTopics(@RequestBody MultiValueMap createAcls(@RequestBody MultiValueMap topicRequest){
-// if(!utils.validateLicense()){
-// LOG.info("Invalid License !!");
-// return new ResponseEntity("", HttpStatus.FORBIDDEN);
-// }
- LOG.info("----"+topicRequest.get("topicName"));
- String aclType = topicRequest.get("aclType").get(0);
- if(aclType.equals("Producer"))
- kafkaTopics.createProducerAcl(topicRequest.get("topicName").get(0),topicRequest.get("env").get(0),
- topicRequest.get("acl_ip").get(0),topicRequest.get("acl_ssl").get(0));
- else
- kafkaTopics.createConsumerAcl(topicRequest.get("topicName").get(0),topicRequest.get("env").get(0),
- topicRequest.get("acl_ip").get(0),topicRequest.get("acl_ssl").get(0), topicRequest.get("consumerGroup").get(0));
-
- return new ResponseEntity("success", HttpStatus.OK);
+ try {
+ String aclType = topicRequest.get("aclType").get(0);
+
+ if (aclType.equals("Producer"))
+ manageKafkaComponents.createProducerAcl(topicRequest.get("topicName").get(0),
+ topicRequest.get("env").get(0),
+ topicRequest.get("acl_ip").get(0), topicRequest.get("acl_ssl").get(0));
+ else
+ manageKafkaComponents.createConsumerAcl(topicRequest.get("topicName").get(0),
+ topicRequest.get("env").get(0),
+ topicRequest.get("acl_ip").get(0), topicRequest.get("acl_ssl").get(0), topicRequest.get("consumerGroup").get(0));
+
+ return new ResponseEntity("success", HttpStatus.OK);
+ }catch(Exception e){
+ return new ResponseEntity("failure "+e.getMessage(), HttpStatus.OK);
+ }
}
-
@PostMapping(value = "/postSchema")
public ResponseEntity postSchema(@RequestBody MultiValueMap fullSchemaDetails){
- String topicName= fullSchemaDetails.get("topicName").get(0);
- String schemaFull = fullSchemaDetails.get("fullSchema").get(0);
- String env = fullSchemaDetails.get("env").get(0);
-
- String result = kafkaTopics.postSchema(topicName,schemaFull,env);
-
- return new ResponseEntity("Status:"+result, HttpStatus.OK);
+ try {
+ String topicName = fullSchemaDetails.get("topicName").get(0);
+ String schemaFull = fullSchemaDetails.get("fullSchema").get(0);
+ String env = fullSchemaDetails.get("env").get(0);
+
+ String result = manageKafkaComponents.postSchema(topicName, schemaFull, env);
+ return new ResponseEntity<>("Status:"+result, HttpStatus.OK);
+ }catch(Exception e){
+ return new ResponseEntity<>("failure "+e.getMessage(), HttpStatus.OK);
+ }
}
diff --git a/src/main/java/com/kafkamgt/clusterapi/services/ManageKafkaComponents.java b/src/main/java/com/kafkamgt/clusterapi/services/ManageKafkaComponents.java
index b679301..6674d4f 100644
--- a/src/main/java/com/kafkamgt/clusterapi/services/ManageKafkaComponents.java
+++ b/src/main/java/com/kafkamgt/clusterapi/services/ManageKafkaComponents.java
@@ -1,13 +1,13 @@
package com.kafkamgt.clusterapi.services;
-import com.kafkamgt.clusterapi.utils.GetAdminClient;
+import com.kafkamgt.clusterapi.utils.AdminClientUtils;
+import lombok.extern.slf4j.Slf4j;
import org.apache.kafka.clients.admin.*;
import org.apache.kafka.common.KafkaException;
import org.apache.kafka.common.acl.*;
-import org.apache.kafka.common.resource.Resource;
+import org.apache.kafka.common.resource.PatternType;
+import org.apache.kafka.common.resource.ResourcePattern;
import org.apache.kafka.common.resource.ResourceType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.http.HttpEntity;
@@ -20,97 +20,123 @@
import java.util.concurrent.ExecutionException;
@Service
+@Slf4j
public class ManageKafkaComponents {
- private static Logger LOG = LoggerFactory.getLogger(ManageKafkaComponents.class);
-
@Autowired
Environment env;
@Autowired
- GetAdminClient getAdminClient;
-
- public Set> loadAcls(String environment){
- Set> acls = new HashSet<>();
+ AdminClientUtils getAdminClient;
- AdminClient client = getAdminClient.getAdminClient(environment);
+ public ManageKafkaComponents(){}
- AclBindingFilter aclBindingFilter = AclBindingFilter.ANY;
- DescribeAclsResult s = client.describeAcls(aclBindingFilter);
-
- try {
- s.values().get().stream().forEach(aclBinding -> {
- //LOG.info(aclBinding+" ---- aclBinding");
- HashMap aclbindingMap = new HashMap<>();
- aclbindingMap.put("host",aclBinding.entry().host());
- aclbindingMap.put("principle",aclBinding.entry().principal());
- aclbindingMap.put("operation",aclBinding.entry().operation().toString());
- aclbindingMap.put("permissionType",aclBinding.entry().permissionType().toString());
- aclbindingMap.put("resourceType",aclBinding.pattern().resourceType().toString());
- aclbindingMap.put("resourceName",aclBinding.pattern().name());
-
- if(!aclBinding.pattern().resourceType().toString().equals("CLUSTER")) {
- if(aclBinding.entry().operation().toString().equals("WRITE") ||
- aclBinding.entry().operation().toString().equals("READ"))
- acls.add(aclbindingMap);
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- } catch (ExecutionException e) {
- e.printStackTrace();
- }
+ public ManageKafkaComponents(Environment env, AdminClientUtils getAdminClient){
+ this.env = env;
+ this.getAdminClient = getAdminClient;
+ }
- return acls;
- }
+ public String getStatus(String environment){
- public Set loadTopics(String environment){
+ try {
AdminClient client = getAdminClient.getAdminClient(environment);
- ListTopicsResult topicsResult = client.listTopics();
- Set topics = new HashSet<>();
- try {
+ if(client.listTopics().names().get().size()>=0)
+ return "ONLINE";
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ return "OFFLINE";
+ } catch (ExecutionException e) {
+ e.printStackTrace();
+ return "OFFLINE";
+ }
+ catch (Exception e){
+ return "OFFLINE";
+ }
- DescribeTopicsResult s = client.describeTopics(new ArrayList<>(topicsResult.names().get()));
- Map topicDesc = s.all().get();
- Set keySet = topicDesc.keySet();
- List lstK = new ArrayList<>(keySet);
- lstK.stream()
- .forEach(topicName-> {
- topics.add(topicName+":::::"+topicDesc.get(topicName).partitions().get(0).replicas().size()+
- ":::::"+topicDesc.get(topicName).partitions().size());
- }
- );
-
- } catch (InterruptedException e) {
- e.printStackTrace();
- } catch (ExecutionException e) {
- e.printStackTrace();
- }
+ return "OFFLINE";
+ }
- client.close();
+ public Set> loadAcls(String environment){
+ Set> acls = new HashSet<>();
+
+ AdminClient client = getAdminClient.getAdminClient(environment);
+
+ try {
+ AclBindingFilter aclBindingFilter = AclBindingFilter.ANY;
+ DescribeAclsResult aclsResult = client.describeAcls(aclBindingFilter);
+
+ aclsResult.values().get().stream()
+ .forEach(aclBinding -> {
+ HashMap aclbindingMap = new HashMap<>();
+ aclbindingMap.put("host", aclBinding.entry().host());
+ aclbindingMap.put("principle", aclBinding.entry().principal());
+ aclbindingMap.put("operation", aclBinding.entry().operation().toString());
+ aclbindingMap.put("permissionType", aclBinding.entry().permissionType().toString());
+ aclbindingMap.put("resourceType", aclBinding.pattern().resourceType().toString());
+ aclbindingMap.put("resourceName", aclBinding.pattern().name());
+
+ if(!aclBinding.pattern().resourceType().toString().equals("CLUSTER")) {
+ if(aclBinding.entry().operation().toString().equals("WRITE") ||
+ aclBinding.entry().operation().toString().equals("READ"))
+ acls.add(aclbindingMap);
+ }
+ });
+ }catch (Exception e){
+ log.error("Error "+e.getMessage());
+ e.printStackTrace();
+ }
- return topics;
+ return acls;
+ }
+ public Set loadTopics(String environment){
+ AdminClient client = getAdminClient.getAdminClient(environment);
+ ListTopicsResult topicsResult = client.listTopics();
+ Set topics = new HashSet<>();
+ try {
+
+ DescribeTopicsResult s = client.describeTopics(new ArrayList<>(topicsResult.names().get()));
+ Map topicDesc = s.all().get();
+ Set keySet = topicDesc.keySet();
+ List lstK = new ArrayList<>(keySet);
+ lstK.stream()
+ .forEach(topicName-> {
+ topics.add(topicName+":::::"+topicDesc.get(topicName).partitions().get(0).replicas().size()+
+ ":::::"+topicDesc.get(topicName).partitions().size());
+ }
+ );
+
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ } catch (ExecutionException e) {
+ e.printStackTrace();
}
- public String createTopic(String name, String partitions, String replicationFactor, String environment) {
+ client.close();
+
+ return topics;
+
+ }
+
+ public String createTopic(String name, String partitions, String replicationFactor,
+ String environment) throws ExecutionException, InterruptedException {
- LOG.info(name + "--"+partitions + "--"+replicationFactor + "--" + environment);
+ log.info(name + "--"+partitions + "--"+replicationFactor + "--" + environment);
try (AdminClient client = getAdminClient.getAdminClient(environment)) {
- NewTopic topic = new NewTopic(name, Integer.parseInt(partitions), Short.parseShort(replicationFactor));
+ NewTopic topic = new NewTopic(name, Integer.parseInt(partitions),
+ Short.parseShort(replicationFactor));
CreateTopicsResult result = client.createTopics(Collections.singletonList(topic));
result.values().get(name).get();
-
} catch (KafkaException e) {
String errorMessage = "Invalid properties: ";
- LOG.error(errorMessage, e);
+ log.error(errorMessage, e);
throw e;
} catch (NumberFormatException e) {
String errorMessage = "Invalid replica assignment string";
- LOG.error(errorMessage, e);
+ log.error(errorMessage, e);
throw e;
} catch (ExecutionException | InterruptedException e) {
String errorMessage;
@@ -120,21 +146,26 @@ public String createTopic(String name, String partitions, String replicationFact
Thread.currentThread().interrupt();
errorMessage = e.getMessage();
}
- LOG.error("Unable to create topic {}", name, e);
+ log.error("Unable to create topic {}", name, errorMessage);
+ throw e;
+ }
+ catch (Exception e){
+ log.error(e.getMessage());
+ throw e;
}
- //createProducerAcl(name,environment,acl_ip,acl_ssl);
return "success";
}
- public String createProducerAcl(String topicName, String environment, String acl_ip, String acl_ssl) {
+ public String createProducerAcl(String topicName, String environment,
+ String acl_ip, String acl_ssl) {
- LOG.info("In producer alcs::"+acl_ip +"--"+ acl_ssl);
+ log.info("In producer alcs::"+acl_ip +"--"+ acl_ssl);
try (AdminClient client = getAdminClient.getAdminClient(environment)) {
- List aclListArray = new ArrayList();
- String host = null, principal=null;
+ List aclListArray = new ArrayList<>();
+ String host, principal;
if(acl_ssl!=null && acl_ssl.trim().length()>0){
acl_ssl=acl_ssl.trim();
if(acl_ssl.contains("CN") || acl_ssl.contains("cn"))
@@ -142,19 +173,18 @@ public String createProducerAcl(String topicName, String environment, String acl
host = "*";
principal = "User:"+acl_ssl;
- LOG.info(principal+"In producer alcs::"+host);
+ log.info(principal+"In producer alcs::"+host);
- Resource resource = new Resource(ResourceType.TOPIC,topicName);
+ ResourcePattern resourcePattern = new ResourcePattern(ResourceType.TOPIC,topicName,PatternType.LITERAL);
AccessControlEntry aclEntry = new AccessControlEntry(principal,host,AclOperation.WRITE,AclPermissionType.ALLOW);
- AclBinding aclBinding1 = new AclBinding(resource,aclEntry);
+ AclBinding aclBinding1 = new AclBinding(resourcePattern,aclEntry);
aclListArray.add(aclBinding1);
- resource = new Resource(ResourceType.TOPIC,topicName);
aclEntry = new AccessControlEntry(principal,host,AclOperation.DESCRIBE,AclPermissionType.ALLOW);
- AclBinding aclBinding2 = new AclBinding(resource,aclEntry);
+ AclBinding aclBinding2 = new AclBinding(resourcePattern,aclEntry);
aclListArray.add(aclBinding2);
- LOG.info(aclListArray.get(0).entry().host()+"----"+aclListArray.get(0).entry().principal());
+ log.info(aclListArray.get(0).entry().host()+"----"+aclListArray.get(0).entry().principal());
client.createAcls(aclListArray);
}
@@ -168,19 +198,18 @@ public String createProducerAcl(String topicName, String environment, String acl
host=acl_ip;
principal="User:*";
- LOG.info(principal+"In producer alcs::"+host);
+ log.info(principal+"In producer alcs::"+host);
- Resource resource = new Resource(ResourceType.TOPIC,topicName);
+ ResourcePattern resourcePattern = new ResourcePattern(ResourceType.TOPIC,topicName,PatternType.LITERAL);
AccessControlEntry aclEntry = new AccessControlEntry(principal,host,AclOperation.WRITE,AclPermissionType.ALLOW);
- AclBinding aclBinding1 = new AclBinding(resource,aclEntry);
+ AclBinding aclBinding1 = new AclBinding(resourcePattern, aclEntry);
aclListArray.add(aclBinding1);
- resource = new Resource(ResourceType.TOPIC,topicName);
aclEntry = new AccessControlEntry(principal,host,AclOperation.DESCRIBE,AclPermissionType.ALLOW);
- AclBinding aclBinding2 = new AclBinding(resource,aclEntry);
+ AclBinding aclBinding2 = new AclBinding(resourcePattern, aclEntry);
aclListArray.add(aclBinding2);
- LOG.info(aclListArray.get(0).entry().host()+"----"+aclListArray.get(0).entry().principal());
+ log.info(aclListArray.get(0).entry().host()+"----"+aclListArray.get(0).entry().principal());
client.createAcls(aclListArray);
client.close();
}
@@ -190,13 +219,14 @@ public String createProducerAcl(String topicName, String environment, String acl
return "success";
}
- public String createConsumerAcl(String topicName, String environment, String acl_ip, String acl_ssl, String consumerGroup) {
+ public String createConsumerAcl(String topicName, String environment, String acl_ip,
+ String acl_ssl, String consumerGroup) {
try (AdminClient client = getAdminClient.getAdminClient(environment)) {
- List aclListArray = new ArrayList();
+ List aclListArray = new ArrayList<>();
String host = null, principal=null;
- LOG.info(acl_ssl+"----acl_ssl");
+ log.info(acl_ssl+"----acl_ssl");
if(acl_ssl!=null && acl_ssl.trim().length()>0){
acl_ssl=acl_ssl.trim();
if(acl_ssl.contains("CN") || acl_ssl.contains("cn"))
@@ -206,22 +236,23 @@ public String createConsumerAcl(String topicName, String environment, String acl
}
- Resource resource = new Resource(ResourceType.TOPIC,topicName);
+ //Resource resource = new Resource(ResourceType.TOPIC,topicName);
+
AccessControlEntry aclEntry = new AccessControlEntry(principal,host,AclOperation.READ,AclPermissionType.ALLOW);
- AclBinding aclBinding1 = new AclBinding(resource,aclEntry);
+ ResourcePattern resourcePattern = new ResourcePattern(ResourceType.TOPIC,topicName,PatternType.LITERAL);
+ AclBinding aclBinding1 = new AclBinding(resourcePattern, aclEntry);
aclListArray.add(aclBinding1);
- resource = new Resource(ResourceType.TOPIC,topicName);
aclEntry = new AccessControlEntry(principal,host,AclOperation.DESCRIBE,AclPermissionType.ALLOW);
- AclBinding aclBinding2 = new AclBinding(resource,aclEntry);
+ AclBinding aclBinding2 = new AclBinding(resourcePattern,aclEntry);
aclListArray.add(aclBinding2);
- resource = new Resource(ResourceType.GROUP,consumerGroup);
+ resourcePattern = new ResourcePattern(ResourceType.GROUP,consumerGroup,PatternType.LITERAL);
aclEntry = new AccessControlEntry(principal,host,AclOperation.READ,AclPermissionType.ALLOW);
- AclBinding aclBinding3 = new AclBinding(resource,aclEntry);
+ AclBinding aclBinding3 = new AclBinding(resourcePattern,aclEntry);
aclListArray.add(aclBinding3);
- LOG.info(aclListArray.get(0).entry().host()+"----");
+ log.info(aclListArray.get(0).entry().host()+"----");
client.createAcls(aclListArray);
}
@@ -231,22 +262,21 @@ public String createConsumerAcl(String topicName, String environment, String acl
host=acl_ip;
principal="User:*";
- Resource resource = new Resource(ResourceType.TOPIC,topicName);
+ ResourcePattern resourcePattern = new ResourcePattern(ResourceType.TOPIC,topicName,PatternType.LITERAL);
AccessControlEntry aclEntry = new AccessControlEntry(principal,host,AclOperation.READ,AclPermissionType.ALLOW);
- AclBinding aclBinding1 = new AclBinding(resource,aclEntry);
+ AclBinding aclBinding1 = new AclBinding(resourcePattern,aclEntry);
aclListArray.add(aclBinding1);
- resource = new Resource(ResourceType.TOPIC,topicName);
aclEntry = new AccessControlEntry(principal,host,AclOperation.DESCRIBE,AclPermissionType.ALLOW);
- AclBinding aclBinding2 = new AclBinding(resource,aclEntry);
+ AclBinding aclBinding2 = new AclBinding(resourcePattern,aclEntry);
aclListArray.add(aclBinding2);
- resource = new Resource(ResourceType.GROUP,consumerGroup);
+ resourcePattern = new ResourcePattern(ResourceType.GROUP,consumerGroup,PatternType.LITERAL);
aclEntry = new AccessControlEntry(principal,host,AclOperation.READ,AclPermissionType.ALLOW);
- AclBinding aclBinding3 = new AclBinding(resource,aclEntry);
+ AclBinding aclBinding3 = new AclBinding(resourcePattern,aclEntry);
aclListArray.add(aclBinding3);
- LOG.info(aclListArray.get(0).entry().host()+"----");
+ log.info(aclListArray.get(0).entry().host()+"----");
client.createAcls(aclListArray);
}
}
@@ -255,14 +285,18 @@ public String createConsumerAcl(String topicName, String environment, String acl
public String postSchema(String topicName, String schema, String environmentVal){
try {
- String uri = env.getProperty(environmentVal+".schemaregistry.url") + "/subjects/" + topicName + "-value/versions";
- RestTemplate restTemplate = new RestTemplate();
+ String schemaRegistryUrl = env.getProperty(environmentVal+".schemaregistry.url");
+ if(schemaRegistryUrl == null)
+ return "Cannot retrieve SchemaRegistry Url";
+ String uri = schemaRegistryUrl + "/subjects/" +
+ topicName + "-value/versions";
+ RestTemplate restTemplate = getAdminClient.getRestTemplate();
Map params = new HashMap();
params.put("schema", schema);
- HttpHeaders headers = new HttpHeaders();//createHeaders("user1", "pwd");
+ HttpHeaders headers = new HttpHeaders();
headers.set("Content-Type", "application/vnd.schemaregistry.v1+json");
HttpEntity