[GitHub] incubator-hawq pull request: HAWQ-340. Make getVersion API return ...

2016-01-25 Thread hornn
Github user hornn commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/290#discussion_r50758859
  
--- Diff: pxf/build.gradle ---
@@ -122,6 +124,42 @@ subprojects { subProject ->
 }
 
 project('pxf-service') {
+
+
+task generateSources {
--- End diff --

can you please add a comment in the code explaining the basic idea here? If 
I understand correctly, we replace any mention of @pxfProtocolVersion@ with the 
value from gradle.properties?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request: HAWQ-340. Make getVersion API return ...

2016-01-25 Thread hornn
Github user hornn commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/290#discussion_r50758941
  
--- Diff: 
pxf/pxf-service/src/main/java/org/apache/hawq/pxf/service/rest/VersionResource.java
 ---
@@ -33,7 +34,7 @@
  * version e.g. {@code ...pxf/v14/Bridge}
  */
 class Version {
-final static String PXF_PROTOCOL_VERSION = "v14";
+final static String PXF_PROTOCOL_VERSION = "@pxfProtocolVersion@";
--- End diff --

also here please explain where this value is derived from


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request: HAWQ-340. Make getVersion API return ...

2016-01-25 Thread hornn
Github user hornn commented on the pull request:

https://github.com/apache/incubator-hawq/pull/290#issuecomment-174671513
  
Really nice implementation, especially using gradle! I didn't know about 
this replacing mechanism.
+10 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request: HAWQ-340. Make getVersion API return ...

2016-01-25 Thread sansanichfb
Github user sansanichfb commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/290#discussion_r50761090
  
--- Diff: pxf/build.gradle ---
@@ -122,6 +124,42 @@ subprojects { subProject ->
 }
 
 project('pxf-service') {
+
+
+task generateSources {
--- End diff --

Sure, let me add comments.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request: HAWQ-340. Make getVersion API return ...

2016-01-25 Thread sansanichfb
Github user sansanichfb commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/290#discussion_r50761112
  
--- Diff: 
pxf/pxf-service/src/main/java/org/apache/hawq/pxf/service/rest/VersionResource.java
 ---
@@ -33,7 +34,7 @@
  * version e.g. {@code ...pxf/v14/Bridge}
  */
 class Version {
-final static String PXF_PROTOCOL_VERSION = "v14";
+final static String PXF_PROTOCOL_VERSION = "@pxfProtocolVersion@";
--- End diff --

Will add explanation.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request: HAWQ-340. Make getVersion API return ...

2016-01-25 Thread shivzone
Github user shivzone commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/290#discussion_r50771928
  
--- Diff: 
pxf/pxf-service/src/test/java/org/apache/hawq/pxf/service/rest/VersionResourceTest.java
 ---
@@ -22,21 +22,26 @@
 
 import static org.junit.Assert.assertEquals;
 
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 
 import org.junit.Test;
 
 public class VersionResourceTest {
 
-@Test
-public void getProtocolVersion() throws Exception {
+   @Test
+   public void getProtocolVersion() throws Exception {
 
-VersionResource resource = new VersionResource();
-Response result = resource.getProtocolVersion();
+   VersionResource resource = new VersionResource();
--- End diff --

Fix your indentation to 4 space instead of 8 space


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request: HAWQ-340. Make getVersion API return ...

2016-01-25 Thread shivzone
Github user shivzone commented on the pull request:

https://github.com/apache/incubator-hawq/pull/290#issuecomment-174725634
  
+1 Nice fix


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request: HAWQ-340. Make getVersion API return ...

2016-01-25 Thread sansanichfb
Github user sansanichfb commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/290#discussion_r50788596
  
--- Diff: 
pxf/pxf-service/src/test/java/org/apache/hawq/pxf/service/rest/VersionResourceTest.java
 ---
@@ -22,21 +22,26 @@
 
 import static org.junit.Assert.assertEquals;
 
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 
 import org.junit.Test;
 
 public class VersionResourceTest {
 
-@Test
-public void getProtocolVersion() throws Exception {
+   @Test
+   public void getProtocolVersion() throws Exception {
 
-VersionResource resource = new VersionResource();
-Response result = resource.getProtocolVersion();
+   VersionResource resource = new VersionResource();
--- End diff --

@shivzone thanks, fixed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request: HAWQ-340. Make getVersion API return ...

2016-01-22 Thread sansanichfb
GitHub user sansanichfb opened a pull request:

https://github.com/apache/incubator-hawq/pull/290

HAWQ-340. Make getVersion API return JSON format.



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/apache/incubator-hawq HAWQ-340

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-hawq/pull/290.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #290


commit cf03aa9309b93a05fe36949e10cdd6d695440e61
Author: Oleksandr Diachenko 
Date:   2016-01-22T23:58:06Z

HAWQ-340. Make getVersion API return JSON format.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request: HAWQ-340. Make getVersion API return ...

2016-01-22 Thread mithmatt
Github user mithmatt commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/290#discussion_r50607911
  
--- Diff: 
pxf/pxf-service/src/test/java/org/apache/hawq/pxf/service/rest/VersionResourceTest.java
 ---
@@ -36,7 +36,7 @@ public void getProtocolVersion() throws Exception {
 
 assertEquals(Response.Status.OK,
 Response.Status.fromStatusCode(result.getStatus()));
-assertEquals("PXF protocol version " + 
Version.PXF_PROTOCOL_VERSION,
+assertEquals("{ \"version\": \"" + Version.PXF_PROTOCOL_VERSION + 
"\"}",
--- End diff --

Do you think an additional assert statement is required for MediaType to 
see if it is APPLICATION_JSON_TYPE?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---