title: Composite index in Titan Dynamo DB won't work
body: <p>So I'm trying to make a composite index on Titan backed with Dynamo DB and it throws this exception.</p>
  
  <p>The main error is <code>Hash primary key values must be under 2048 bytes, and range primary key values must be under 1024 bytes</code>. </p>
  
  <pre><code>com.thinkaurelius.titan.core.TitanException: Could not commit transaction due to exception during persistence
  
      at com.thinkaurelius.titan.graphdb.transaction.StandardTitanTx.commit(StandardTitanTx.java:1363)
      at com.thinkaurelius.titan.graphdb.tinkerpop.TitanBlueprintsGraph$GraphTransaction.doCommit(TitanBlueprintsGraph.java:263)
      at org.apache.tinkerpop.gremlin.structure.util.AbstractTransaction.commit(AbstractTransaction.java:94)
      at org.apache.tinkerpop.gremlin.structure.Transaction$commit.call(Unknown Source)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:110)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:114)
      at com.kapsoft.isportsdb.parsers.baseball.RetroSheetDataParser$_parseTeamsAndAddToGraph_closure5$_closure10.doCall(RetroSheetDataParser.groovy:675)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
      at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
      at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:292)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
      at groovy.lang.Closure.call(Closure.java:423)
      at groovy.lang.Closure.call(Closure.java:439)
      at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2027)
      at org.codehaus.groovy.runtime.dgm$161.invoke(Unknown Source)
      at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271)
      at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:110)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:122)
      at com.kapsoft.isportsdb.parsers.baseball.RetroSheetDataParser$_parseTeamsAndAddToGraph_closure5.doCall(RetroSheetDataParser.groovy:637)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
      at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
      at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:292)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
      at groovy.lang.Closure.call(Closure.java:423)
      at groovy.lang.Closure.call(Closure.java:439)
      at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2027)
      at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2012)
      at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2053)
      at org.codehaus.groovy.runtime.dgm$162.invoke(Unknown Source)
      at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271)
      at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:110)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:122)
      at com.kapsoft.isportsdb.parsers.baseball.RetroSheetDataParser.parseTeamsAndAddToGraph(RetroSheetDataParser.groovy:635)
      at com.kapsoft.isportsdb.parsers.baseball.RetroSheetDataParser$parseTeamsAndAddToGraph$7.callCurrent(Unknown Source)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:151)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:171)
      at com.kapsoft.isportsdb.parsers.baseball.RetroSheetDataParser.parse(RetroSheetDataParser.groovy:103)
      at com.kapsoft.isportsdb.parsers.baseball.RetroSheetDataParserTest.testParse(RetroSheetDataParserTest.java:19)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
      at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
      at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
      at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
      at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
      at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117)
      at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
      at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
  Caused by: com.thinkaurelius.titan.core.TitanException: Could not execute operation due to backend exception
      at com.thinkaurelius.titan.diskstorage.util.BackendOperation.execute(BackendOperation.java:44)
      at com.thinkaurelius.titan.diskstorage.keycolumnvalue.cache.CacheTransaction.persist(CacheTransaction.java:87)
      at com.thinkaurelius.titan.diskstorage.keycolumnvalue.cache.CacheTransaction.flushInternal(CacheTransaction.java:141)
      at com.thinkaurelius.titan.diskstorage.keycolumnvalue.cache.CacheTransaction.commit(CacheTransaction.java:198)
      at com.thinkaurelius.titan.diskstorage.BackendTransaction.commitStorage(BackendTransaction.java:118)
      at com.thinkaurelius.titan.graphdb.database.StandardTitanGraph.commit(StandardTitanGraph.java:718)
      at com.thinkaurelius.titan.graphdb.transaction.StandardTitanTx.commit(StandardTitanTx.java:1352)
      ... 78 more
  Caused by: com.thinkaurelius.titan.diskstorage.PermanentBackendException: UpdateItem_v100_graphindex Hash primary key values must be under 2048 bytes, and range primary key values must be under 1024 bytes (Service: AmazonDynamoDBv2; Status Code: 400; Error Code: ValidationException; Request ID: 608064c5-746c-4f7f-95e9-6d9a382d08eb)
      at com.amazon.titan.diskstorage.dynamodb.DynamoDBDelegate.processDynamoDBAPIException(DynamoDBDelegate.java:213)
      at com.amazon.titan.diskstorage.dynamodb.DynamoDBDelegate.updateItem(DynamoDBDelegate.java:515)
      at com.amazon.titan.diskstorage.dynamodb.ExponentialBackoff$UpdateItem.call(ExponentialBackoff.java:91)
      at com.amazon.titan.diskstorage.dynamodb.ExponentialBackoff$UpdateItem.call(ExponentialBackoff.java:84)
      at com.amazon.titan.diskstorage.dynamodb.ExponentialBackoff.runWithBackoff(ExponentialBackoff.java:158)
      at com.amazon.titan.diskstorage.dynamodb.mutation.UpdateItemWorker.call(UpdateItemWorker.java:40)
      at com.amazon.titan.diskstorage.dynamodb.mutation.UpdateItemWorker.call(UpdateItemWorker.java:27)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
  Caused by: com.amazonaws.AmazonServiceException: Hash primary key values must be under 2048 bytes, and range primary key values must be under 1024 bytes (Service: AmazonDynamoDBv2; Status Code: 400; Error Code: ValidationException; Request ID: 608064c5-746c-4f7f-95e9-6d9a382d08eb)
      at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:1275)
      at com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:873)
      at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:576)
      at com.amazonaws.http.AmazonHttpClient.doExecute(AmazonHttpClient.java:362)
      at com.amazonaws.http.AmazonHttpClient.executeWithTimer(AmazonHttpClient.java:328)
      at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:307)
      at com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient.invoke(AmazonDynamoDBClient.java:1818)
      at com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient.updateItem(AmazonDynamoDBClient.java:1632)
      at com.amazon.titan.diskstorage.dynamodb.DynamoDBDelegate.updateItem(DynamoDBDelegate.java:513)
      ... 11 more
  </code></pre>
  
  <p>So I guess the index doesn't allow a value more than 2048 bytes?</p>