Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,20 @@
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;
private final TimelineHandler instantHandler;
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ private int startServiceOnPort(int port) throws IOException {

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;
Expand Down