forked from Netflix/metacat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added repos and entities packages. Added PolarisStoreService interfac…
…e and CRUD methods on database and table entries.
- Loading branch information
1 parent
4d8161f
commit 0328634
Showing
15 changed files
with
207 additions
and
27 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
68 changes: 68 additions & 0 deletions
68
...olaris/src/main/java/com/netflix/metacat/connector/polaris/store/PolarisStoreService.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,68 @@ | ||
package com.netflix.metacat.connector.polaris.store; | ||
|
||
import com.netflix.metacat.connector.polaris.store.entities.PolarisDatabaseEntity; | ||
import com.netflix.metacat.connector.polaris.store.entities.PolarisTableEntity; | ||
import java.util.List; | ||
import java.util.Optional; | ||
|
||
/** | ||
* Interface methods for Polaris Store CRUD access. | ||
*/ | ||
public interface PolarisStoreService { | ||
|
||
/** | ||
* Creates a database entry. | ||
* @param databaseName database name | ||
* @return Polaris Database entity. | ||
*/ | ||
PolarisDatabaseEntity createDatabase(String databaseName); | ||
|
||
/** | ||
* Fetches database entry. | ||
* @param databaseName database name | ||
* @return Polaris Database entity | ||
*/ | ||
Optional<PolarisDatabaseEntity> getDatabase(String databaseName); | ||
|
||
/** | ||
* Updates existing database entity. | ||
* @param databaseEntity databaseEntity to save. | ||
*/ | ||
void updateDatabase(PolarisDatabaseEntity databaseEntity); | ||
|
||
/** | ||
* Creates a table entry. | ||
* @param dbName database name | ||
* @param tableName table name | ||
* @return Polaris Table entity. | ||
*/ | ||
PolarisTableEntity createTable(String dbName, String tableName); | ||
|
||
/** | ||
* Fetches table entry. | ||
* @param tableName table name | ||
* @return Polaris Table entity | ||
*/ | ||
Optional<PolarisTableEntity> getTable(String tableName); | ||
|
||
/** | ||
* Updates existing table entry. | ||
* @param tableEntity tableEntity to save. | ||
*/ | ||
void updateTable(PolarisTableEntity tableEntity); | ||
|
||
/** | ||
* Deletes the table entry. | ||
* @param dbName database name. | ||
* @param tableName table name. | ||
*/ | ||
void deleteTable(String dbName, String tableName); | ||
|
||
/** | ||
* Gets tables in the database and tableName prefix. | ||
* @param databaseName database name | ||
* @param tableNamePrefix table name prefix | ||
* @return list of table names in the database with the table name prefix. | ||
*/ | ||
List<String> getTables(String databaseName, String tableNamePrefix); | ||
} |
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
22 changes: 22 additions & 0 deletions
22
...aris/src/main/java/com/netflix/metacat/connector/polaris/store/entities/package-info.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,22 @@ | ||
/* | ||
* | ||
* Copyright 2021 Netflix, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
/** | ||
* Polaris entity classes. | ||
*/ | ||
package com.netflix.metacat.connector.polaris.store.entities; |
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
3 changes: 2 additions & 1 deletion
3
...laris/data/PolarisDatabaseRepository.java → ...tore/repos/PolarisDatabaseRepository.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
3 changes: 2 additions & 1 deletion
3
.../polaris/data/PolarisTableRepository.java → ...s/store/repos/PolarisTableRepository.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
22 changes: 22 additions & 0 deletions
22
...polaris/src/main/java/com/netflix/metacat/connector/polaris/store/repos/package-info.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,22 @@ | ||
/* | ||
* | ||
* Copyright 2021 Netflix, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
/** | ||
* Polaris repo classes. | ||
*/ | ||
package com.netflix.metacat.connector.polaris.store.repos; |
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.