You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "XiaoHongbo-Hope (via GitHub)" <gi...@apache.org> on 2026/01/12 06:56:23 UTC

[PR] [python] fix rest token and blob-as-descriptor use same token issue and add rest catalog blob-as-descriptor sample [paimon]

XiaoHongbo-Hope opened a new pull request, #7009:
URL: https://github.com/apache/paimon/pull/7009

   <!-- Please specify the module before the PR name: [core] ... or [flink] ... -->
   
   ### Purpose
   
   <!-- Linking this pull request to the issue -->
   Linked issue: close #xxx
   
   <!-- What is the purpose of the change -->
   
   ### Tests
   
   <!-- List UT and IT cases to verify this change -->
   
   ### API and Format
   
   <!-- Does this change affect API or storage format -->
   
   ### Documentation
   
   <!-- Does this change introduce a new feature -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [python] fix rest file io and blob-as-descriptor file io token merge issue and add rest catalog blob-as-descriptor sample [paimon]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on code in PR #7009:
URL: https://github.com/apache/paimon/pull/7009#discussion_r2681607537


##########
paimon-python/pypaimon/common/file_io.py:
##########
@@ -43,7 +43,7 @@ def __init__(self, path: str, catalog_options: Options):
         self.properties = catalog_options
         self.logger = logging.getLogger(__name__)
         scheme, netloc, _ = self.parse_location(path)
-        self.uri_reader_factory = UriReaderFactory(catalog_options)
+        self.uri_reader_factory = UriReaderFactory(catalog_options.copy())

Review Comment:
   I think `RESTTokenFileIO` should not update `catalog_options`, should copy a new options, I think java also do like this?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [python] fix rest file io and blob-as-descriptor file io token merge issue and add rest catalog blob-as-descriptor sample [paimon]

Posted by "XiaoHongbo-Hope (via GitHub)" <gi...@apache.org>.
XiaoHongbo-Hope commented on code in PR #7009:
URL: https://github.com/apache/paimon/pull/7009#discussion_r2681526100


##########
paimon-python/pypaimon/common/file_io.py:
##########
@@ -43,7 +43,7 @@ def __init__(self, path: str, catalog_options: Options):
         self.properties = catalog_options
         self.logger = logging.getLogger(__name__)
         scheme, netloc, _ = self.parse_location(path)
-        self.uri_reader_factory = UriReaderFactory(catalog_options)
+        self.uri_reader_factory = UriReaderFactory(catalog_options.copy())

Review Comment:
   > Why do we need copy? What logic would update it?
   
   When using REST catalog with blob-as-descriptor, we have two FileIO instances:
   1. Table FileIO (RESTTokenFileIO) - uses REST data token
   2. External OSS blob files - uses user OSS credentials
   
   RESTTokenFileIO updates catalog_options dynamically in _initialize_oss_fs() when refreshing token. This would pollute the blob reader's configuration. So try to use a copy of catalog options in uri_reader_factory.
   
   Java: Token updates in RESTTokenFileIO.fileIO() create a new Options object.
   
   Updated this info in PR description too.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [python] fix rest file io and blob-as-descriptor file io token merge issue and add rest catalog blob-as-descriptor sample [paimon]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on PR #7009:
URL: https://github.com/apache/paimon/pull/7009#issuecomment-3738637260

   +1


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [python] fix rest file io and blob-as-descriptor file io token merge issue and add rest catalog blob-as-descriptor sample [paimon]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi merged PR #7009:
URL: https://github.com/apache/paimon/pull/7009


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [python] fix rest file io and blob-as-descriptor file io token merge issue and add rest catalog blob-as-descriptor sample [paimon]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on code in PR #7009:
URL: https://github.com/apache/paimon/pull/7009#discussion_r2681388983


##########
paimon-python/pypaimon/common/file_io.py:
##########
@@ -43,7 +43,7 @@ def __init__(self, path: str, catalog_options: Options):
         self.properties = catalog_options
         self.logger = logging.getLogger(__name__)
         scheme, netloc, _ = self.parse_location(path)
-        self.uri_reader_factory = UriReaderFactory(catalog_options)
+        self.uri_reader_factory = UriReaderFactory(catalog_options.copy())

Review Comment:
   Why do we need copy? What logic would update it?
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org