> On Sept. 30, 2016, 7:45 p.m., Di Li wrote: > > contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/savedQueries/SavedQueryService.java, > > line 103 > > <https://reviews.apache.org/r/52430/diff/1/?file=1516903#file1516903line103> > > > > REST API URLs mostly use nouns (names) instead of verbs (actions). your > > current URL design ends on an action. > > > > I am also not sure I see the point of having a new @GET annotated > > method just for the download action (due to introducting the new URL, I > > guess?). > > > > Can this be handled in the original @GET method ? You can pass in > > pradicates like ?op=download. > > > > If you look at the blueprint export rest api, it's still the @GET > > against /clusters, the only diff is the ?format=json parameter. so I also > > wonder - Can {queryId} support such parameter like if it's ?format=txt, > > then it means to download ?
I have added download as a query param in the existing @GET, so the download operation will happen when ?download=true, the fileName is also added as query param along with download - Anita ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/52430/#review151067 ----------------------------------------------------------- On Oct. 3, 2016, 6:13 p.m., Anita Jebaraj wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/52430/ > ----------------------------------------------------------- > > (Updated Oct. 3, 2016, 6:13 p.m.) > > > Review request for Ambari, Alexandr Antonenko and Di Li. > > > Bugs: AMBARI-18496 > https://issues.apache.org/jira/browse/AMBARI-18496 > > > Repository: ambari > > > Description > ------- > > An option to download the saved query can be included. > > > Diffs > ----- > > > contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/savedQueries/SavedQueryService.java > ccc4512 > > contrib/views/hive-next/src/main/resources/ui/hive-web/app/controllers/queries.js > cbf6b42 > > contrib/views/hive-next/src/main/resources/ui/hive-web/app/initializers/i18n.js > f7f7706 > > contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/savedQueries/SavedQueryService.java > 9ea19c6 > > contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/queries.js > cbf6b42 > contrib/views/hive/src/main/resources/ui/hive-web/app/initializers/i18n.js > f7f7706 > > contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/savedQueries/SavedQueryServiceTest.java > d55858f > > Diff: https://reviews.apache.org/r/52430/diff/ > > > Testing > ------- > > Ran mvn test > > Added 1 new test case > > > File Attachments > ---------------- > > screenshot2.jpg > > https://reviews.apache.org/media/uploaded/files/2016/09/30/26f21b91-2637-4127-9ff2-ee6c0d3ddcfd__screenshot2.jpg > screenshot1.jpg > > https://reviews.apache.org/media/uploaded/files/2016/09/30/b494489d-90f6-42f1-847e-ac19ffcb817a__screenshot1.jpg > > > Thanks, > > Anita Jebaraj > >
