hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arpit Gupta (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-2404) webhdfs liststatus json response is not correct
Date Wed, 05 Oct 2011 19:18:29 GMT

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

Arpit Gupta commented on HDFS-2404:
-----------------------------------

curl -i "http://HOST:50070/webhdfs/?op=LISTSTATUS"

returns

{code}
{"HdfsFileStatus[]":[
{"HdfsFileStatus":{"accessTime":0,"blockSize":0,"group":"hadoop","isDir":true,"len":0,"localName":"hbase","modificationTime":1317832608532,"owner":"hrt_hdfs","permission":"700","replication":0}},
{"HdfsFileStatus":{"accessTime":0,"blockSize":0,"group":"hadoop","isDir":true,"len":0,"localName":"mapred","modificationTime":1317832616195,"owner":"mapred","permission":"755","replication":0}},
{code}


This when converted to xml is something like

{code}
<?xml version="1.0" encoding="UTF-8" ?>
	<HdfsFileStatus[]>
		<HdfsFileStatus>
			<accessTime>0</accessTime>
			<blockSize>0</blockSize>
			<group>hadoop</group>
			<isDir>true</isDir>
			<len>0</len>
			<localName>hbase</localName>
			<modificationTime>1317832608532</modificationTime>
			<owner>hrt_hdfs</owner>
			<permission>700</permission>
			<replication>0</replication>
		</HdfsFileStatus>
	</HdfsFileStatus[]>
	<HdfsFileStatus[]>
		<HdfsFileStatus>
			<accessTime>0</accessTime>
			<blockSize>0</blockSize>
			<group>hadoop</group>
			<isDir>true</isDir>
			<len>0</len>
			<localName>mapred</localName>
			<modificationTime>1317832616195</modificationTime>
			<owner>mapred</owner>
			<permission>755</permission>
			<replication>0</replication>
		</HdfsFileStatus>
	</HdfsFileStatus[]>
	

{code}


We should instead return something like
{code}
{"HdfsFileStatus":[
{"accessTime":0,"blockSize":0,"group":"hadoop","isDir":true,"len":0,"localName":"hbase","modificationTime":1317832608532,"owner":"hrt_hdfs","permission":"700","replication":0},
{"accessTime":0,"blockSize":0,"group":"hadoop","isDir":true,"len":0,"localName":"mapred","modificationTime":1317832616195,"owner":"mapred","permission":"755","replication":0},
{"accessTime":0,"blockSize":0,"group":"supergroup","isDir":true,"len":0,"localName":"tmp","modificationTime":1317832565771,"owner":"hdfs","permission":"777","replication":0},
{"accessTime":0,"blockSize":0,"group":"supergroup","isDir":true,"len":0,"localName":"user","modificationTime":1317832647984,"owner":"hdfs","permission":"755","replication":0}]}
{code}

which maps to xml like

{code}
<?xml version="1.0" encoding="UTF-8" ?>
	<HdfsFileStatus>
		<accessTime>0</accessTime>
		<blockSize>0</blockSize>
		<group>hadoop</group>
		<isDir>true</isDir>
		<len>0</len>
		<localName>hbase</localName>
		<modificationTime>1317832608532</modificationTime>
		<owner>hrt_hdfs</owner>
		<permission>700</permission>
		<replication>0</replication>
	</HdfsFileStatus>
	<HdfsFileStatus>
		<accessTime>0</accessTime>
		<blockSize>0</blockSize>
		<group>hadoop</group>
		<isDir>true</isDir>
		<len>0</len>
		<localName>mapred</localName>
		<modificationTime>1317832616195</modificationTime>
		<owner>mapred</owner>
		<permission>755</permission>
		<replication>0</replication>
	</HdfsFileStatus>
	

{code}
                
> webhdfs liststatus json response is not correct
> -----------------------------------------------
>
>                 Key: HDFS-2404
>                 URL: https://issues.apache.org/jira/browse/HDFS-2404
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 0.20.205.0
>            Reporter: Arpit Gupta
>            Assignee: Suresh Srinivas
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message