Examples of HBaseRestException


Examples of org.apache.hadoop.hbase.rest.exception.HBaseRestException

      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);
    }

  }
View Full Code Here

Examples of org.apache.hadoop.hbase.rest.exception.HBaseRestException

            .getJSONObject(i);
        h.addFamily(this.getColumnDescriptor(json_columnDescriptor));
      }
      return h;
    } catch (Exception e) {
      throw new HBaseRestException(e);
    }
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.rest.exception.HBaseRestException

        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;
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.rest.exception.HBaseRestException

      }

      return new ScannerDescriptor(columns, timestamp, startRow, stopRow,
          filters);
    } catch (JSONException e) {
      throw new HBaseRestException("error parsing json string", e);
    }
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.rest.exception.HBaseRestException

            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;
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.rest.exception.HBaseRestException

    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();
View Full Code Here

Examples of org.apache.hadoop.hbase.rest.exception.HBaseRestException

    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));
View Full Code Here

Examples of org.apache.hadoop.hbase.rest.exception.HBaseRestException

    String value;

    try {
      innerJSON = new JSONObject(args);
    } catch (JSONException e) {
      throw new HBaseRestException(e);
    }

    if ((columnName = innerJSON.optString(COLUMN_NAME)) == null) {
      throw new MalformedFilterException();
    }
View Full Code Here

Examples of org.apache.hadoop.hbase.rest.exception.HBaseRestException

  throws HBaseRestException {
    try {
      HTable table = new HTable(this.conf, tableName);
      table.delete(delete);
    } catch (IOException e) {
      throw new HBaseRestException(e);
    }
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.rest.exception.HBaseRestException

  throws HBaseRestException {
    try {
      HTable table = new HTable(this.conf, tableName);
      return table.get(get);
    } catch (IOException e) {
      throw new HBaseRestException(e);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.