Merge pull request #4 from apigee/mutationflushing

Removed retry logic that doesn't work correctly.  Results in 50x retries...
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/CassandraPersistenceUtils.java b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/CassandraPersistenceUtils.java
index 81aad6b..32400af 100644
--- a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/CassandraPersistenceUtils.java
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/CassandraPersistenceUtils.java
@@ -335,15 +335,8 @@
 
 
     public static MutationResult batchExecute( Mutator<?> m, int retries ) {
-        for ( int i = 0; i < retries; i++ ) {
-            try {
-                return m.execute();
-            }
-            catch ( Exception e ) {
-                logger.error( "Unable to execute mutation, retrying...", e );
-            }
-        }
         return m.execute();
+
     }
 
 
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/CassandraService.java b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/CassandraService.java
index a7e016e..be840e5 100644
--- a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/CassandraService.java
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/CassandraService.java
@@ -999,36 +999,6 @@
     }
 
 
-    public void deleteRow( Keyspace ko, final Object columnFamily, final String key ) throws Exception {
-
-        if ( db_logger.isDebugEnabled() ) {
-            db_logger.debug( "deleteRow cf=" + columnFamily + " key=" + key );
-        }
-
-        createMutator( ko, se ).addDeletion( key, columnFamily.toString() ).execute();
-    }
-
-
-    /**
-     * Delete row.
-     *
-     * @param keyspace the keyspace
-     * @param columnFamily the column family
-     * @param key the key
-     * @param timestamp the timestamp
-     *
-     * @throws Exception the exception
-     */
-    public void deleteRow( Keyspace ko, final Object columnFamily, final Object key, final long timestamp )
-            throws Exception {
-
-        if ( db_logger.isDebugEnabled() ) {
-            db_logger.debug( "deleteRow cf=" + columnFamily + " key=" + key + " timestamp=" + timestamp );
-        }
-
-        createMutator( ko, be ).addDeletion( bytebuffer( key ), columnFamily.toString(), timestamp ).execute();
-    }
-
 
     /**
      * Gets the id list.
@@ -1070,62 +1040,7 @@
     }
 
 
-    public int countColumns( Keyspace ko, Object columnFamily, Object key ) throws Exception {
 
-
-        CountQuery<ByteBuffer, ByteBuffer> cq = HFactory.createCountQuery( ko, be, be );
-        cq.setColumnFamily( columnFamily.toString() );
-        cq.setKey( bytebuffer( key ) );
-        cq.setRange( ByteBuffer.allocate( 0 ), ByteBuffer.allocate( 0 ), 100000000 );
-        QueryResult<Integer> r = cq.execute();
-        if ( r == null ) {
-            return 0;
-        }
-        return r.get();
-    }
-
-
-    /**
-     * Sets the id list.
-     *
-     * @param keyspace the keyspace
-     * @param targetId the target id
-     * @param columnFamily the column family
-     * @param keyPrefix the key prefix
-     * @param keySuffix the key suffix
-     * @param keyIds the key ids
-     * @param setColumnValue the set column value
-     *
-     * @throws Exception the exception
-     */
-    public void setIdList( Keyspace ko, UUID targetId, String keyPrefix, String keySuffix, List<UUID> keyIds )
-            throws Exception {
-        long timestamp = createTimestamp();
-        Mutator<ByteBuffer> batch = createMutator( ko, be );
-        batch = buildSetIdListMutator( batch, targetId, ENTITY_ID_SETS.toString(), keyPrefix, keySuffix, keyIds,
-                timestamp );
-        batchExecute( batch, CassandraService.RETRY_COUNT );
-    }
-
-
-    boolean clusterUp = false;
-
-
-    public void startClusterHealthCheck() {
-
-        ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor();
-        executorService.scheduleWithFixedDelay( new Runnable() {
-            @Override
-            public void run() {
-                if ( cluster != null ) {
-                    HConnectionManager connectionManager = cluster.getConnectionManager();
-                    if ( connectionManager != null ) {
-                        clusterUp = !connectionManager.getHosts().isEmpty();
-                    }
-                }
-            }
-        }, 1, 5, TimeUnit.SECONDS );
-    }
     
     public void destroy() throws Exception {
     	if (cluster != null) {