Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
EinsamHauer committed Oct 8, 2021
1 parent fbcbdb4 commit b93796b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.net.InetSocketAddress;

/**
* @author Andrei Ivanov
*/
Expand Down Expand Up @@ -77,7 +79,7 @@ public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
ctx.channel().close();

if (cause instanceof java.io.IOException) {
logger.debug("Exception caught in carbon handler", cause);
logger.trace("Exception caught in carbon handler (connection from " + ((InetSocketAddress)ctx.channel().remoteAddress()).getAddress().getHostAddress() + ")", cause);
} else {
logger.error("Exception caught in carbon handler", cause);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public CassandraService(StoreConfiguration storeConfiguration, MBassador<Disthen
.withStringList(DefaultDriverOption.CONTACT_POINTS, getContactPoints(storeConfiguration))
.withDuration(DefaultDriverOption.REQUEST_TIMEOUT, Duration.ofSeconds(storeConfiguration.getReadTimeout()))
.withDuration(DefaultDriverOption.CONNECTION_CONNECT_TIMEOUT, Duration.ofSeconds(storeConfiguration.getConnectTimeout()))
.withDuration(DefaultDriverOption.REQUEST_TIMEOUT, Duration.ofSeconds(storeConfiguration.getConnectTimeout()))
.withString(DefaultDriverOption.REQUEST_CONSISTENCY, "ONE")
.withClass(DefaultDriverOption.LOAD_BALANCING_POLICY_CLASS, DcInferringLoadBalancingPolicy.class)
.withInt(DefaultDriverOption.CONNECTION_POOL_LOCAL_SIZE, storeConfiguration.getMaxConnections())
Expand Down

0 comments on commit b93796b

Please sign in to comment.