ashwintumma23 commented on issue #17361:
URL: https://github.com/apache/druid/issues/17361#issuecomment-2420281040

   Hi @teyeheimans, 
   What type of lookup are you creating?
   
   ### Map Lookup
   * With the following configuration, 
   ```
   {
     "type": "map",
     "map": {
       "1": "One",
       "2": "Two",
       "3": "Three"
     }
   }
   ```
   I do see the key-value pairs, keys and values correctly, and formatted as a 
JSON
   ```
   $ curl -X GET http://localhost:8888/druid/v1/lookups/introspect/mapLookup/   
 
   {"1":"One","2":"Two","3":"Three"}
   
   $ curl -X GET 
http://localhost:8888/druid/v1/lookups/introspect/mapLookup/keys   
   [1, 2, 3]        
   
   $ curl -X GET 
http://localhost:8888/druid/v1/lookups/introspect/mapLookup/values     
   [One, Two, Three]
   
   $ curl -X GET 
http://localhost:8888/druid/v1/lookups/introspect/mapLookup/version
   -- Does not return anything                                                  
                                                                                
       
   ```
     - `/version` endpoint is not implemented in 
`MapLookupIntrospectionHandler` ; hence, we do not see the response.
    
   ### cachedNamespace Lookup
   * With the following configuration
   ```
   {
     "type": "cachedNamespace",
     "extractionNamespace": {
       "type": "uri",
       "uri": "file:/tmp/sampleCSV.csv",
       "namespaceParseSpec": {
         "format": "csv",
         "columns": [
           "key",
           "value"
         ],
         "skipHeaderRows": 1
       },
       "pollPeriod": "PT30S"
     },
     "firstCacheTimeout": 0
   }
   ```
   I see all the endpoints returning responses: 
   ```
   $ curl -X GET http://localhost:8888/druid/v1/lookups/introspect/csvLookup/   
     
   {"20":"Twenty","10":"Ten","30":"Thirty"}    
                                                                                
                                                       
   $ curl -X GET 
http://localhost:8888/druid/v1/lookups/introspect/csvLookup/keys
   ["20","10","30"]
   
   $ curl -X GET 
http://localhost:8888/druid/v1/lookups/introspect/csvLookup/values
   ["Twenty","Ten","Thirty"]
   
   $ $ curl -X GET 
http://localhost:8888/druid/v1/lookups/introspect/csvLookup/version
   {"version":"1729184323236"}
   ``` 
   * One caveat to call out here is `/version` endpoint does not return the 
version which was set manually when lookup was being created, but the epoch 
time. I see version as `v1` on the Console, but `1729184323236` on the 
Introspect API response.
   
![image](https://github.com/user-attachments/assets/ade98762-f5ae-4284-9874-43438f113f4d)
   
   Thanks! 


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to