Skip to content

Commit e251f36

Browse files
authored
Merge pull request #19 from tinawenqiao/dev
Dev
2 parents 3a08d3a + 124a440 commit e251f36

23 files changed

+400
-106
lines changed

docs/definitions.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ __optional__|integer(int32)
380380
|**minLatency** +
381381
__optional__|integer(int32)
382382
|**mode** +
383-
__optional__|enum (Leader, Follower, Observer)
383+
__optional__|enum (Leader, Follower, Observer, Standalone)
384384
|**nodes** +
385385
__optional__|integer(int32)
386386
|**outstanding** +

docs/index.html

Lines changed: 107 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -491,8 +491,9 @@ <h1>Kafka REST API SwaggerUI</h1>
491491
<ul class="sectlevel3">
492492
<li><a href="#_zkconnstateusingget">4.4.1. Get the connection state of zookeeper</a></li>
493493
<li><a href="#_getenvusingget">4.4.2. Get the environment information of zookeeper</a></li>
494-
<li><a href="#_lsusingget">4.4.3. List a zookeeper path</a></li>
495-
<li><a href="#_getstatusingget">4.4.4. Get the service state of zookeeper</a></li>
494+
<li><a href="#_getusingget">4.4.3. Get data of a zookeeper path</a></li>
495+
<li><a href="#_lsusingget">4.4.4. List a zookeeper path</a></li>
496+
<li><a href="#_getstatusingget">4.4.5. Get the service state of zookeeper</a></li>
496497
</ul>
497498
</li>
498499
</ul>
@@ -4296,10 +4297,10 @@ <h5 id="_produces_38"><a class="anchor" href="#_produces_38"></a>Produces</h5>
42964297
</div>
42974298
</div>
42984299
<div class="sect3">
4299-
<h4 id="_lsusingget"><a class="anchor" href="#_lsusingget"></a>4.4.3. List a zookeeper path</h4>
4300+
<h4 id="_getusingget"><a class="anchor" href="#_getusingget"></a>4.4.3. Get data of a zookeeper path</h4>
43004301
<div class="literalblock">
43014302
<div class="content">
4302-
<pre>GET /zk/ls/{path}</pre>
4303+
<pre>GET /zk/get/path</pre>
43034304
</div>
43044305
</div>
43054306
<div class="sect4">
@@ -4321,7 +4322,7 @@ <h5 id="_parameters_32"><a class="anchor" href="#_parameters_32"></a>Parameters<
43214322
</thead>
43224323
<tbody>
43234324
<tr>
4324-
<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>Path</strong></p></td>
4325+
<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>Query</strong></p></td>
43254326
<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>path</strong><br>
43264327
<em>required</em></p></td>
43274328
<td class="tableblock halign-left valign-middle"><p class="tableblock">path</p></td>
@@ -4349,7 +4350,7 @@ <h5 id="_responses_39"><a class="anchor" href="#_responses_39"></a>Responses</h5
43494350
<tr>
43504351
<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>200</strong></p></td>
43514352
<td class="tableblock halign-left valign-middle"><p class="tableblock">OK</p></td>
4352-
<td class="tableblock halign-left valign-middle"><p class="tableblock">&lt; string &gt; array</p></td>
4353+
<td class="tableblock halign-left valign-middle"><p class="tableblock">&lt; string, string &gt; map</p></td>
43534354
</tr>
43544355
<tr>
43554356
<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>401</strong></p></td>
@@ -4391,13 +4392,41 @@ <h5 id="_produces_39"><a class="anchor" href="#_produces_39"></a>Produces</h5>
43914392
</div>
43924393
</div>
43934394
<div class="sect3">
4394-
<h4 id="_getstatusingget"><a class="anchor" href="#_getstatusingget"></a>4.4.4. Get the service state of zookeeper</h4>
4395+
<h4 id="_lsusingget"><a class="anchor" href="#_lsusingget"></a>4.4.4. List a zookeeper path</h4>
43954396
<div class="literalblock">
43964397
<div class="content">
4397-
<pre>GET /zk/stat</pre>
4398+
<pre>GET /zk/ls/path</pre>
43984399
</div>
43994400
</div>
44004401
<div class="sect4">
4402+
<h5 id="_parameters_33"><a class="anchor" href="#_parameters_33"></a>Parameters</h5>
4403+
<table class="tableblock frame-all grid-all spread">
4404+
<colgroup>
4405+
<col style="width: 11%;">
4406+
<col style="width: 16%;">
4407+
<col style="width: 50%;">
4408+
<col style="width: 22%;">
4409+
</colgroup>
4410+
<thead>
4411+
<tr>
4412+
<th class="tableblock halign-left valign-middle">Type</th>
4413+
<th class="tableblock halign-left valign-middle">Name</th>
4414+
<th class="tableblock halign-left valign-middle">Description</th>
4415+
<th class="tableblock halign-left valign-middle">Schema</th>
4416+
</tr>
4417+
</thead>
4418+
<tbody>
4419+
<tr>
4420+
<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>Query</strong></p></td>
4421+
<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>path</strong><br>
4422+
<em>required</em></p></td>
4423+
<td class="tableblock halign-left valign-middle"><p class="tableblock">path</p></td>
4424+
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
4425+
</tr>
4426+
</tbody>
4427+
</table>
4428+
</div>
4429+
<div class="sect4">
44014430
<h5 id="_responses_40"><a class="anchor" href="#_responses_40"></a>Responses</h5>
44024431
<table class="tableblock frame-all grid-all spread">
44034432
<colgroup>
@@ -4416,7 +4445,7 @@ <h5 id="_responses_40"><a class="anchor" href="#_responses_40"></a>Responses</h5
44164445
<tr>
44174446
<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>200</strong></p></td>
44184447
<td class="tableblock halign-left valign-middle"><p class="tableblock">OK</p></td>
4419-
<td class="tableblock halign-left valign-middle"><p class="tableblock">&lt; string, <a href="#_zkserverstat">ZkServerStat</a> &gt; map</p></td>
4448+
<td class="tableblock halign-left valign-middle"><p class="tableblock">&lt; string &gt; array</p></td>
44204449
</tr>
44214450
<tr>
44224451
<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>401</strong></p></td>
@@ -4457,6 +4486,73 @@ <h5 id="_produces_40"><a class="anchor" href="#_produces_40"></a>Produces</h5>
44574486
</div>
44584487
</div>
44594488
</div>
4489+
<div class="sect3">
4490+
<h4 id="_getstatusingget"><a class="anchor" href="#_getstatusingget"></a>4.4.5. Get the service state of zookeeper</h4>
4491+
<div class="literalblock">
4492+
<div class="content">
4493+
<pre>GET /zk/stat</pre>
4494+
</div>
4495+
</div>
4496+
<div class="sect4">
4497+
<h5 id="_responses_41"><a class="anchor" href="#_responses_41"></a>Responses</h5>
4498+
<table class="tableblock frame-all grid-all spread">
4499+
<colgroup>
4500+
<col style="width: 10%;">
4501+
<col style="width: 70%;">
4502+
<col style="width: 20%;">
4503+
</colgroup>
4504+
<thead>
4505+
<tr>
4506+
<th class="tableblock halign-left valign-middle">HTTP Code</th>
4507+
<th class="tableblock halign-left valign-middle">Description</th>
4508+
<th class="tableblock halign-left valign-middle">Schema</th>
4509+
</tr>
4510+
</thead>
4511+
<tbody>
4512+
<tr>
4513+
<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>200</strong></p></td>
4514+
<td class="tableblock halign-left valign-middle"><p class="tableblock">OK</p></td>
4515+
<td class="tableblock halign-left valign-middle"><p class="tableblock">&lt; string, <a href="#_zkserverstat">ZkServerStat</a> &gt; map</p></td>
4516+
</tr>
4517+
<tr>
4518+
<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>401</strong></p></td>
4519+
<td class="tableblock halign-left valign-middle"><p class="tableblock">Unauthorized</p></td>
4520+
<td class="tableblock halign-left valign-middle"><p class="tableblock">No Content</p></td>
4521+
</tr>
4522+
<tr>
4523+
<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>403</strong></p></td>
4524+
<td class="tableblock halign-left valign-middle"><p class="tableblock">Forbidden</p></td>
4525+
<td class="tableblock halign-left valign-middle"><p class="tableblock">No Content</p></td>
4526+
</tr>
4527+
<tr>
4528+
<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>404</strong></p></td>
4529+
<td class="tableblock halign-left valign-middle"><p class="tableblock">Not Found</p></td>
4530+
<td class="tableblock halign-left valign-middle"><p class="tableblock">No Content</p></td>
4531+
</tr>
4532+
</tbody>
4533+
</table>
4534+
</div>
4535+
<div class="sect4">
4536+
<h5 id="_consumes_41"><a class="anchor" href="#_consumes_41"></a>Consumes</h5>
4537+
<div class="ulist">
4538+
<ul>
4539+
<li>
4540+
<p><code>application/json</code></p>
4541+
</li>
4542+
</ul>
4543+
</div>
4544+
</div>
4545+
<div class="sect4">
4546+
<h5 id="_produces_41"><a class="anchor" href="#_produces_41"></a>Produces</h5>
4547+
<div class="ulist">
4548+
<ul>
4549+
<li>
4550+
<p><code><strong>/</strong></code></p>
4551+
</li>
4552+
</ul>
4553+
</div>
4554+
</div>
4555+
</div>
44604556
</div>
44614557
</div>
44624558
</div>
@@ -5297,7 +5393,7 @@ <h3 id="_zkserverstat"><a class="anchor" href="#_zkserverstat"></a>5.24. ZkServe
52975393
<tr>
52985394
<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>mode</strong><br>
52995395
<em>optional</em></p></td>
5300-
<td class="tableblock halign-left valign-middle"><p class="tableblock">enum (Leader, Follower, Observer)</p></td>
5396+
<td class="tableblock halign-left valign-middle"><p class="tableblock">enum (Leader, Follower, Observer, Standalone)</p></td>
53015397
</tr>
53025398
<tr>
53035399
<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>nodes</strong><br>
@@ -5337,7 +5433,7 @@ <h3 id="_zkserverstat"><a class="anchor" href="#_zkserverstat"></a>5.24. ZkServe
53375433
</div>
53385434
<div id="footer">
53395435
<div id="footer-text">
5340-
Last updated 2018-02-10 00:44:08 CST
5436+
Last updated 2018-11-13 00:36:04 +08:00
53415437
</div>
53425438
</div>
53435439
</body>

docs/index.pdf

18 KB
Binary file not shown.

docs/paths.adoc

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1501,10 +1501,49 @@ GET /zk/env
15011501
* `*/*`
15021502

15031503

1504+
[[_getusingget]]
1505+
==== Get data of a zookeeper path
1506+
....
1507+
GET /zk/get/path
1508+
....
1509+
1510+
1511+
===== Parameters
1512+
1513+
[options="header", cols=".^2,.^3,.^9,.^4"]
1514+
|===
1515+
|Type|Name|Description|Schema
1516+
|**Query**|**path** +
1517+
__required__|path|string
1518+
|===
1519+
1520+
1521+
===== Responses
1522+
1523+
[options="header", cols=".^2,.^14,.^4"]
1524+
|===
1525+
|HTTP Code|Description|Schema
1526+
|**200**|OK|< string, string > map
1527+
|**401**|Unauthorized|No Content
1528+
|**403**|Forbidden|No Content
1529+
|**404**|Not Found|No Content
1530+
|===
1531+
1532+
1533+
===== Consumes
1534+
1535+
* `application/json`
1536+
1537+
1538+
===== Produces
1539+
1540+
* `*/*`
1541+
1542+
15041543
[[_lsusingget]]
15051544
==== List a zookeeper path
15061545
....
1507-
GET /zk/ls/{path}
1546+
GET /zk/ls/path
15081547
....
15091548

15101549

@@ -1513,7 +1552,7 @@ GET /zk/ls/{path}
15131552
[options="header", cols=".^2,.^3,.^9,.^4"]
15141553
|===
15151554
|Type|Name|Description|Schema
1516-
|**Path**|**path** +
1555+
|**Query**|**path** +
15171556
__required__|path|string
15181557
|===
15191558

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
<dependency>
9999
<groupId>org.springframework.boot</groupId>
100100
<artifactId>spring-boot-starter-log4j</artifactId>
101-
<version>RELEASE</version>
101+
<version>1.3.8.RELEASE</version>
102102
</dependency>
103103

104104
<dependency>

src/docs/swagger/swagger.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/main/java/org/gnuhpc/bigdata/config/JMXConfig.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@
55
import java.io.File;
66

77
public class JMXConfig {
8-
public static final String JMX_WAIT_TIMEOUT = "jmx.wait_timeout";
9-
public static final String JMX_FETCH_TIMEOUT = "jmx.fetch_timeout";
10-
public static final String RMI_CONNECT_TIMEOUT = "rmi.connect_timeout";
11-
public static final String RMI_HANDSHAKE_TIMEOUT = "rmi.handshake_timeout";
12-
public static final String RMI_RESPONSE_TIMEOUT = "rmi.response_timeout";
8+
public static final String JMX_CONNECT_TIMEOUT = "attribute.remote.x.request.waiting.timeout";
139
public static final String JMX_PROTOCOL = "service:jmx:rmi:///jndi/rmi://";
1410
public static final String JMX_FILTER_DIR = CommonUtils.PROJECT_ROOT_FOLDER + File.separator + "JMXFilterTemplate";
1511
}

src/main/java/org/gnuhpc/bigdata/config/WebSecurityConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,6 @@ public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception
6565
}
6666

6767
public static void main(String[] args) {
68-
System.out.println(new BCryptPasswordEncoder().encode("admin1234"));
68+
//System.out.println(new BCryptPasswordEncoder().encode("admin1234"));
6969
}
7070
}

src/main/java/org/gnuhpc/bigdata/constant/ZkServerMode.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
public enum ZkServerMode {
44
Leader,
55
Follower,
6-
Observer
6+
Observer,
7+
Standalone
78
}

src/main/java/org/gnuhpc/bigdata/controller/KafkaController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ public Map<TopicAndPartition, Integer> checkReassignPartitions(@RequestBody Stri
200200
public Map<String, Set<String>> listAllConsumerGroups(
201201
@RequestParam(required = false) ConsumerType type,
202202
@RequestParam(required = false) String topic
203-
) throws Exception {
203+
) {
204204
if(topic!=null){
205205
return kafkaAdminService.listConsumerGroupsByTopic(topic,type);
206206
} else{

0 commit comments

Comments
 (0)