Global Cached lookup setup and usage in the query

I am using druid 0.10.0, and started trying out Globally Cached looked. Not able to figure out how to use them in the query though.

Following is simple csv cache setup ( Followed steps from http://druid.io/docs/latest/querying/lookups.html)

Payload:

{

“__default”: {

“city_name”: {

“version”:“v0”,

“lookupExtractorFactory”: {

“type”: “cachedNamespace”,

“extractionNamespace”: {

“type”:“uri”,

“uri”: “file:city.csv”,

“namespaceParseSpec”:{

“format”:“csv”,

“columns”:[“key”,“value”]

},

“pollPeriod”:“PT5H”

},

“firstCacheTimeout”: 0,

“injective”:true

}

}

}

Status:

curl http://coordinator:8081/druid/coordinator/v1/lookups?discover=true

["__default"]

curl -X GET http://coordinator:8081/druid/coordinator/v1/lookups/__default/

[“city_name”]

curl -X GET http://coordinator:8081/druid/coordinator/v1/lookups/__default/city_name

{“version”:“v0”,“lookupExtractorFactory”:{“type”:“cachedNamespace”,“extractionNamespace”:{“type”:“uri”,“uri”:“file:city.csv”,“namespaceParseSpec”:{“format”:“csv”,“columns”:[“key”,“value”]},“pollPeriod”:“PT5H”},“firstCacheTimeout”:0,“injective”:true}}

Querying the data:

To use above created cache, followed the steps under section “Lookup extraction function” at http://druid.io/docs/latest/querying/dimensionspecs.html

my Dim spec:

“dimensions”: [

{

“type”: “lookup”,

“dimension”: “cityName”,

“outputName”: “cityName”,

“lookup”: {

“type”: “namespace”,

“namespace”: “city_name”

},

“retainMissingValue”: true

}

],

Exception:

“error” : “Unknown exception”,

“errorMessage” : “Could not resolve type id ‘namespace’ into a subtype of [simple type, class io.druid.query.lookup.LookupExtractor]\n at [Source: HttpInputOverHTTP@b0c96d3[c=727,q=1,[0]=EOF,s=STREAM]; line: 1, column: 673] (through reference chain: java.util.ArrayList[0])”,

“errorClass” : “com.fasterxml.jackson.databind.JsonMappingException”,

“host” : null

In thread https://groups.google.com/d/msg/druid-user/-5J_bObO_Uk/XladI9jLAQAJ , Gian asking to load “namespace-lookup”, but is it applicable to version 0.10.0 ?

after adding the"namespace-lookup" extension, the following is the exception on the broker.

Caused by: com.fasterxml.jackson.databind.JsonMappingException: Unexpected token (END_OBJECT), expected FIELD_NAME: missing property ‘type’ that is to contain type id (for class io.druid.query.lookup.LookupExtractorFactory)

java.lang.IllegalArgumentException: Unexpected token (END_OBJECT), expected FIELD_NAME: missing property ‘type’ that is to contain type id (for class io.druid.query.lookup.LookupExtractorFactory)