[ 
https://issues.apache.org/jira/browse/FALCON-159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13819338#comment-13819338
 ] 

Venkatesh Seetharam commented on FALCON-159:
--------------------------------------------

Hi [~srimanth.gunturi], there is one issue that needs to be fixed in the 
Client. FalconClient still sends XML and results in 406.
org.apache.falcon.client.FalconClient.AdminOperations#VERSION
{code}VERSION("api/admin/version", HttpMethod.GET, MediaType.TEXT_PLAIN){code}
Error:
{code}
bin/falcon admin -version
Falcon server build version: <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 406 Not Acceptable</title>
</head>
<body><h2>HTTP ERROR 406</h2>
<p>Problem accessing /api/admin/version. Reason:
<pre>    Not Acceptable</pre></p><hr /><i><small>Powered by 
Jetty://</small></i><br/>
{code}
I also see there is a bug that mime type is not used from this enum but TEXT is 
sent always.
{code}
    private String sendAdminRequest(AdminOperations job)
        throws FalconCLIException {

        ClientResponse clientResponse = service.path(job.path)
                .header(REMOTE_USER, USER).accept(job.mimeType)
                .type(MediaType.TEXT_PLAIN).method(job.method, 
ClientResponse.class);
        return parseStringResult(clientResponse);
    }
{code}

Do we parse put version and return or send the entire thing?

> Version API endpoint does not emit valid JSON
> ---------------------------------------------
>
>                 Key: FALCON-159
>                 URL: https://issues.apache.org/jira/browse/FALCON-159
>             Project: Falcon
>          Issue Type: Bug
>          Components: prism
>    Affects Versions: 0.3
>            Reporter: Srimanth Gunturi
>            Assignee: Srimanth Gunturi
>             Fix For: 0.4
>
>         Attachments: FALCON-159.patch, FALCON-159_2.patch, 
> FALCON-159_3.patch, FALCON-159_4.patch
>
>
> {{/api/admin/version}} endpoint emits 
> {noformat}
> {Version:"0.4-incubating-SNAPSHOT-rb47788d1112fcf949c22a3860934167237b395b0",Mode:"distributed"}
> {noformat}
> which is not valid JSON. It should be
> {noformat}
> {"Version":"0.4-incubating-SNAPSHOT-rb47788d1112fcf949c22a3860934167237b395b0","Mode":"distributed"}
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to