-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Setting the IndexingPolicy * Use longs for holding partitioningKey and ids instead of Strings * Revert "Use longs for holding partitioningKey and ids instead of Strings" This reverts commit 3178e6d. * Refactoring the data generation to not cache the generated keys * Avoid the map recreation Co-authored-by: Amar Athavale <[email protected]>
- Loading branch information
1 parent
a317d24
commit 7b342e3
Showing
18 changed files
with
308 additions
and
101 deletions.
There are no files selected for viewing
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
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
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
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
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
15 changes: 15 additions & 0 deletions
15
...enchmark/src/main/java/com/azure/cosmos/benchmark/linkedin/data/CollectionAttributes.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
package com.azure.cosmos.benchmark.linkedin.data; | ||
|
||
import com.azure.cosmos.models.IndexingPolicy; | ||
|
||
|
||
public interface CollectionAttributes { | ||
|
||
/** | ||
* @return IndexingPolicy definition for a collection used to store a specific entity type | ||
*/ | ||
IndexingPolicy indexingPolicy(); | ||
} |
18 changes: 18 additions & 0 deletions
18
...osmos-benchmark/src/main/java/com/azure/cosmos/benchmark/linkedin/data/DataGenerator.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
package com.azure.cosmos.benchmark.linkedin.data; | ||
|
||
import com.fasterxml.jackson.databind.node.ObjectNode; | ||
import java.util.Map; | ||
|
||
|
||
public interface DataGenerator { | ||
/** | ||
* Generates the desired batch of records for a specific entity | ||
* | ||
* @param recordCount Number of records we want to create in this invocation | ||
* @return Map containing desired count of record key to value entries | ||
*/ | ||
Map<Key, ObjectNode> generate(int recordCount); | ||
} |
27 changes: 27 additions & 0 deletions
27
...benchmark/src/main/java/com/azure/cosmos/benchmark/linkedin/data/EntityConfiguration.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
package com.azure.cosmos.benchmark.linkedin.data; | ||
|
||
/** | ||
* Interface for modeling the configurations for each entity, allowing the same implementation | ||
* to be leveraged for different use-cases | ||
*/ | ||
public interface EntityConfiguration { | ||
|
||
/** | ||
* @return KeyGenerator for this entity | ||
*/ | ||
KeyGenerator keyGenerator(); | ||
|
||
/** | ||
* @return Data Generator for this entity, which facilitate generating documents conforming to this | ||
* entities schema | ||
*/ | ||
DataGenerator dataGenerator(); | ||
|
||
/** | ||
* @return The configuration for the underlying collection used to store this entity's data | ||
*/ | ||
CollectionAttributes collectionAttributes(); | ||
} |
Oops, something went wrong.