Member since
05-20-2016
20
Posts
3
Kudos Received
0
Solutions
02-16-2021
08:00 AM
Hello Jan, You can find all the related information, recommended classes to take and the differences between these 2 certification exam types on these links below: CCA131 - Cloudera Administrator exam CCA121 - HDP Ambari Administrator exam Also you are welcome to check out our Promotions page for the currently running certification discount code. For more information, please reach out to our Certification Team at certification@cloudera.com. Thank you.
... View more
06-18-2016
03:15 PM
@Jan Horton I am not sure about the other ready solution available but mostly people rely on hue and webHdfs to achieve this.I want to share my views on your problem statement where you want a REST webservice to query HBase tables managed by Hive. for a sake of simplicity you can write a hive jdbc client and expose it as REST service. here is the sample program to query hive using jdbc https://github.com/rajkrrsingh/HiveServer2JDBCSample/blob/master/src/main/java/HiveJdbcClient.java to get the formatted resultset in json format your rest service can do like this public static JSONObject getFormattedResult(ResultSet res) throws JSONException {
List<JSONObject> resList = new ArrayList<JSONObject>();
JSONObject hd = new JSONObject();
try {
// get column names
ResultSetMetaData rsMeta = res.getMetaData();
int columnCnt = rsMeta.getColumnCount();
List<String> columnNames = new ArrayList<String>();
for(int i=1;i<=columnCnt;i++) {
columnNames.add(rsMeta.getColumnName(i).toUpperCase());
}
while(res.next()) { // convert each object to an human readable JSON object
JSONObject obj = new JSONObject();
for(int i=1;i<=columnCnt;i++) {
String key = columnNames.get(i - 1);
String value = res.getString(i);
obj.put(key, value);
}
resList.add(obj);
hope it will be much clearer and simple now.
... View more