1
0

[MINOR] Rename FileSystemViewHandler to RequestHandler and corrected the class comment (#2458)

This commit is contained in:
vinoyang
2021-02-03 01:15:53 +08:00
committed by GitHub
parent ec950b4cfe
commit 50ff9ab2d2
2 changed files with 6 additions and 6 deletions

View File

@@ -50,12 +50,12 @@ import java.util.List;
import java.util.stream.Collectors;
/**
* Main REST Handler class that handles local view staleness and delegates calls to slice/data-file/timeline handlers.
* Main REST Handler class that handles and delegates calls to timeline relevant handlers.
*/
public class FileSystemViewHandler {
public class RequestHandler {
private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
private static final Logger LOG = LogManager.getLogger(FileSystemViewHandler.class);
private static final Logger LOG = LogManager.getLogger(RequestHandler.class);
private final FileSystemViewManager viewManager;
private final Javalin app;
@@ -63,7 +63,7 @@ public class FileSystemViewHandler {
private final FileSliceHandler sliceHandler;
private final BaseFileHandler dataFileHandler;
public FileSystemViewHandler(Javalin app, Configuration conf, FileSystemViewManager viewManager) throws IOException {
public RequestHandler(Javalin app, Configuration conf, FileSystemViewManager viewManager) throws IOException {
this.viewManager = viewManager;
this.app = app;
this.instantHandler = new TimelineHandler(conf, viewManager);

View File

@@ -130,9 +130,9 @@ public class TimelineService {
public int startService() throws IOException {
app = Javalin.create();
FileSystemViewHandler router = new FileSystemViewHandler(app, conf, fsViewsManager);
RequestHandler requestHandler = new RequestHandler(app, conf, fsViewsManager);
app.get("/", ctx -> ctx.result("Hello World"));
router.register();
requestHandler.register();
int realServerPort = startServiceOnPort(serverPort);
LOG.info("Starting Timeline server on port :" + realServerPort);
this.serverPort = realServerPort;