686970717273747576
String data = JSON.toJSON(o); response.setContentLength(data.length()); response.getWriter().println(data); } catch (Exception e) { // LOG.debug("Error sending data: " + e.toString()); throw new HBaseRestException(e); } }
5960616263646566
.getJSONObject(i); h.addFamily(this.getColumnDescriptor(json_columnDescriptor)); } return h; } catch (Exception e) { throw new HBaseRestException(e); } }
149150151152153154155156157158
JSONObject json_columnDescriptor = columnDescriptorArray .getJSONObject(i); columns.add(this.getColumnDescriptor(json_columnDescriptor)); } } catch (JSONException e) { throw new HBaseRestException("Error Parsing json input", e); } return columns; }
194195196197198199200201
} return new ScannerDescriptor(columns, timestamp, startRow, stopRow, filters); } catch (JSONException e) { throw new HBaseRestException("error parsing json string", e); } }
224225226227228229230231232
Bytes.toBytes(a.getJSONObject(i).getString(RESTConstants.NAME)), org.apache.hadoop.hbase.util.Base64.decode(a.getJSONObject(i) .getString(RESTConstants.VALUE))); } } catch (JSONException e) { throw new HBaseRestException("Error parsing row update json", e); } return rud; }
4041424344454647484950
String innerFilterArgs; try { innerFilterJSON = new JSONObject(args); } catch (JSONException e) { throw new HBaseRestException(e); } // Check if filter is correct if ((innerFilterType = innerFilterJSON.optString(TYPE)) == null) throw new MalformedFilterException();
5152535455565758596061
JSONObject filter; try { filterArray = new JSONArray(args); } catch (JSONException e) { throw new HBaseRestException(e); } // If only 1 Row, just return the row. if (filterArray.length() == 1) { return getRowFilter(filterArray.optJSONObject(0));
4546474849505152535455
String value; try { innerJSON = new JSONObject(args); } catch (JSONException e) { throw new HBaseRestException(e); } if ((columnName = innerJSON.optString(COLUMN_NAME)) == null) { throw new MalformedFilterException(); }
5152535455565758
throws HBaseRestException { try { HTable table = new HTable(this.conf, tableName); table.delete(delete); } catch (IOException e) { throw new HBaseRestException(e); } }
7980818283848586
throws HBaseRestException { try { HTable table = new HTable(this.conf, tableName); return table.get(get); } catch (IOException e) { throw new HBaseRestException(e); } }