[jira] [Commented] (ACCUMULO-3005) Convert the monitor into a real REST server
[ https://issues.apache.org/jira/browse/ACCUMULO-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16078223#comment-16078223 ] Luis Tavarez commented on ACCUMULO-3005: Thanks Josh! I'm glad too! > Convert the monitor into a real REST server > --- > > Key: ACCUMULO-3005 > URL: https://issues.apache.org/jira/browse/ACCUMULO-3005 > Project: Accumulo > Issue Type: Sub-task > Components: monitor >Reporter: Josh Elser >Assignee: Luis Tavarez > Fix For: 2.0.0 > > Attachments: > 0001-ACCUMULO-3005-Initial-round-of-changes-for-a-proper-.patch > > Time Spent: 7h 20m > Remaining Estimate: 0h > > The monitor works well for what it does, but it's very much so cobbled > together. HTML is hand generated. Static state is used liberally which makes > testing near impossible. View and controller logic are tightly intertwined > which also adds to the testability problem. > I've been working on porting the functionality from the existing monitor to a > proper rest service using > [dropwizard|https://dropwizard.github.io/dropwizard/]. It's not completely > functional yet, but it has a number of improvements of the existing monitor > code. > I thought I would post what I have already and let people give some feedback > if they're interested. Help is always welcome. > https://github.com/joshelser/accumulo/tree/dropwizard. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (ACCUMULO-3005) Convert the monitor into a real REST server
[ https://issues.apache.org/jira/browse/ACCUMULO-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16078180#comment-16078180 ] Josh Elser commented on ACCUMULO-3005: -- Yay, great work, Luis. Glad this finally got committed. > Convert the monitor into a real REST server > --- > > Key: ACCUMULO-3005 > URL: https://issues.apache.org/jira/browse/ACCUMULO-3005 > Project: Accumulo > Issue Type: Sub-task > Components: monitor >Reporter: Josh Elser >Assignee: Luis Tavarez > Fix For: 2.0.0 > > Attachments: > 0001-ACCUMULO-3005-Initial-round-of-changes-for-a-proper-.patch > > Time Spent: 7h 20m > Remaining Estimate: 0h > > The monitor works well for what it does, but it's very much so cobbled > together. HTML is hand generated. Static state is used liberally which makes > testing near impossible. View and controller logic are tightly intertwined > which also adds to the testability problem. > I've been working on porting the functionality from the existing monitor to a > proper rest service using > [dropwizard|https://dropwizard.github.io/dropwizard/]. It's not completely > functional yet, but it has a number of improvements of the existing monitor > code. > I thought I would post what I have already and let people give some feedback > if they're interested. Help is always welcome. > https://github.com/joshelser/accumulo/tree/dropwizard. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (ACCUMULO-3005) Convert the monitor into a real REST server
[ https://issues.apache.org/jira/browse/ACCUMULO-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15645479#comment-15645479 ] Luis Tavarez commented on ACCUMULO-3005: Thanks! > Convert the monitor into a real REST server > --- > > Key: ACCUMULO-3005 > URL: https://issues.apache.org/jira/browse/ACCUMULO-3005 > Project: Accumulo > Issue Type: Sub-task > Components: monitor >Reporter: Josh Elser >Assignee: Luis Tavarez > Fix For: 2.0.0 > > Attachments: > 0001-ACCUMULO-3005-Initial-round-of-changes-for-a-proper-.patch > > > The monitor works well for what it does, but it's very much so cobbled > together. HTML is hand generated. Static state is used liberally which makes > testing near impossible. View and controller logic are tightly intertwined > which also adds to the testability problem. > I've been working on porting the functionality from the existing monitor to a > proper rest service using > [dropwizard|https://dropwizard.github.io/dropwizard/]. It's not completely > functional yet, but it has a number of improvements of the existing monitor > code. > I thought I would post what I have already and let people give some feedback > if they're interested. Help is always welcome. > https://github.com/joshelser/accumulo/tree/dropwizard. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ACCUMULO-3005) Convert the monitor into a real REST server
[ https://issues.apache.org/jira/browse/ACCUMULO-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15645471#comment-15645471 ] Josh Elser commented on ACCUMULO-3005: -- +1 will be great to get this finished. Reach out as necessary of course! > Convert the monitor into a real REST server > --- > > Key: ACCUMULO-3005 > URL: https://issues.apache.org/jira/browse/ACCUMULO-3005 > Project: Accumulo > Issue Type: Sub-task > Components: monitor >Reporter: Josh Elser >Assignee: Luis Tavarez > Fix For: 2.0.0 > > Attachments: > 0001-ACCUMULO-3005-Initial-round-of-changes-for-a-proper-.patch > > > The monitor works well for what it does, but it's very much so cobbled > together. HTML is hand generated. Static state is used liberally which makes > testing near impossible. View and controller logic are tightly intertwined > which also adds to the testability problem. > I've been working on porting the functionality from the existing monitor to a > proper rest service using > [dropwizard|https://dropwizard.github.io/dropwizard/]. It's not completely > functional yet, but it has a number of improvements of the existing monitor > code. > I thought I would post what I have already and let people give some feedback > if they're interested. Help is always welcome. > https://github.com/joshelser/accumulo/tree/dropwizard. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ACCUMULO-3005) Convert the monitor into a real REST server
[ https://issues.apache.org/jira/browse/ACCUMULO-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15645428#comment-15645428 ] Luis Tavarez commented on ACCUMULO-3005: I'm working with improving the feel of the monitor, and I'll need to have a working REST api. I talked with Josh and he said he is OK with me continuing his work on the REST api. > Convert the monitor into a real REST server > --- > > Key: ACCUMULO-3005 > URL: https://issues.apache.org/jira/browse/ACCUMULO-3005 > Project: Accumulo > Issue Type: Sub-task > Components: monitor >Reporter: Josh Elser >Assignee: Josh Elser > Fix For: 2.0.0 > > Attachments: > 0001-ACCUMULO-3005-Initial-round-of-changes-for-a-proper-.patch > > > The monitor works well for what it does, but it's very much so cobbled > together. HTML is hand generated. Static state is used liberally which makes > testing near impossible. View and controller logic are tightly intertwined > which also adds to the testability problem. > I've been working on porting the functionality from the existing monitor to a > proper rest service using > [dropwizard|https://dropwizard.github.io/dropwizard/]. It's not completely > functional yet, but it has a number of improvements of the existing monitor > code. > I thought I would post what I have already and let people give some feedback > if they're interested. Help is always welcome. > https://github.com/joshelser/accumulo/tree/dropwizard. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ACCUMULO-3005) Convert the monitor into a real REST server
[ https://issues.apache.org/jira/browse/ACCUMULO-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14680357#comment-14680357 ] Josh Elser commented on ACCUMULO-3005: -- Providing an update as I'm slowly working on this again. I spent some evenings last week trying to get JSPs to work with Jersey which ultimately failed (or at least I gave up). I figured we have no strict requirement on using JSP, lo and behold, using [mustache|https://github.com/spullara/mustache.java] (which out of the box supported templating engine by Jersey) worked right out of the box. I hope to keep up the momentum in my downtime this week and hopefully finally get some complete code to look at (rather than a hack-job on my github). Convert the monitor into a real REST server --- Key: ACCUMULO-3005 URL: https://issues.apache.org/jira/browse/ACCUMULO-3005 Project: Accumulo Issue Type: Sub-task Components: monitor Reporter: Josh Elser Assignee: Josh Elser Fix For: 1.8.0 Attachments: 0001-ACCUMULO-3005-Initial-round-of-changes-for-a-proper-.patch The monitor works well for what it does, but it's very much so cobbled together. HTML is hand generated. Static state is used liberally which makes testing near impossible. View and controller logic are tightly intertwined which also adds to the testability problem. I've been working on porting the functionality from the existing monitor to a proper rest service using [dropwizard|https://dropwizard.github.io/dropwizard/]. It's not completely functional yet, but it has a number of improvements of the existing monitor code. I thought I would post what I have already and let people give some feedback if they're interested. Help is always welcome. https://github.com/joshelser/accumulo/tree/dropwizard. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ACCUMULO-3005) Convert the monitor into a real REST server
[ https://issues.apache.org/jira/browse/ACCUMULO-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14232145#comment-14232145 ] Christopher Tubbs commented on ACCUMULO-3005: - I think we mainly used Jetty over Grizzly, because it came with Hadoop. Now that we provide our own dependency for that, I'm not sure it matters. I wouldn't want to switch on the basis of personal preference, though... are there specific advantages you've encountered that make the switch compelling? Convert the monitor into a real REST server --- Key: ACCUMULO-3005 URL: https://issues.apache.org/jira/browse/ACCUMULO-3005 Project: Accumulo Issue Type: Sub-task Components: monitor Reporter: Josh Elser Assignee: Josh Elser Fix For: 1.7.0 Attachments: 0001-ACCUMULO-3005-Initial-round-of-changes-for-a-proper-.patch The monitor works well for what it does, but it's very much so cobbled together. HTML is hand generated. Static state is used liberally which makes testing near impossible. View and controller logic are tightly intertwined which also adds to the testability problem. I've been working on porting the functionality from the existing monitor to a proper rest service using [dropwizard|https://dropwizard.github.io/dropwizard/]. It's not completely functional yet, but it has a number of improvements of the existing monitor code. I thought I would post what I have already and let people give some feedback if they're interested. Help is always welcome. https://github.com/joshelser/accumulo/tree/dropwizard. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ACCUMULO-3005) Convert the monitor into a real REST server
[ https://issues.apache.org/jira/browse/ACCUMULO-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14232159#comment-14232159 ] Josh Elser commented on ACCUMULO-3005: -- bq. are there specific advantages you've encountered that make the switch compelling? In using JaxRS resources over Servlets, there is definitely much more literature on configuring Grizzly with said resources, which is primarily how my decision was made so far. I haven't actually been able to find a technical difference (or even a comparison) between the two as to why you'd choose Jetty over Grizzly or vice versa (oddly..). I also haven't found any docs on how to configure Jetty to do the jaxrs stuff (as opposed to servlets) either. I did find that Grizzly publishes a WADL automagically which was pretty cool for me to at least validate that my resources were being loaded. I could see some benefit from that for consumers as well, but that's by no means a strong differentiation. Convert the monitor into a real REST server --- Key: ACCUMULO-3005 URL: https://issues.apache.org/jira/browse/ACCUMULO-3005 Project: Accumulo Issue Type: Sub-task Components: monitor Reporter: Josh Elser Assignee: Josh Elser Fix For: 1.7.0 Attachments: 0001-ACCUMULO-3005-Initial-round-of-changes-for-a-proper-.patch The monitor works well for what it does, but it's very much so cobbled together. HTML is hand generated. Static state is used liberally which makes testing near impossible. View and controller logic are tightly intertwined which also adds to the testability problem. I've been working on porting the functionality from the existing monitor to a proper rest service using [dropwizard|https://dropwizard.github.io/dropwizard/]. It's not completely functional yet, but it has a number of improvements of the existing monitor code. I thought I would post what I have already and let people give some feedback if they're interested. Help is always welcome. https://github.com/joshelser/accumulo/tree/dropwizard. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ACCUMULO-3005) Convert the monitor into a real REST server
[ https://issues.apache.org/jira/browse/ACCUMULO-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14232187#comment-14232187 ] Christopher Tubbs commented on ACCUMULO-3005: - In my experience, I didn't have to do much special for Jetty. I just put {{@ApplicationPath(some/path/off/root)}} on my application which extended PackagesResourceConfig, and whose no-arg constructor called the parent constructor with a base package name for automatically searching for resources. And that was optional... and just to avoid providing the xml file. Granted, the last time I did this, I was not using an embedded Jetty, so I don't know if that requires anything extra. Convert the monitor into a real REST server --- Key: ACCUMULO-3005 URL: https://issues.apache.org/jira/browse/ACCUMULO-3005 Project: Accumulo Issue Type: Sub-task Components: monitor Reporter: Josh Elser Assignee: Josh Elser Fix For: 1.7.0 Attachments: 0001-ACCUMULO-3005-Initial-round-of-changes-for-a-proper-.patch The monitor works well for what it does, but it's very much so cobbled together. HTML is hand generated. Static state is used liberally which makes testing near impossible. View and controller logic are tightly intertwined which also adds to the testability problem. I've been working on porting the functionality from the existing monitor to a proper rest service using [dropwizard|https://dropwizard.github.io/dropwizard/]. It's not completely functional yet, but it has a number of improvements of the existing monitor code. I thought I would post what I have already and let people give some feedback if they're interested. Help is always welcome. https://github.com/joshelser/accumulo/tree/dropwizard. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ACCUMULO-3005) Convert the monitor into a real REST server
[ https://issues.apache.org/jira/browse/ACCUMULO-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14232190#comment-14232190 ] Josh Elser commented on ACCUMULO-3005: -- Cool, thanks for the information. I didn't make an explicit Application (just made a ResourceConfig() and did things that way), but I was thinking that might be better for portability across containers? Now that I have *something* that works, I need to go back and figure out what is best for portability and functionality (not to mention making sure the same can also be deployed in a standalone container). Convert the monitor into a real REST server --- Key: ACCUMULO-3005 URL: https://issues.apache.org/jira/browse/ACCUMULO-3005 Project: Accumulo Issue Type: Sub-task Components: monitor Reporter: Josh Elser Assignee: Josh Elser Fix For: 1.7.0 Attachments: 0001-ACCUMULO-3005-Initial-round-of-changes-for-a-proper-.patch The monitor works well for what it does, but it's very much so cobbled together. HTML is hand generated. Static state is used liberally which makes testing near impossible. View and controller logic are tightly intertwined which also adds to the testability problem. I've been working on porting the functionality from the existing monitor to a proper rest service using [dropwizard|https://dropwizard.github.io/dropwizard/]. It's not completely functional yet, but it has a number of improvements of the existing monitor code. I thought I would post what I have already and let people give some feedback if they're interested. Help is always welcome. https://github.com/joshelser/accumulo/tree/dropwizard. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ACCUMULO-3005) Convert the monitor into a real REST server
[ https://issues.apache.org/jira/browse/ACCUMULO-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14232278#comment-14232278 ] Christopher Tubbs commented on ACCUMULO-3005: - One of the biggest problems with portability is that the Login mechanisms tend to be container-specific. This is going to cause an issue if we want to do, say, client-auth with TLS certificates and protect the shell-in-the-monitor resource with confidential transport guarantees, as we do today. We can still probably write this more sensibly with JAX-RS annotations, but the wiring is a bit more complicated if we support portability between containers. That said, I'm a big fan of separating the library portion of the web service (the POJOs, servlets, resources, whatever) from the container, so it can be made portable. I just don't know that we need multiple modules for the monitor right now to support that separation. Convert the monitor into a real REST server --- Key: ACCUMULO-3005 URL: https://issues.apache.org/jira/browse/ACCUMULO-3005 Project: Accumulo Issue Type: Sub-task Components: monitor Reporter: Josh Elser Assignee: Josh Elser Fix For: 1.7.0 Attachments: 0001-ACCUMULO-3005-Initial-round-of-changes-for-a-proper-.patch The monitor works well for what it does, but it's very much so cobbled together. HTML is hand generated. Static state is used liberally which makes testing near impossible. View and controller logic are tightly intertwined which also adds to the testability problem. I've been working on porting the functionality from the existing monitor to a proper rest service using [dropwizard|https://dropwizard.github.io/dropwizard/]. It's not completely functional yet, but it has a number of improvements of the existing monitor code. I thought I would post what I have already and let people give some feedback if they're interested. Help is always welcome. https://github.com/joshelser/accumulo/tree/dropwizard. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ACCUMULO-3005) Convert the monitor into a real REST server
[ https://issues.apache.org/jira/browse/ACCUMULO-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14232416#comment-14232416 ] Josh Elser commented on ACCUMULO-3005: -- Thanks for the information -- I'm still fumbling blindly through a forest of possibilities. bq. I just don't know that we need multiple modules for the monitor right now to support that separation. What kind of module? Maven module? Assuming that's what you mean -- I think we would want two: one that produces a jar (and is designed to run an embedded server using the normal Accumulo classpath) and then one that makes a war (designed to be more self-contained, sans maybe Hadoop deps?). IIRC, Maven doesn't really like creating more than one artifact per module, so I'm not sure how to get around that one. Not to mention, I don't know what would be standard to include in the war to, say, deploy it easily to a Tomcat or JBoss instance. :) Convert the monitor into a real REST server --- Key: ACCUMULO-3005 URL: https://issues.apache.org/jira/browse/ACCUMULO-3005 Project: Accumulo Issue Type: Sub-task Components: monitor Reporter: Josh Elser Assignee: Josh Elser Fix For: 1.7.0 Attachments: 0001-ACCUMULO-3005-Initial-round-of-changes-for-a-proper-.patch The monitor works well for what it does, but it's very much so cobbled together. HTML is hand generated. Static state is used liberally which makes testing near impossible. View and controller logic are tightly intertwined which also adds to the testability problem. I've been working on porting the functionality from the existing monitor to a proper rest service using [dropwizard|https://dropwizard.github.io/dropwizard/]. It's not completely functional yet, but it has a number of improvements of the existing monitor code. I thought I would post what I have already and let people give some feedback if they're interested. Help is always welcome. https://github.com/joshelser/accumulo/tree/dropwizard. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ACCUMULO-3005) Convert the monitor into a real REST server
[ https://issues.apache.org/jira/browse/ACCUMULO-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14232429#comment-14232429 ] Christopher Tubbs commented on ACCUMULO-3005: - Yes, I meant multiple maven modules. I think ideally, there'd be a maven module with the POJOs and resources and stuff (the library; technically, this could be server-base), and then a separate module for each supported service (embedded jetty launcher, war packaging, tomcat-specific support). When I say I just don't know that we need... right now..., I'm mainly expressing my dislike of the monitor being part of the core project (as well as the fact that we haven't really discussed multiple modules in terms of the future of the monitor). I *think* that I'd much rather prefer all the monitor be a client-only service which simply talks to Accumulo's metrics API and displays it conveniently. That way, we can separate out the service as a truly separate thing (modules and all), but which could also just as easily be swapped out for another monitoring service, if desired. Until things get to that point, I think I'd rather just stick with a single, convenient module which launches the service in one way (embedded Jetty). *Maybe* it could also build a generic WAR package for deployment in a separate container, but I wouldn't want to see a lot of heavyweight refactoring support for the monitor as it exists in the core project. I'd rather see work to make it replaceable and moved to its own contrib repo, with support for additional containers supported in separate modules there. However, I place emphasis on the don't know part of my comment, because I think additional thought needs to be put into this (including reviewing on my part of patches/contributions). Convert the monitor into a real REST server --- Key: ACCUMULO-3005 URL: https://issues.apache.org/jira/browse/ACCUMULO-3005 Project: Accumulo Issue Type: Sub-task Components: monitor Reporter: Josh Elser Assignee: Josh Elser Fix For: 1.7.0 Attachments: 0001-ACCUMULO-3005-Initial-round-of-changes-for-a-proper-.patch The monitor works well for what it does, but it's very much so cobbled together. HTML is hand generated. Static state is used liberally which makes testing near impossible. View and controller logic are tightly intertwined which also adds to the testability problem. I've been working on porting the functionality from the existing monitor to a proper rest service using [dropwizard|https://dropwizard.github.io/dropwizard/]. It's not completely functional yet, but it has a number of improvements of the existing monitor code. I thought I would post what I have already and let people give some feedback if they're interested. Help is always welcome. https://github.com/joshelser/accumulo/tree/dropwizard. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ACCUMULO-3005) Convert the monitor into a real REST server
[ https://issues.apache.org/jira/browse/ACCUMULO-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14232444#comment-14232444 ] Josh Elser commented on ACCUMULO-3005: -- Understood. Right now, I'm aiming to keep a single module for the API and then let that be runnable via *some* embedded server (jetty or grizzly). I'd like to get a separate module for a generic WAR, but I'm guessing my motivation to test it for generalness will run out after the 2nd container/app-server. It would be nice to at least support (non-embedded) Jetty and Tomcat for a first pass, I think. I agree with you -- let's take a step back once things are solidified and we can decide the path we want to take after. Feel free to look at the diff on my github if you're curious. After I get it converted over to an Application, I'll try to put up a proper patch. Convert the monitor into a real REST server --- Key: ACCUMULO-3005 URL: https://issues.apache.org/jira/browse/ACCUMULO-3005 Project: Accumulo Issue Type: Sub-task Components: monitor Reporter: Josh Elser Assignee: Josh Elser Fix For: 1.7.0 Attachments: 0001-ACCUMULO-3005-Initial-round-of-changes-for-a-proper-.patch The monitor works well for what it does, but it's very much so cobbled together. HTML is hand generated. Static state is used liberally which makes testing near impossible. View and controller logic are tightly intertwined which also adds to the testability problem. I've been working on porting the functionality from the existing monitor to a proper rest service using [dropwizard|https://dropwizard.github.io/dropwizard/]. It's not completely functional yet, but it has a number of improvements of the existing monitor code. I thought I would post what I have already and let people give some feedback if they're interested. Help is always welcome. https://github.com/joshelser/accumulo/tree/dropwizard. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ACCUMULO-3005) Convert the monitor into a real REST server
[ https://issues.apache.org/jira/browse/ACCUMULO-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14232452#comment-14232452 ] Dave Marion commented on ACCUMULO-3005: --- bq. I need to start looking how to replace the HTML renderings which is the big unknown presently. Looking at some of your resources (for example, MasterResource), the class produces only JSON and returns simple Java objects (String, Map, List). You could instead return JAX-B annotated objects, then register serialization providers to support things other than JSON, to include HTML. Looks like an example in the Jersey docs is located at: https://jersey.java.net/documentation/latest/message-body-workers.html#d0e5405. I'm more familiar with JBoss RestEasy, but Jersey is the reference implementation I believe, so it should be able to do the same things at the spec level. Convert the monitor into a real REST server --- Key: ACCUMULO-3005 URL: https://issues.apache.org/jira/browse/ACCUMULO-3005 Project: Accumulo Issue Type: Sub-task Components: monitor Reporter: Josh Elser Assignee: Josh Elser Fix For: 1.7.0 Attachments: 0001-ACCUMULO-3005-Initial-round-of-changes-for-a-proper-.patch The monitor works well for what it does, but it's very much so cobbled together. HTML is hand generated. Static state is used liberally which makes testing near impossible. View and controller logic are tightly intertwined which also adds to the testability problem. I've been working on porting the functionality from the existing monitor to a proper rest service using [dropwizard|https://dropwizard.github.io/dropwizard/]. It's not completely functional yet, but it has a number of improvements of the existing monitor code. I thought I would post what I have already and let people give some feedback if they're interested. Help is always welcome. https://github.com/joshelser/accumulo/tree/dropwizard. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ACCUMULO-3005) Convert the monitor into a real REST server
[ https://issues.apache.org/jira/browse/ACCUMULO-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14232460#comment-14232460 ] Josh Elser commented on ACCUMULO-3005: -- Thanks, [~dlmarion]. I was just trying to get something basic that worked with Jackson as a first pass. I need to figure out how all of these things work too -- I thought Jackson would provide both XML and JSON support, but I'm not quite sure if I just need to wire things up differently, or what. Convert the monitor into a real REST server --- Key: ACCUMULO-3005 URL: https://issues.apache.org/jira/browse/ACCUMULO-3005 Project: Accumulo Issue Type: Sub-task Components: monitor Reporter: Josh Elser Assignee: Josh Elser Fix For: 1.7.0 Attachments: 0001-ACCUMULO-3005-Initial-round-of-changes-for-a-proper-.patch The monitor works well for what it does, but it's very much so cobbled together. HTML is hand generated. Static state is used liberally which makes testing near impossible. View and controller logic are tightly intertwined which also adds to the testability problem. I've been working on porting the functionality from the existing monitor to a proper rest service using [dropwizard|https://dropwizard.github.io/dropwizard/]. It's not completely functional yet, but it has a number of improvements of the existing monitor code. I thought I would post what I have already and let people give some feedback if they're interested. Help is always welcome. https://github.com/joshelser/accumulo/tree/dropwizard. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ACCUMULO-3005) Convert the monitor into a real REST server
[ https://issues.apache.org/jira/browse/ACCUMULO-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14232465#comment-14232465 ] Dave Marion commented on ACCUMULO-3005: --- I've only used Jackson for JSON support. Not sure if is supports XML. On my project, we return JAX-B objects from all of our JAX-RS endpoints. We have providers for XML, JSON, HTML, and even Protobuf (via protostuff) mapped to different MediaTypes. The HTTP request will/should have an Accept header and the JAX-RS engine will match the provider with the MediaType, and use that Provider to serialize the object. We also put our JAX-B objects in a separate Client jar for those users that only want to use XML, JSON, etc as the transport serialization and then deserialize back to POJOs. Convert the monitor into a real REST server --- Key: ACCUMULO-3005 URL: https://issues.apache.org/jira/browse/ACCUMULO-3005 Project: Accumulo Issue Type: Sub-task Components: monitor Reporter: Josh Elser Assignee: Josh Elser Fix For: 1.7.0 Attachments: 0001-ACCUMULO-3005-Initial-round-of-changes-for-a-proper-.patch The monitor works well for what it does, but it's very much so cobbled together. HTML is hand generated. Static state is used liberally which makes testing near impossible. View and controller logic are tightly intertwined which also adds to the testability problem. I've been working on porting the functionality from the existing monitor to a proper rest service using [dropwizard|https://dropwizard.github.io/dropwizard/]. It's not completely functional yet, but it has a number of improvements of the existing monitor code. I thought I would post what I have already and let people give some feedback if they're interested. Help is always welcome. https://github.com/joshelser/accumulo/tree/dropwizard. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ACCUMULO-3005) Convert the monitor into a real REST server
[ https://issues.apache.org/jira/browse/ACCUMULO-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14232467#comment-14232467 ] Josh Elser commented on ACCUMULO-3005: -- From Jackson's Github README: {quote} Jackson is a suite of data-processing tools for Java (and JVM platform), including the flagship JSON parsing and generation library, as well as additional modules to process data encoded in Avro, CBOR, CSV, Smile, XML or YAML (and list of supported format is still growing -- see additional experimental/external projects listed below!) {quote} I'll just have to dig and see how it works :) (or move to jax-b or something else) Convert the monitor into a real REST server --- Key: ACCUMULO-3005 URL: https://issues.apache.org/jira/browse/ACCUMULO-3005 Project: Accumulo Issue Type: Sub-task Components: monitor Reporter: Josh Elser Assignee: Josh Elser Fix For: 1.7.0 Attachments: 0001-ACCUMULO-3005-Initial-round-of-changes-for-a-proper-.patch The monitor works well for what it does, but it's very much so cobbled together. HTML is hand generated. Static state is used liberally which makes testing near impossible. View and controller logic are tightly intertwined which also adds to the testability problem. I've been working on porting the functionality from the existing monitor to a proper rest service using [dropwizard|https://dropwizard.github.io/dropwizard/]. It's not completely functional yet, but it has a number of improvements of the existing monitor code. I thought I would post what I have already and let people give some feedback if they're interested. Help is always welcome. https://github.com/joshelser/accumulo/tree/dropwizard. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ACCUMULO-3005) Convert the monitor into a real REST server
[ https://issues.apache.org/jira/browse/ACCUMULO-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14232551#comment-14232551 ] Christopher Tubbs commented on ACCUMULO-3005: - You're not using Jackson directly, are you? I'd imagine you're just using it as the registered provider for {{@Produces(application/json)}}? Convert the monitor into a real REST server --- Key: ACCUMULO-3005 URL: https://issues.apache.org/jira/browse/ACCUMULO-3005 Project: Accumulo Issue Type: Sub-task Components: monitor Reporter: Josh Elser Assignee: Josh Elser Fix For: 1.7.0 Attachments: 0001-ACCUMULO-3005-Initial-round-of-changes-for-a-proper-.patch The monitor works well for what it does, but it's very much so cobbled together. HTML is hand generated. Static state is used liberally which makes testing near impossible. View and controller logic are tightly intertwined which also adds to the testability problem. I've been working on porting the functionality from the existing monitor to a proper rest service using [dropwizard|https://dropwizard.github.io/dropwizard/]. It's not completely functional yet, but it has a number of improvements of the existing monitor code. I thought I would post what I have already and let people give some feedback if they're interested. Help is always welcome. https://github.com/joshelser/accumulo/tree/dropwizard. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ACCUMULO-3005) Convert the monitor into a real REST server
[ https://issues.apache.org/jira/browse/ACCUMULO-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14232554#comment-14232554 ] Josh Elser commented on ACCUMULO-3005: -- Something like that, and then the Jackson MessageWriter (or something) is picked up off the classpath after I do some registration. Convert the monitor into a real REST server --- Key: ACCUMULO-3005 URL: https://issues.apache.org/jira/browse/ACCUMULO-3005 Project: Accumulo Issue Type: Sub-task Components: monitor Reporter: Josh Elser Assignee: Josh Elser Fix For: 1.7.0 Attachments: 0001-ACCUMULO-3005-Initial-round-of-changes-for-a-proper-.patch The monitor works well for what it does, but it's very much so cobbled together. HTML is hand generated. Static state is used liberally which makes testing near impossible. View and controller logic are tightly intertwined which also adds to the testability problem. I've been working on porting the functionality from the existing monitor to a proper rest service using [dropwizard|https://dropwizard.github.io/dropwizard/]. It's not completely functional yet, but it has a number of improvements of the existing monitor code. I thought I would post what I have already and let people give some feedback if they're interested. Help is always welcome. https://github.com/joshelser/accumulo/tree/dropwizard. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ACCUMULO-3005) Convert the monitor into a real REST server
[ https://issues.apache.org/jira/browse/ACCUMULO-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14229453#comment-14229453 ] Josh Elser commented on ACCUMULO-3005: -- Been hacking on this some more. I was able to lift the resources and annotated classes from previously into a version that works with Jersey, Jackson and Grizzly https://github.com/joshelser/accumulo/tree/jersey-monitor Need to address some minor semantic issues in the resources, but that won't be too bad. I need to start looking how to replace the HTML renderings which is the big unknown presently. Looking at https://jersey.java.net/documentation/latest/mvc.html, but I need to figure out what sounds the best. Would using the standard JSP be easiest? Switching over from embedded Jetty to Grizzly has been nice, but I'm not sure of the technical reasons for choosing one over the other. I mainly used Grizzly because it worked and I had some examples I could leverage from Jersey. Any info would be appreciated. Convert the monitor into a real REST server --- Key: ACCUMULO-3005 URL: https://issues.apache.org/jira/browse/ACCUMULO-3005 Project: Accumulo Issue Type: Sub-task Components: monitor Reporter: Josh Elser Assignee: Josh Elser Fix For: 1.7.0 Attachments: 0001-ACCUMULO-3005-Initial-round-of-changes-for-a-proper-.patch The monitor works well for what it does, but it's very much so cobbled together. HTML is hand generated. Static state is used liberally which makes testing near impossible. View and controller logic are tightly intertwined which also adds to the testability problem. I've been working on porting the functionality from the existing monitor to a proper rest service using [dropwizard|https://dropwizard.github.io/dropwizard/]. It's not completely functional yet, but it has a number of improvements of the existing monitor code. I thought I would post what I have already and let people give some feedback if they're interested. Help is always welcome. https://github.com/joshelser/accumulo/tree/dropwizard. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ACCUMULO-3005) Convert the monitor into a real REST server
[ https://issues.apache.org/jira/browse/ACCUMULO-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14100304#comment-14100304 ] Josh Elser commented on ACCUMULO-3005: -- I was playing around with this some more tonight. Made a client POJOs artifact and split up the server into its own shaded jar (server-side only, doesn't rebundle hadoop/zk/accumulo classes). This also removed a bunch of cruft in special handling in the shell scripts which was nice. The sad part is that it appears that {{ch.qos.logback:logback-classic}} shaded in an SLF4J impl which prints a lovely warning every time you initialize the logging infrastructure because of the binding we expect it to use provided by slf4j-log4j12 we already have on the classpath. As sad as this is, I don't think there's a way to work around it. It's looking like I'll have to bite the bullet and just roll jetty/jersey/jackson on my own and just lift the nice bits from dropwizard that I like. Ugh. Convert the monitor into a real REST server --- Key: ACCUMULO-3005 URL: https://issues.apache.org/jira/browse/ACCUMULO-3005 Project: Accumulo Issue Type: Sub-task Components: monitor Reporter: Josh Elser Assignee: Josh Elser Fix For: 1.7.0 Attachments: 0001-ACCUMULO-3005-Initial-round-of-changes-for-a-proper-.patch The monitor works well for what it does, but it's very much so cobbled together. HTML is hand generated. Static state is used liberally which makes testing near impossible. View and controller logic are tightly intertwined which also adds to the testability problem. I've been working on porting the functionality from the existing monitor to a proper rest service using [dropwizard|https://dropwizard.github.io/dropwizard/]. It's not completely functional yet, but it has a number of improvements of the existing monitor code. I thought I would post what I have already and let people give some feedback if they're interested. Help is always welcome. https://github.com/joshelser/accumulo/tree/dropwizard. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (ACCUMULO-3005) Convert the monitor into a real REST server
[ https://issues.apache.org/jira/browse/ACCUMULO-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14076376#comment-14076376 ] Mike Drob commented on ACCUMULO-3005: - Any chance this makes it onto RB? Convert the monitor into a real REST server --- Key: ACCUMULO-3005 URL: https://issues.apache.org/jira/browse/ACCUMULO-3005 Project: Accumulo Issue Type: Improvement Components: monitor Reporter: Josh Elser Assignee: Josh Elser Fix For: 1.7.0 Attachments: 0001-ACCUMULO-3005-Initial-round-of-changes-for-a-proper-.patch The monitor works well for what it does, but it's very much so cobbled together. HTML is hand generated. Static state is used liberally which makes testing near impossible. View and controller logic are tightly intertwined which also adds to the testability problem. I've been working on porting the functionality from the existing monitor to a proper rest service using [dropwizard|https://dropwizard.github.io/dropwizard/]. It's not completely functional yet, but it has a number of improvements of the existing monitor code. I thought I would post what I have already and let people give some feedback if they're interested. Help is always welcome. https://github.com/joshelser/accumulo/tree/dropwizard. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (ACCUMULO-3005) Convert the monitor into a real REST server
[ https://issues.apache.org/jira/browse/ACCUMULO-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14076378#comment-14076378 ] Josh Elser commented on ACCUMULO-3005: -- bq. Any chance this makes it onto RB? Since you asked, sure. Convert the monitor into a real REST server --- Key: ACCUMULO-3005 URL: https://issues.apache.org/jira/browse/ACCUMULO-3005 Project: Accumulo Issue Type: Improvement Components: monitor Reporter: Josh Elser Assignee: Josh Elser Fix For: 1.7.0 Attachments: 0001-ACCUMULO-3005-Initial-round-of-changes-for-a-proper-.patch The monitor works well for what it does, but it's very much so cobbled together. HTML is hand generated. Static state is used liberally which makes testing near impossible. View and controller logic are tightly intertwined which also adds to the testability problem. I've been working on porting the functionality from the existing monitor to a proper rest service using [dropwizard|https://dropwizard.github.io/dropwizard/]. It's not completely functional yet, but it has a number of improvements of the existing monitor code. I thought I would post what I have already and let people give some feedback if they're interested. Help is always welcome. https://github.com/joshelser/accumulo/tree/dropwizard. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (ACCUMULO-3005) Convert the monitor into a real REST server
[ https://issues.apache.org/jira/browse/ACCUMULO-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14076412#comment-14076412 ] Mike Drob commented on ACCUMULO-3005: - I did not realize this was 95% POJOs + Annotations when I made that request. Convert the monitor into a real REST server --- Key: ACCUMULO-3005 URL: https://issues.apache.org/jira/browse/ACCUMULO-3005 Project: Accumulo Issue Type: Improvement Components: monitor Reporter: Josh Elser Assignee: Josh Elser Fix For: 1.7.0 Attachments: 0001-ACCUMULO-3005-Initial-round-of-changes-for-a-proper-.patch The monitor works well for what it does, but it's very much so cobbled together. HTML is hand generated. Static state is used liberally which makes testing near impossible. View and controller logic are tightly intertwined which also adds to the testability problem. I've been working on porting the functionality from the existing monitor to a proper rest service using [dropwizard|https://dropwizard.github.io/dropwizard/]. It's not completely functional yet, but it has a number of improvements of the existing monitor code. I thought I would post what I have already and let people give some feedback if they're interested. Help is always welcome. https://github.com/joshelser/accumulo/tree/dropwizard. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (ACCUMULO-3005) Convert the monitor into a real REST server
[ https://issues.apache.org/jira/browse/ACCUMULO-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14076413#comment-14076413 ] Josh Elser commented on ACCUMULO-3005: -- bq. I did not realize this was 95% POJOs + Annotations when I made that request. :) There is a lot of useless pojos for jackson to use, but I think that's a necessary step. Right now, those objects are just wrapping their thrift counterparts, but we want to do this so we can separate the backend transport information from the information that users will expect (e.g. put them in public api, w/e). Convert the monitor into a real REST server --- Key: ACCUMULO-3005 URL: https://issues.apache.org/jira/browse/ACCUMULO-3005 Project: Accumulo Issue Type: Improvement Components: monitor Reporter: Josh Elser Assignee: Josh Elser Fix For: 1.7.0 Attachments: 0001-ACCUMULO-3005-Initial-round-of-changes-for-a-proper-.patch The monitor works well for what it does, but it's very much so cobbled together. HTML is hand generated. Static state is used liberally which makes testing near impossible. View and controller logic are tightly intertwined which also adds to the testability problem. I've been working on porting the functionality from the existing monitor to a proper rest service using [dropwizard|https://dropwizard.github.io/dropwizard/]. It's not completely functional yet, but it has a number of improvements of the existing monitor code. I thought I would post what I have already and let people give some feedback if they're interested. Help is always welcome. https://github.com/joshelser/accumulo/tree/dropwizard. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (ACCUMULO-3005) Convert the monitor into a real REST server
[ https://issues.apache.org/jira/browse/ACCUMULO-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14068806#comment-14068806 ] Mike Drob commented on ACCUMULO-3005: - Is this at odds with ACCUMULO-1013? Convert the monitor into a real REST server --- Key: ACCUMULO-3005 URL: https://issues.apache.org/jira/browse/ACCUMULO-3005 Project: Accumulo Issue Type: Improvement Components: monitor Reporter: Josh Elser Assignee: Josh Elser Fix For: 1.7.0 The monitor works well for what it does, but it's very much so cobbled together. HTML is hand generated. Static state is used liberally which makes testing near impossible. View and controller logic are tightly intertwined which also adds to the testability problem. I've been working on porting the functionality from the existing monitor to a proper rest service using [dropwizard|https://dropwizard.github.io/dropwizard/]. It's not completely functional yet, but it has a number of improvements of the existing monitor code. I thought I would post what I have already and let people give some feedback if they're interested. Help is always welcome. https://github.com/joshelser/accumulo/tree/dropwizard. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (ACCUMULO-3005) Convert the monitor into a real REST server
[ https://issues.apache.org/jira/browse/ACCUMULO-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14068821#comment-14068821 ] Josh Elser commented on ACCUMULO-3005: -- bq. Is this at odds with ACCUMULO-1013? I'm not really sure what a URL builder is, but I would imagine that this issue would subsume that issue. Convert the monitor into a real REST server --- Key: ACCUMULO-3005 URL: https://issues.apache.org/jira/browse/ACCUMULO-3005 Project: Accumulo Issue Type: Improvement Components: monitor Reporter: Josh Elser Assignee: Josh Elser Fix For: 1.7.0 The monitor works well for what it does, but it's very much so cobbled together. HTML is hand generated. Static state is used liberally which makes testing near impossible. View and controller logic are tightly intertwined which also adds to the testability problem. I've been working on porting the functionality from the existing monitor to a proper rest service using [dropwizard|https://dropwizard.github.io/dropwizard/]. It's not completely functional yet, but it has a number of improvements of the existing monitor code. I thought I would post what I have already and let people give some feedback if they're interested. Help is always welcome. https://github.com/joshelser/accumulo/tree/dropwizard. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (ACCUMULO-3005) Convert the monitor into a real REST server
[ https://issues.apache.org/jira/browse/ACCUMULO-3005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14068833#comment-14068833 ] Josh Elser commented on ACCUMULO-3005: -- Oh, I clicked the wrong link. I didn't realize that there were two different tickets. Mea culpa. Personally, I don't think that we'll get to a totally replaced system in the near future. There's too many specifics in how the monitors does what it does to allow direct integration with another tool. However, I am envisioning that these changes would ease integration into other tools. By breaking out each facet of metrics information that the monitor presents, external tools can *much* easier integrate and do whatever they want with that data. Convert the monitor into a real REST server --- Key: ACCUMULO-3005 URL: https://issues.apache.org/jira/browse/ACCUMULO-3005 Project: Accumulo Issue Type: Improvement Components: monitor Reporter: Josh Elser Assignee: Josh Elser Fix For: 1.7.0 The monitor works well for what it does, but it's very much so cobbled together. HTML is hand generated. Static state is used liberally which makes testing near impossible. View and controller logic are tightly intertwined which also adds to the testability problem. I've been working on porting the functionality from the existing monitor to a proper rest service using [dropwizard|https://dropwizard.github.io/dropwizard/]. It's not completely functional yet, but it has a number of improvements of the existing monitor code. I thought I would post what I have already and let people give some feedback if they're interested. Help is always welcome. https://github.com/joshelser/accumulo/tree/dropwizard. -- This message was sent by Atlassian JIRA (v6.2#6252)