-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Iceberg Ingestion in CloudStorage mode - Carve out IStorage and Exter…
…nalVolume from InternalStage (#828) * carve out IStorage and ExternalVolume * fix formatting * early exit in some testcases, to be reenabled in the next PR when ExternalVolume is filled in * minor PR feedback, retrigger snyk merge gate too
- Loading branch information
1 parent
d69adfd
commit c063036
Showing
14 changed files
with
478 additions
and
426 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
29 changes: 29 additions & 0 deletions
29
src/main/java/net/snowflake/ingest/streaming/internal/BlobPath.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,29 @@ | ||
/* | ||
* Copyright (c) 2024 Snowflake Computing Inc. All rights reserved. | ||
*/ | ||
|
||
package net.snowflake.ingest.streaming.internal; | ||
|
||
/** | ||
* Class to manage blob path strings that might have an embedded security token if its a presigned | ||
* url | ||
*/ | ||
public class BlobPath { | ||
public final String blobPath; | ||
public final Boolean hasToken; | ||
public final String fileName; | ||
|
||
private BlobPath(String fileName, String blobPath, Boolean hasToken) { | ||
this.blobPath = blobPath; | ||
this.hasToken = hasToken; | ||
this.fileName = fileName; | ||
} | ||
|
||
public static BlobPath fileNameWithoutToken(String fileName) { | ||
return new BlobPath(fileName, fileName, false); | ||
} | ||
|
||
public static BlobPath presignedUrlWithToken(String fileName, String url) { | ||
return new BlobPath(fileName, url, true); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
src/main/java/net/snowflake/ingest/streaming/internal/ExternalVolume.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,9 @@ | ||
package net.snowflake.ingest.streaming.internal; | ||
|
||
/** Handles uploading files to the Iceberg Table's external volume's table data path */ | ||
class ExternalVolume implements IStorage { | ||
@Override | ||
public void put(BlobPath blobPath, byte[] blob) { | ||
throw new RuntimeException("not implemented"); | ||
} | ||
} |
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.