Package org.apache.hadoop.chukwa.datastore

Examples of org.apache.hadoop.chukwa.datastore.UserStore


  protected static final Log log = LogFactory.getLog(UserResource.class);
 
  @GET
  @Path("uid/{uid}")
  public UserBean getProfile(@PathParam("uid") String uid) {
    UserStore user;
    UserBean result;
    try {
      user = new UserStore(uid);
      result = user.get();
    } catch (Exception e) {
      log.error(ExceptionUtil.getStackTrace(e));
      throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND)
          .entity("User does not exist.").build());
    }
View Full Code Here


 
  @PUT
  @Consumes("application/json")
  public ReturnCodeBean setProfile(UserBean user) {
    try {
      UserStore us = new UserStore(user.getId());
      us.set(user);
    } catch(Exception e) {
      log.error(ExceptionUtil.getStackTrace(e));
      throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND)
          .entity("User does not exist.").build());
    }
View Full Code Here

  protected static Log log = LogFactory.getLog(UserResource.class);
 
  @GET
  @Path("uid/{uid}")
  public UserBean getProfile(@PathParam("uid") String uid) {
    UserStore user;
    UserBean result;
    try {
      user = new UserStore(uid);
      result = user.get();
    } catch (Exception e) {
      log.error(ExceptionUtil.getStackTrace(e));
      throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND)
          .entity("User does not exist.").build());
    }
View Full Code Here

 
  @PUT
  @Consumes("application/json")
  public ReturnCodeBean setProfile(UserBean user) {
    try {
      UserStore us = new UserStore(user.getId());
      us.set(user);
    } catch(Exception e) {
      log.error(ExceptionUtil.getStackTrace(e));
      throw new WebApplicationException(Response.status(Response.Status.NOT_FOUND)
          .entity("User does not exist.").build());
    }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.chukwa.datastore.UserStore

Copyright © 2018 www.massapicom. 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.