1

我正在尝试将 Hbase Stargate 作为与我的 Hbase 安装捆绑在一起的 REST 服务器。启动和运行很简单,但我想知道如何查看实际的行数据?当我在我的 REST 客户端中执行 GET 请求时,我返回了乱码:

获取本地主机:8282/article/row1/

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<CellSet>
<Row key="cm93MQ==">
<Cell column="Y2Y6QXJ0aWNsZUlE" timestamp="1357592601561">MQ==</Cell>
<Cell column="Y2Y6Q2FwRGF0ZQ==" timestamp="1357592790624">dG9kYXk=</Cell>
<Cell column="Y2Y6Q292ZXJhZ2U=" timestamp="1357592715068">U2FtcGxlIENvdmVyYWdl</Cell>
<Cell column="Y2Y6RW5jb2Rpbmc=" timestamp="1357592773388">VVRGLTg=</Cell>
<Cell column="Y2Y6TENvZGU=" timestamp="1357592744929">ZW4=</Cell>
<Cell column="Y2Y6TGFuZw==" timestamp="1357592760758">RW5nbGlzaA==</Cell>
<Cell column="Y2Y6TmF0aXZlTmFtZQ==" timestamp="1357592681884">U2FtcGxlIE5hdGl2ZSBOYW1l</Cell>
<Cell column="Y2Y6UHViRGF0ZQ==" timestamp="1357592786561">dG9kYXk=</Cell>
<Cell column="Y2Y6U291cmNlSUQ=" timestamp="1357592732763">MQ==</Cell>
<Cell column="Y2Y6U291cmNlSUQ=" timestamp="1357592663427">U2FtcGxlIFNvdXJjZSBJRA==</Cell>
<Cell column="Y2Y6U291cmNlVHlwZQ==" timestamp="1357592701595">U2FtcGxlIFNvdXJjZSBUeXBl</Cell>
<Cell column="Y2Y6VGV4dA==" timestamp="1357592802878">U2FtcGxlIFRleHQ=</Cell>
<Cell column="Y2Y6VGl0bGU=" timestamp="1357592629292">U2FtcGxlIFRpdGxl</Cell>
<Cell column="Y2Y6VHJUaXRsZQ==" timestamp="1357592640605">U2FtcGxlIFRyVGl0bGU=</Cell>
<Cell column="Y2Y6VXJs" timestamp="1357592616187">aHR0cDovL3d3dy5nb29nbGUuY29t</Cell>
</Row>
</CellSet>

我确实参考了 WIKI,它也显示了带有乱码结果的示例:http ://wiki.apache.org/hadoop/Hbase/Stargate#A5 ,但我找不到任何关于如何解码它的信息。

谢谢!

4

1 回答 1

3

解码结果的一种方法是使用 shell 中的 base64 函数。例如。

echo "cm93MQ==" | base64 -d
于 2013-01-08T05:17:11.350 回答