sijie commented on a change in pull request #4779:  Add basic authentication 
capabilities to Pulsar SQL
URL: https://github.com/apache/pulsar/pull/4779#discussion_r306135685
 
 

 ##########
 File path: 
pulsar-sql/presto-pulsar/src/main/java/org/apache/pulsar/sql/presto/PulsarSplitManager.java
 ##########
 @@ -105,6 +106,12 @@ public ConnectorSplitSource 
getSplits(ConnectorTransactionHandle transactionHand
             schemaInfo = this.pulsarAdmin.schemas().getSchemaInfo(
                     String.format("%s/%s", namespace, 
tableHandle.getTableName()));
         } catch (PulsarAdminException e) {
+            if (e.getStatusCode() == 401) {
+                throw new PrestoException(QUERY_REJECTED,
+                        String.format("Failed to get schema for topic %s/%s: 
Unauthorized",
 
 Review comment:
   ```suggestion
                           String.format("Failed to get pulsar schema for topic 
%s/%s: Unauthorized",
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to