public Request getTopicDeleteRequestUrl(String topic) { String requestUrl = StringUtils.join(new String[] { _baseUrl, "/topics/", topic }); Request request = new Request(Method.DELETE, requestUrl); return request; }
public Request getTopicExternalViewRequestUrl(String topic) { String requestUrl = StringUtils.join(new String[] { _baseUrl, "/topics/", topic }); Request request = new Request(Method.GET, requestUrl); return request; }
public Request getTopicCreationRequestUrl(String topic, int numPartitions) { Request request = new Request(Method.POST, _baseUrl + "/topics/"); TopicPartition topicPartitionInfo = new TopicPartition(topic, numPartitions); request.setEntity(topicPartitionInfo.toJSON().toJSONString(), MediaType.APPLICATION_JSON); return request; }
public Request getTopicExpansionRequestUrl(String topic, int numPartitions) { Request request = new Request(Method.PUT, _baseUrl + "/topics/"); TopicPartition topicPartitionInfo = new TopicPartition(topic, numPartitions); request.setEntity(topicPartitionInfo.toJSON().toJSONString(), MediaType.APPLICATION_JSON); return request; } }
public Request getTopicDeleteRequestUrl(String topic, String src, String dst) { String requestUrl = StringUtils.join(new String[]{ _baseUrl, "/topics/", topic, "?src=", src, "&dst=", dst }); Request request = new Request(Method.DELETE, requestUrl); return request; }
public Request getTopicExternalViewRequestUrl(String topic) { String requestUrl = StringUtils.join(new String[]{ _baseUrl, "/topics/", topic }); Request request = new Request(Method.GET, requestUrl); return request; }
public Request getTopicDeleteRequestUrl(String topic, String src, String dst) { String requestUrl = StringUtils.join(new String[]{ _baseUrl, "/topics/", topic, "?src=", src, "&dst=", dst }); Request request = new Request(Method.DELETE, requestUrl); return request; }
public Request getTopicCreationRequestUrl(String topic, String src, String dst) { String requestUrl = StringUtils.join(new String[]{ _baseUrl, "/topics/", topic, "?src=", src, "&dst=", dst }); Request request = new Request(Method.POST, requestUrl); return request; }
public Request postSetControllerRebalance(String srcCluster, String dstCluster, boolean enabled) { String requestUrl = StringUtils.join(new String[]{ _baseUrl, "/admin/controller_autobalance?srcCluster="+ srcCluster + "&dstCluster=" + dstCluster + "&enabled=" + enabled }); Request request = new Request(Method.POST, requestUrl); return request; } public Request getControllerRebalanceStatus() {
public Request getHealthCheck() { String requestUrl = StringUtils.join(new String[]{ _baseUrl, "/health" }); Request request = new Request(Method.GET, requestUrl); return request; }
public Request getControllerRebalanceStatus() { String requestUrl = StringUtils.join(new String[]{ _baseUrl, "/admin/controller_autobalance" }); Request request = new Request(Method.GET, requestUrl); return request; } public Request postSetControllerRebalance(boolean enabled) {
public Request getHealthCheck() { String requestUrl = StringUtils.join(new String[]{ _baseUrl, "/health" }); Request request = new Request(Method.GET, requestUrl); return request; }
public Request getTopicExternalViewRequestUrl(String topic) { String requestUrl = StringUtils.join(new String[]{ _baseUrl, "/topics/", topic }); Request request = new Request(Method.GET, requestUrl); return request; }
public Request getTopicExternalViewRequestUrl(String topic) { String requestUrl = StringUtils.join(new String[]{ _baseUrl, "/topics/", topic }); Request request = new Request(Method.GET, requestUrl); return request; }
public Request getTopicExpansionRequestUrl(String topic, String src, String dst, int numPartitions) { String requestUrl = StringUtils.join(new String[]{ _baseUrl, "/topics/", topic, "?src=", src, "&dst=", dst, "&partitions=", String.valueOf(numPartitions) }); Request request = new Request(Method.PUT, requestUrl); return request; } public Request postSetControllerRebalance(String srcCluster, String dstCluster, boolean enabled) {
public Request postInstanceRebalance(Boolean status) { String requestUrl = StringUtils.join(new String[]{ _baseUrl, "/admin?forceRebalance="+ status.toString() }); Request request = new Request(Method.POST, requestUrl); return request; }
/** * Deletes a resource. * * @param uri * The resource URI. * @return The result status. */ public Status deleteResource(String uri) { return getClientDispatcher().handle(new Request(Method.DELETE, uri)) .getStatus(); }
/** * Retrieves a resource representation. * * @param uri * The resource URI. * @return The resource representation. */ public Representation getResource(String uri) { return getClientDispatcher().handle(new Request(Method.GET, uri)) .getEntity(); }
public Request getTopicExpansionRequestUrl(String topic, int numPartitions) { Request request = new Request(Method.PUT, _baseUrl + "/topics/"); TopicPartition topicPartitionInfo = new TopicPartition(topic, numPartitions); request.setEntity(topicPartitionInfo.toJSON().toJSONString(), MediaType.APPLICATION_JSON); return request; } }
public Request getTopicCreationRequestUrl(String topic, int numPartitions) { Request request = new Request(Method.POST, _baseUrl + "/topics/"); TopicPartition topicPartitionInfo = new TopicPartition(topic, numPartitions); request.setEntity(topicPartitionInfo.toJSON().toJSONString(), MediaType.APPLICATION_JSON); return request; }