You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hawq.apache.org by hornn <gi...@git.apache.org> on 2015/11/12 02:37:30 UTC
[GitHub] incubator-hawq pull request: HAWQ-102. Change error message when P...
GitHub user hornn opened a pull request:
https://github.com/apache/incubator-hawq/pull/100
HAWQ-102. Change error message when PXF webapp is down
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/hornn/incubator-hawq HAWQ-102
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-hawq/pull/100.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 #100
----
commit 3f097364726831a49efdf37dd2b6a19038af355a
Author: Noa Horn <nh...@pivotal.io>
Date: 2015-11-12T01:35:37Z
HAWQ-102. Change error message when PXF webapp is down
----
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-hawq pull request: HAWQ-102. Change error message when P...
Posted by hornn <gi...@git.apache.org>.
Github user hornn closed the pull request at:
https://github.com/apache/incubator-hawq/pull/100
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-hawq pull request: HAWQ-102. Change error message when P...
Posted by hornn <gi...@git.apache.org>.
Github user hornn commented on a diff in the pull request:
https://github.com/apache/incubator-hawq/pull/100#discussion_r44688831
--- Diff: src/backend/access/external/libchurl.c ---
@@ -815,42 +815,49 @@ void check_response_code(churl_context* context)
}
else if (response_code != 200 && response_code != 100)
{
- if (!handle_special_error(response_code))
- {
- StringInfoData err;
- char *http_error_msg;
- char *addr;
+ StringInfoData err;
+ char *http_error_msg;
+ char *addr;
- initStringInfo(&err);
+ initStringInfo(&err);
- /* prepare response text if any */
- if (context->download_buffer->ptr)
- {
- context->download_buffer->ptr[context->download_buffer->top] = '\0';
- response_text = context->download_buffer->ptr + context->download_buffer->bot;
- }
+ /* prepare response text if any */
+ if (context->download_buffer->ptr)
+ {
+ context->download_buffer->ptr[context->download_buffer->top] = '\0';
+ response_text = context->download_buffer->ptr + context->download_buffer->bot;
+ }
- /* add remote http error code */
- appendStringInfo(&err, "remote component error (%ld)", response_code);
+ /* add remote http error code */
+ appendStringInfo(&err, "remote component error (%ld)", response_code);
- addr = get_dest_address(context->curl_handle);
- if (strlen(addr) != 0)
- appendStringInfo(&err, " from %s", addr);
- pfree(addr);
+ addr = get_dest_address(context->curl_handle);
+ if (strlen(addr) != 0)
+ {
+ appendStringInfo(&err, " from %s", addr);
--- End diff --
Good point. As far as I know the convention is to add curly brackets for each block, but the code doesn't always follow that convention.
In this case, I prefer to keep it that way to be make it clearer.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-hawq pull request: HAWQ-102. Change error message when P...
Posted by shivzone <gi...@git.apache.org>.
Github user shivzone commented on a diff in the pull request:
https://github.com/apache/incubator-hawq/pull/100#discussion_r44692378
--- Diff: src/backend/access/external/libchurl.c ---
@@ -815,42 +815,49 @@ void check_response_code(churl_context* context)
}
else if (response_code != 200 && response_code != 100)
{
- if (!handle_special_error(response_code))
- {
- StringInfoData err;
- char *http_error_msg;
- char *addr;
+ StringInfoData err;
+ char *http_error_msg;
+ char *addr;
- initStringInfo(&err);
+ initStringInfo(&err);
- /* prepare response text if any */
- if (context->download_buffer->ptr)
- {
- context->download_buffer->ptr[context->download_buffer->top] = '\0';
- response_text = context->download_buffer->ptr + context->download_buffer->bot;
- }
+ /* prepare response text if any */
+ if (context->download_buffer->ptr)
+ {
+ context->download_buffer->ptr[context->download_buffer->top] = '\0';
+ response_text = context->download_buffer->ptr + context->download_buffer->bot;
+ }
- /* add remote http error code */
- appendStringInfo(&err, "remote component error (%ld)", response_code);
+ /* add remote http error code */
+ appendStringInfo(&err, "remote component error (%ld)", response_code);
- addr = get_dest_address(context->curl_handle);
- if (strlen(addr) != 0)
- appendStringInfo(&err, " from %s", addr);
- pfree(addr);
+ addr = get_dest_address(context->curl_handle);
+ if (strlen(addr) != 0)
+ {
+ appendStringInfo(&err, " from %s", addr);
--- End diff --
Sounds good
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-hawq pull request: HAWQ-102. Change error message when P...
Posted by shivzone <gi...@git.apache.org>.
Github user shivzone commented on the pull request:
https://github.com/apache/incubator-hawq/pull/100#issuecomment-156178390
+1
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-hawq pull request: HAWQ-102. Change error message when P...
Posted by shivzone <gi...@git.apache.org>.
Github user shivzone commented on a diff in the pull request:
https://github.com/apache/incubator-hawq/pull/100#discussion_r44687600
--- Diff: src/backend/access/external/libchurl.c ---
@@ -815,42 +815,49 @@ void check_response_code(churl_context* context)
}
else if (response_code != 200 && response_code != 100)
{
- if (!handle_special_error(response_code))
- {
- StringInfoData err;
- char *http_error_msg;
- char *addr;
+ StringInfoData err;
+ char *http_error_msg;
+ char *addr;
- initStringInfo(&err);
+ initStringInfo(&err);
- /* prepare response text if any */
- if (context->download_buffer->ptr)
- {
- context->download_buffer->ptr[context->download_buffer->top] = '\0';
- response_text = context->download_buffer->ptr + context->download_buffer->bot;
- }
+ /* prepare response text if any */
+ if (context->download_buffer->ptr)
+ {
+ context->download_buffer->ptr[context->download_buffer->top] = '\0';
+ response_text = context->download_buffer->ptr + context->download_buffer->bot;
+ }
- /* add remote http error code */
- appendStringInfo(&err, "remote component error (%ld)", response_code);
+ /* add remote http error code */
+ appendStringInfo(&err, "remote component error (%ld)", response_code);
- addr = get_dest_address(context->curl_handle);
- if (strlen(addr) != 0)
- appendStringInfo(&err, " from %s", addr);
- pfree(addr);
+ addr = get_dest_address(context->curl_handle);
+ if (strlen(addr) != 0)
+ {
+ appendStringInfo(&err, " from %s", addr);
--- End diff --
hawq codebase seems to follow convention of not using braces on single statement action on conditional blocks
if(case)
code
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---