-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
issue #3437 distributed schema using shard_key
Signed-off-by: Robin Arnold <[email protected]>
- Loading branch information
1 parent
10df2e8
commit 68819ab
Showing
125 changed files
with
5,212 additions
and
2,184 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
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
42 changes: 42 additions & 0 deletions
42
fhir-database-utils/src/main/java/com/ibm/fhir/database/utils/api/DistributionContext.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,42 @@ | ||
/* | ||
* (C) Copyright IBM Corp. 2022 | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.ibm.fhir.database.utils.api; | ||
|
||
|
||
/** | ||
* Carrier for the distribution context passed to some adapter methods | ||
*/ | ||
public class DistributionContext { | ||
// The type of distribution to be applied for a particular table | ||
private final DistributionType distributionType; | ||
// The column name to be used for distribution when the distributionType is DISTRIBUTED | ||
private final String distributionColumnName; | ||
|
||
/** | ||
* Public constructor | ||
* @param distributionType | ||
* @param distributionColumnName | ||
*/ | ||
public DistributionContext(DistributionType distributionType, String distributionColumnName) { | ||
this.distributionType = distributionType; | ||
this.distributionColumnName = distributionColumnName; | ||
} | ||
|
||
/** | ||
* @return the distributionType | ||
*/ | ||
public DistributionType getDistributionType() { | ||
return distributionType; | ||
} | ||
|
||
/** | ||
* @return the distributionColumnName | ||
*/ | ||
public String getDistributionColumnName() { | ||
return distributionColumnName; | ||
} | ||
} |
75 changes: 0 additions & 75 deletions
75
fhir-database-utils/src/main/java/com/ibm/fhir/database/utils/api/DistributionRules.java
This file was deleted.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
fhir-database-utils/src/main/java/com/ibm/fhir/database/utils/api/DistributionType.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,16 @@ | ||
/* | ||
* (C) Copyright IBM Corp. 2022 | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.ibm.fhir.database.utils.api; | ||
|
||
/** | ||
* The type of distribution to use for a table | ||
*/ | ||
public enum DistributionType { | ||
NONE, // table will not be distributed at all | ||
REFERENCE, // table will be replicated | ||
DISTRIBUTED // table will be sharded by a known column | ||
} |
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
Oops, something went wrong.