aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject aurora git commit: Improve mname and structdump documentation
Date Fri, 25 Mar 2016 15:02:15 GMT
Repository: aurora
Updated Branches:
  refs/heads/master 992723181 -> b352e8b16


Improve mname and structdump documentation

Reviewed at https://reviews.apache.org/r/45182/


Project: http://git-wip-us.apache.org/repos/asf/aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/aurora/commit/b352e8b1
Tree: http://git-wip-us.apache.org/repos/asf/aurora/tree/b352e8b1
Diff: http://git-wip-us.apache.org/repos/asf/aurora/diff/b352e8b1

Branch: refs/heads/master
Commit: b352e8b1688dca63c3b2685ba232d9b16fefc3bd
Parents: 9927231
Author: Stephan Erb <serb@apache.org>
Authored: Fri Mar 25 15:39:14 2016 +0100
Committer: Stephan Erb <stephan@dev.static-void.de>
Committed: Fri Mar 25 15:39:14 2016 +0100

----------------------------------------------------------------------
 .../java/org/apache/aurora/scheduler/http/Mname.java   | 13 ++++++++-----
 .../org/apache/aurora/scheduler/http/StructDump.java   |  3 ++-
 2 files changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/aurora/blob/b352e8b1/src/main/java/org/apache/aurora/scheduler/http/Mname.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/http/Mname.java b/src/main/java/org/apache/aurora/scheduler/http/Mname.java
index d6e5fc4..807a198 100644
--- a/src/main/java/org/apache/aurora/scheduler/http/Mname.java
+++ b/src/main/java/org/apache/aurora/scheduler/http/Mname.java
@@ -50,14 +50,17 @@ import static javax.ws.rs.core.Response.Status.NOT_FOUND;
 import static org.apache.aurora.gen.ScheduleStatus.RUNNING;
 
 /**
- * Simple redirector from the canonical name of a task to its configured HTTP port.
- *
- * <p>Forwards for GET, PUT, POST and DELETE requests using HTTP 307 allowing compliant
clients to
- * seamlessly perform re-directed mutations.
+ * Servlet implementing HTTP redirects to task endpoints.
  */
 @Path("/mname")
 public class Mname {
 
+  private static final String USAGE =
+      "<html>HTTP redirector from the canonical name of a task to its current HTTP
endpoint. "
+      + "<p>Forwards GET, PUT, POST and DELETE requests using HTTP status code 307.
"
+      + "This allows compliant clients to seamlessly perform re-directed mutations.</p>"
+      + "Usage: /mname/{role}/{env}/{job}/{instance}</html>";
+
   private static final Set<String> HTTP_PORT_NAMES = ImmutableSet.of(
       "health", "http", "HTTP", "web", "admin");
 
@@ -72,7 +75,7 @@ public class Mname {
   public Response getUsage() {
     return Response
         .status(Status.BAD_REQUEST)
-        .entity("<html>Usage: /mname/{role}/{env}/{job}/{instance}</html>")
+        .entity(USAGE)
         .build();
   }
 

http://git-wip-us.apache.org/repos/asf/aurora/blob/b352e8b1/src/main/java/org/apache/aurora/scheduler/http/StructDump.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/http/StructDump.java b/src/main/java/org/apache/aurora/scheduler/http/StructDump.java
index f84767a..3ed256b 100644
--- a/src/main/java/org/apache/aurora/scheduler/http/StructDump.java
+++ b/src/main/java/org/apache/aurora/scheduler/http/StructDump.java
@@ -50,7 +50,8 @@ public class StructDump extends JerseyTemplateServlet {
   }
 
   private static final String USAGE =
-      "<html>Usage: /structdump/task/{task_id} or /structdump/cron/{role}/{env}/{job}</html>";
+      "<html>Print the internal thrift structure of task or cronjob. "
+      + "<p>Usage: /structdump/task/{task_id} or /structdump/cron/{role}/{env}/{job}</p></html>";
 
   @GET
   @Produces(MediaType.TEXT_HTML)


Mime
View raw message