[MINOR] Rename FileSystemViewHandler to RequestHandler and corrected the class comment (#2458)
This commit is contained in:
@@ -50,12 +50,12 @@ import java.util.List;
|
|||||||
import java.util.stream.Collectors;
|
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 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 FileSystemViewManager viewManager;
|
||||||
private final Javalin app;
|
private final Javalin app;
|
||||||
@@ -63,7 +63,7 @@ public class FileSystemViewHandler {
|
|||||||
private final FileSliceHandler sliceHandler;
|
private final FileSliceHandler sliceHandler;
|
||||||
private final BaseFileHandler dataFileHandler;
|
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.viewManager = viewManager;
|
||||||
this.app = app;
|
this.app = app;
|
||||||
this.instantHandler = new TimelineHandler(conf, viewManager);
|
this.instantHandler = new TimelineHandler(conf, viewManager);
|
||||||
@@ -130,9 +130,9 @@ public class TimelineService {
|
|||||||
|
|
||||||
public int startService() throws IOException {
|
public int startService() throws IOException {
|
||||||
app = Javalin.create();
|
app = Javalin.create();
|
||||||
FileSystemViewHandler router = new FileSystemViewHandler(app, conf, fsViewsManager);
|
RequestHandler requestHandler = new RequestHandler(app, conf, fsViewsManager);
|
||||||
app.get("/", ctx -> ctx.result("Hello World"));
|
app.get("/", ctx -> ctx.result("Hello World"));
|
||||||
router.register();
|
requestHandler.register();
|
||||||
int realServerPort = startServiceOnPort(serverPort);
|
int realServerPort = startServiceOnPort(serverPort);
|
||||||
LOG.info("Starting Timeline server on port :" + realServerPort);
|
LOG.info("Starting Timeline server on port :" + realServerPort);
|
||||||
this.serverPort = realServerPort;
|
this.serverPort = realServerPort;
|
||||||
|
|||||||
Reference in New Issue
Block a user