-
Notifications
You must be signed in to change notification settings - Fork 519
[server] Integrate remote directory selector into table/partition creation #2769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -356,13 +356,15 @@ public void completeDeletePartition(long partitionId) { | |
| * Returns -1 if the table already exists and ignoreIfExists is true. | ||
| * | ||
| * @param tablePath the table path | ||
| * @param remoteDataDir the remote data directory | ||
| * @param tableToCreate the table descriptor describing the table to create | ||
| * @param tableAssignment the table assignment, will be null when the table is partitioned table | ||
| * @param ignoreIfExists whether to ignore if the table already exists | ||
| * @return the table id | ||
| */ | ||
| public long createTable( | ||
| TablePath tablePath, | ||
| String remoteDataDir, | ||
| TableDescriptor tableToCreate, | ||
| @Nullable TableAssignment tableAssignment, | ||
| boolean ignoreIfExists) | ||
|
|
@@ -405,10 +407,7 @@ public long createTable( | |
| // register the table | ||
| zookeeperClient.registerTable( | ||
| tablePath, | ||
| TableRegistration.newTable( | ||
| tableId, | ||
| zookeeperClient.getDefaultRemoteDataDir(), | ||
| tableToCreate), | ||
| TableRegistration.newTable(tableId, remoteDataDir, tableToCreate), | ||
| false); | ||
| return tableId; | ||
| }, | ||
|
|
@@ -795,6 +794,7 @@ public Set<String> getPartitions(TablePath tablePath) { | |
| public void createPartition( | ||
| TablePath tablePath, | ||
| long tableId, | ||
| String remoteDataDir, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am thinking about possible improvements here: I notice that now there exist some code pattern that (a). select a remoteDataDir value. (b) pass the value into createTable/createPartition functions, when we need to createTable/partition otherwhere. Or The implementation now is good to work. Just put my thoughts here. What do you think?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| PartitionAssignment partitionAssignment, | ||
| ResolvedPartitionSpec partition, | ||
| boolean ignoreIfExists) { | ||
|
|
@@ -857,7 +857,7 @@ public void createPartition( | |
| partitionId, | ||
| partitionName, | ||
| partitionAssignment, | ||
| zookeeperClient.getDefaultRemoteDataDir(), | ||
| remoteDataDir, | ||
| tablePath, | ||
| tableId); | ||
| LOG.info( | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.