Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabled to set the thift frame size for astyanax. #1146

Open
wants to merge 1 commit into
base: titan05
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion titan-cassandra/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<name>Titan-Cassandra: Distributed Graph Database</name>
<url>http://thinkaurelius.github.com/titan/</url>
<properties>
<astyanax.version>1.56.48</astyanax.version>
<astyanax.version>3.6.0</astyanax.version>
<jamm.version>0.2.5</jamm.version>
<jamm.group>com.github.stephenc</jamm.group>
<dependency.plugin.version>2.8</dependency.plugin.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,10 @@ public class AstyanaxStoreManager extends AbstractCassandraStoreManager {
/* It's between either LOCAL or MASKABLE. MASKABLE could be useful for cases where
all the Titan instances are closest to the same Cassandra DC. */
ConfigOption.Type.MASKABLE, String.class);

public static final ConfigOption<Integer> THRIFT_FRAME_SIZE =
new ConfigOption<Integer>(ASTYANAX_NS, "frame-size",
"The thrift frame size in mega bytes", ConfigOption.Type.MASKABLE, 15);

private final String clusterName;

Expand All @@ -259,6 +263,8 @@ public class AstyanaxStoreManager extends AbstractCassandraStoreManager {
private final String localDatacenter;

private final Map<String, AstyanaxKeyColumnValueStore> openStores;

private final int thriftFrameSizeBytes;

public AstyanaxStoreManager(Configuration config) throws BackendException {
super(config);
Expand Down Expand Up @@ -286,6 +292,8 @@ public AstyanaxStoreManager(Configuration config) throws BackendException {
this.keyspaceContext.start();

openStores = new HashMap<String, AstyanaxKeyColumnValueStore>(8);

thriftFrameSizeBytes = config.get(THRIFT_FRAME_SIZE) * 1024 * 1024;
}

@Override
Expand Down Expand Up @@ -494,7 +502,8 @@ private AstyanaxContext.Builder getContextBuilder(Configuration config, int maxC
new AstyanaxConfigurationImpl()
.setConnectionPoolType(poolType)
.setDiscoveryType(discType)
.setTargetCassandraVersion("1.2");
.setTargetCassandraVersion("1.2")
.setMaxThriftSize(thriftFrameSizeBytes);

if (0 < maxConnections) {
cpool.setMaxConns(maxConnections);
Expand Down