2016-04-21 41 views
1

我正在關注this文檔,試圖使HBase REST API正常工作。但是,我已經通過HBase shell創建了一些虛擬記錄,您可以從屏幕截圖的左側看到。然後我提出了hbase守護進程,並嘗試使用郵遞員插件發出獲取請求。HBase REST API按行鍵搜索

好消息是它工作並給了我一個json,但壞消息是返回的鍵'cm93LTA ='沒有意義,單元格值'Y2Y6Y3Ew'也沒有意義。

什麼是獲取請求的正確方法?

這裏是我想遵循以下格式:

# given format 
# I assume there is a typo here since they missed a slash between port and table name 
http://example.com:8000<table>/<row>/<column>:<qualifier>/<timestamp>/content:raw 
# my version 
http://localhost:8080/test/row-0/cf:cq0 

enter image description here

回答

1

,你可以看到下面,這些編碼的行密鑰和列鍵值Base64編碼。

public static void main(String[] args) { 
    System.out.println(Base64.base64Decode("cm93LTA=")); 
    System.out.println(Base64.base64Decode("Y2Y6Y3Ew")); 
} 

打印

row-0 
cf:cq0