Created 02-19-2016 02:55 PM
I do : curl -v -H "Content-Type: text/xml" -d '<Scanner batch="1"/>' http://10.148.10.2:9090/device_day_metric_kt/scanner
and get result with scannerid !
Sometime can get result, however most time can not get result ! why ? what's wrong ?
----------------------------------------------------------------------------------------------------------------------
[root@basic.internal.hadoop.10-148-10-80 KHTEST]# curl -v -H "Content-Type: text/xml" -d '<Scanner batch="1"/>' http://10.148.10.2:9090/device_day_metric_kt/scanner * About to connect() to 10.148.10.2 port 9090 (#0) * Trying 10.148.10.2... connected * Connected to 10.148.10.2 (10.148.10.2) port 9090 (#0) > POST /device_day_metric_kt/scanner HTTP/1.1 > User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2 > Host: 10.148.10.2:9090 > Accept: */* > Content-Type: text/xml > Content-Length: 20 > < HTTP/1.1 201 Created < Location: http://10.148.10.2:9090/device_day_metric_kt/scanner/145589362659469f85bc0 < Content-Length: 0 < * Connection #0 to host 10.148.10.2 left intact * Closing connection #0 [root@basic.internal.hadoop.10-148-10-80 KHTEST]# curl -v -H "Content-Type: text/xml" http://10.148.10.2:9090/device_day_metric_kt/scanner/145589362659469f85bc0 * About to connect() to 10.148.10.2 port 9090 (#0) * Trying 10.148.10.2... connected * Connected to 10.148.10.2 (10.148.10.2) port 9090 (#0) > GET /device_day_metric_kt/scanner/145589362659469f85bc0 HTTP/1.1 > User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2 > Host: 10.148.10.2:9090 > Accept: */* > Content-Type: text/xml > < HTTP/1.1 200 OK < Content-Length: 3 < Cache-Control: no-cache < X-Row: LTExNzI4MTI0MDI5NjE4MjAxNjAxMDQ= < X-Column: ZW52OmVudl9jaXR5X2NvZGU= < X-Timestamp: 1454044118503 < Content-Type: application/octet-stream < * Connection #0 to host 10.148.10.2 left intact * Closing connection #0
Created 02-20-2016 05:54 AM
I get it !
curl -v -H "Content-Type: text/xml" http://10.148.10.2:9090/device_day_metric_kt/scanner/145589362659469f85bc0
should be
curl -v -H "Accept: application/json" http://10.148.10.2:9090/device_day_metric_kt/scanner/145589362659469f85bc0
Created 02-19-2016 03:00 PM
@kang hua does the same get return result in hbase shell?
Created 02-19-2016 04:42 PM
yes,get return data
Created 02-19-2016 04:51 PM
is there anything in /var/log/hbase/hbase-hbase-rest-servername.log?
Created 02-19-2016 05:26 PM
Created 02-19-2016 05:34 PM
Created 02-19-2016 05:31 PM
Before you use this production ...see this
Created 02-20-2016 04:41 AM
scanner not get nothing, but only one cell value , not a whole row , and not any cf or qualifier, only cell!
Created 02-20-2016 04:51 AM
Set Accept header to text/xml for XML encoding , But result like from "application/octet-stream for binary encoding" setting.
Created 02-20-2016 05:54 AM
I get it !
curl -v -H "Content-Type: text/xml" http://10.148.10.2:9090/device_day_metric_kt/scanner/145589362659469f85bc0
should be
curl -v -H "Accept: application/json" http://10.148.10.2:9090/device_day_metric_kt/scanner/145589362659469f85bc0