-
-
Save angryTit/904609f0c90beca5f90e94accc7199e5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BaseConfiguration conf = new BaseConfiguration(); | |
conf.setProperty("graph.unique-instance-id", UUID.randomUUID().toString()); | |
conf.setProperty("schema.default", "none"); | |
conf.setProperty("gremlin.newInstance", "com.thinkaurelius.titan.core.TitanFactory"); | |
conf.setProperty("ids.block-size", 100); | |
conf.setProperty("storage.setup-wait", 60000); | |
conf.setProperty("storage.buffer-size", 10024); | |
conf.setProperty("storage.write-time", "1 ms"); | |
conf.setProperty("storage.read-time", "1 ms"); | |
conf.setProperty("storage.backend", "com.amazon.titan.diskstorage.dynamodb.DynamoDBStoreManager"); | |
conf.setProperty("storage.dynamodb.client.credentials.constructor-args", ""); | |
conf.setProperty("storage.dynamodb.client.endpoint", "https://dynamodb.ap-southeast-1.amazonaws.com"); | |
conf.setProperty("storage.dynamodb.client.signing-region", "ap-southeast-1"); | |
conf.setProperty("storage.dynamodb.client.credentials.class-name", "com.amazonaws.auth.DefaultAWSCredentialsProviderChain"); | |
conf.setProperty("storage.dynamodb.force-consistent-read", true); | |
conf.setProperty("storage.dynamodb.prefix", "graph"); | |
conf.setProperty("storage.dynamodb.client.connection-max", 250); | |
conf.setProperty("storage.dynamodb.metrics-prefix", "d"); | |
conf.setProperty("storage.dynamodb.enable-parallel-scans", true); | |
conf.setProperty("storage.dynamodb.max-self-throttled-retries", 60); | |
conf.setProperty("storage.dynamodb.control-plane-rate", 10); | |
//turn off sdk retries | |
conf.setProperty("storage.dynamodb.client.retry-error-max", 0); | |
//DynamoDB client configuration: thread pool | |
conf.setProperty("storage.dynamodb.client.executor.core-pool-size", 20); | |
//Do not need more threads in thread pool than the number of http connections | |
conf.setProperty("storage.dynamodb.client.executor.max-pool-size", 20); | |
conf.setProperty("storage.dynamodb.client.executor.keep-alive", 60000); | |
conf.setProperty("storage.dynamodb.client.executor.max-concurrent-operations", 20); | |
conf.setProperty("storage.dynamodb.client.executor.max-queue-length", 1024); | |
conf.setProperty("storage.dynamodb.stores.edgestore.capacity-read", 200); | |
conf.setProperty("storage.dynamodb.stores.edgestore.capacity-write", 100); | |
conf.setProperty("storage.dynamodb.stores.edgestore.read-rate", 1500); | |
conf.setProperty("storage.dynamodb.stores.edgestore.write-rate", 100); | |
conf.setProperty("storage.dynamodb.stores.graphindex.capacity-read", 50); | |
conf.setProperty("storage.dynamodb.stores.graphindex.capacity-write", 50); | |
conf.setProperty("storage.dynamodb.stores.graphindex.read-rate", 1500); | |
conf.setProperty("storage.dynamodb.stores.graphindex.write-rate", 50); | |
conf.setProperty("storage.dynamodb.stores.systemlog.capacity-read", 10); | |
conf.setProperty("storage.dynamodb.stores.systemlog.capacity-write", 10); | |
conf.setProperty("storage.dynamodb.stores.systemlog.read-rate", 10); | |
conf.setProperty("storage.dynamodb.stores.systemlog.write-rate", 10); | |
conf.setProperty("storage.dynamodb.stores.titan_ids.capacity-read", 10); | |
conf.setProperty("storage.dynamodb.stores.titan_ids.capacity-write", 10); | |
conf.setProperty("storage.dynamodb.stores.titan_ids.read-rate", 10); | |
conf.setProperty("storage.dynamodb.stores.titan_ids.write-rate", 10); | |
conf.setProperty("storage.dynamodb.stores.system_properties.capacity-read", 10); | |
conf.setProperty("storage.dynamodb.stores.system_properties.capacity-write", 10); | |
conf.setProperty("storage.dynamodb.stores.system_properties.read-rate", 10); | |
conf.setProperty("storage.dynamodb.stores.system_properties.write-rate", 10); | |
conf.setProperty("storage.dynamodb.stores.txlog.capacity-read", 10); | |
conf.setProperty("storage.dynamodb.stores.txlog.capacity-write", 10); | |
conf.setProperty("storage.dynamodb.stores.txlog.read-rate", 10); | |
conf.setProperty("storage.dynamodb.stores.txlog.write-rate", 10); | |
TitanGraph graph = TitanFactory.open(conf); | |
return graph; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment