Commit 32070b71 authored by PrasadMoka's avatar PrasadMoka
Browse files

fix:removed unnecessary code

Showing with 2 additions and 5 deletions
+2 -5
......@@ -4,7 +4,6 @@ import com.datastax.driver.core.BatchStatement;
import com.datastax.driver.core.BoundStatement;
import com.datastax.driver.core.PreparedStatement;
import com.datastax.driver.core.ResultSet;
import com.datastax.driver.core.ConsistencyLevel;
import com.datastax.driver.core.WriteType;
import com.datastax.driver.core.Session;
import com.datastax.driver.core.Statement;
......@@ -314,8 +313,6 @@ public abstract class CassandraOperationImpl implements CassandraOperation {
Update.Where where = updateQuery.where();
for (Map.Entry<String, Object> entry: selectMap.entrySet())
where.and(eq(entry.getKey(), entry.getValue()));
// RELEASE# 5.0.0 Removed this check as it is not required.It was added for taking care of wrong data, which is no longer needed
//if (ifExists) where.ifExists();
logger.debug(requestContext, updateQuery.getQueryString());
connectionManager.getSession(keyspace).execute(updateQuery);
response.put(Constants.RESPONSE, Constants.SUCCESS);
......
......@@ -104,9 +104,9 @@ public class CassandraConnectionManagerImpl implements CassandraConnectionManage
builder.withQueryOptions(new QueryOptions().setConsistencyLevel(consistencyLevel));
}
String msg = String.format("CassandraConnectionManagerImpl:createCluster: isMultiDCEnabled = ",isMultiDCEnabled);
logger.info(null,msg);
if (isMultiDCEnabled) {
String msg = String.format("CassandraConnectionManagerImpl:createCluster: isMultiDCEnabled = true");
logger.info(null,msg);
builder.withLoadBalancingPolicy(DCAwareRoundRobinPolicy.builder().build());
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment