You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by to...@apache.org on 2014/09/21 21:43:21 UTC

[2/2] git commit: Removed exception swallowing on setup

Removed exception swallowing on setup

Renamed CL properties


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/4fb2fd88
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/4fb2fd88
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/4fb2fd88

Branch: refs/heads/two-dot-o
Commit: 4fb2fd88b390ad7b83410d5f9a5e614c49948d83
Parents: 6730b98
Author: Todd Nine <to...@apache.org>
Authored: Sun Sep 21 13:43:10 2014 -0600
Committer: Todd Nine <to...@apache.org>
Committed: Sun Sep 21 13:43:10 2014 -0600

----------------------------------------------------------------------
 .../persistence/core/astyanax/CassandraFig.java |  4 +--
 .../apache/usergrid/rest/SystemResource.java    | 32 ++++++++------------
 2 files changed, 14 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/4fb2fd88/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/astyanax/CassandraFig.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/astyanax/CassandraFig.java b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/astyanax/CassandraFig.java
index e970685..1d4066d 100644
--- a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/astyanax/CassandraFig.java
+++ b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/astyanax/CassandraFig.java
@@ -33,9 +33,9 @@ import org.safehaus.guicyfig.Key;
 public interface CassandraFig extends GuicyFig {
 
 
-    public static final String READ_CL = "usergrid.graph.read.cl";
+    public static final String READ_CL = "usergrid.read.cl";
 
-    public static final String WRITE_CL = "usergrid.graph.write.cl";
+    public static final String WRITE_CL = "usergrid.write.cl";
 
     @Key( "cassandra.hosts" )
     String getHosts();

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/4fb2fd88/stack/rest/src/main/java/org/apache/usergrid/rest/SystemResource.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/java/org/apache/usergrid/rest/SystemResource.java b/stack/rest/src/main/java/org/apache/usergrid/rest/SystemResource.java
index bd2fc88..952574d 100644
--- a/stack/rest/src/main/java/org/apache/usergrid/rest/SystemResource.java
+++ b/stack/rest/src/main/java/org/apache/usergrid/rest/SystemResource.java
@@ -30,18 +30,19 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.context.annotation.Scope;
 import org.springframework.stereotype.Component;
+
 import org.apache.usergrid.rest.security.annotations.RequireSystemAccess;
 
 import com.sun.jersey.api.json.JSONWithPadding;
 
 
-@Path("/system")
+@Path( "/system" )
 @Component
-@Scope("singleton")
-@Produces({
+@Scope( "singleton" )
+@Produces( {
         MediaType.APPLICATION_JSON, "application/javascript", "application/x-javascript", "text/ecmascript",
         "application/ecmascript", "text/jscript"
-})
+} )
 public class SystemResource extends AbstractContextResource {
 
     private static final Logger logger = LoggerFactory.getLogger( SystemResource.class );
@@ -54,9 +55,9 @@ public class SystemResource extends AbstractContextResource {
 
     @RequireSystemAccess
     @GET
-    @Path("database/setup")
+    @Path( "database/setup" )
     public JSONWithPadding getSetup( @Context UriInfo ui,
-                                     @QueryParam("callback") @DefaultValue("callback") String callback )
+                                     @QueryParam( "callback" ) @DefaultValue( "callback" ) String callback )
             throws Exception {
 
         ApiResponse response = createApiResponse();
@@ -65,19 +66,10 @@ public class SystemResource extends AbstractContextResource {
         logger.info( "Setting up Cassandra" );
 
 
-        try {
-            emf.setup();
-        }
-        catch ( Exception e ) {
-            logger.error( "Unable to complete core database setup, possibly due to it being setup already", e );
-        }
+        emf.setup();
 
-        try {
-            management.setup();
-        }
-        catch ( Exception e ) {
-            logger.error( "Unable to complete management database setup, possibly due to it being setup already", e );
-        }
+
+        management.setup();
 
         response.setSuccess();
 
@@ -87,9 +79,9 @@ public class SystemResource extends AbstractContextResource {
 
     @RequireSystemAccess
     @GET
-    @Path("superuser/setup")
+    @Path( "superuser/setup" )
     public JSONWithPadding getSetupSuperuser( @Context UriInfo ui,
-                                              @QueryParam("callback") @DefaultValue("callback") String callback )
+                                              @QueryParam( "callback" ) @DefaultValue( "callback" ) String callback )
             throws Exception {
 
         ApiResponse response = createApiResponse();