-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from calvinjia/master
UI Update: add in memory files page.
- Loading branch information
Showing
6 changed files
with
231 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package tachyon; | ||
|
||
import java.util.List; | ||
import java.util.Collections; | ||
|
||
import javax.servlet.ServletException; | ||
import javax.servlet.http.HttpServlet; | ||
import javax.servlet.http.HttpServletRequest; | ||
import javax.servlet.http.HttpServletResponse; | ||
import java.io.IOException; | ||
|
||
public class WebInterfaceMemoryServlet extends HttpServlet { | ||
private static final long serialVersionUID = 4293149962399443914L; | ||
private MasterInfo mMasterInfo; | ||
|
||
public WebInterfaceMemoryServlet(MasterInfo masterInfo) { | ||
mMasterInfo = masterInfo; | ||
} | ||
|
||
@Override | ||
public void doGet(HttpServletRequest request, HttpServletResponse response) | ||
throws ServletException, IOException { | ||
request.setAttribute("masterNodeAddress", mMasterInfo.getMasterAddress().toString()); | ||
List<String> inMemoryFiles = mMasterInfo.getInMemoryFiles(); | ||
Collections.sort(inMemoryFiles); | ||
request.setAttribute("inMemoryFiles", inMemoryFiles); | ||
getServletContext().getRequestDispatcher("/memory.jsp").forward(request, response); | ||
} | ||
|
||
@Override | ||
public void doPost(HttpServletRequest request, HttpServletResponse response) | ||
throws ServletException, IOException { | ||
return; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.