| { |
| "type": "index_hadoop", |
| "spec": { |
| "ioConfig": { |
| "type": "hadoop", |
| "inputSpec": { |
| "type": "static", |
| "inputFormat": "%s", |
| "paths": "example/decimals/dec-in-i64.parquet" |
| }, |
| "metadataUpdateSpec": { |
| "type": "postgresql", |
| "connectURI": "jdbc:postgresql://localhost/druid", |
| "user": "druid", |
| "password": "asdf", |
| "segmentTable": "druid_segments" |
| }, |
| "segmentOutputPath": "/tmp/segments" |
| }, |
| "dataSchema": { |
| "dataSource": "decimal", |
| "parser": { |
| "type": "%s", |
| "parseSpec": { |
| "format": "%s", |
| "flattenSpec": { |
| "useFieldDiscovery": true, |
| "fields": [ |
| { |
| "type": "root", |
| "name": "i64_dec" |
| }, |
| { |
| "type": "path", |
| "name": "metric1", |
| "expr": "$.i64_dec" |
| } |
| ] |
| }, |
| "timestampSpec": { |
| "column": "timestamp", |
| "format": "auto", |
| "missingValue": "2018-09-01T00:00:00.000Z" |
| }, |
| "dimensionsSpec": { |
| "dimensions": [ |
| "i64_dec" |
| ], |
| "dimensionExclusions": [], |
| "spatialDimensions": [] |
| } |
| } |
| }, |
| "metricsSpec": [ |
| { |
| "type": "count", |
| "name": "count" |
| }, |
| { |
| "type": "doubleSum", |
| "name": "metric1", |
| "fieldName": "metric1" |
| } |
| ], |
| "granularitySpec": { |
| "type": "uniform", |
| "segmentGranularity": "DAY", |
| "queryGranularity": "NONE", |
| "intervals": [ |
| "2018-08-30/2020-09-02" |
| ] |
| } |
| }, |
| "tuningConfig": { |
| "type": "hadoop", |
| "workingPath": "tmp/working_path", |
| "partitionsSpec": { |
| "targetPartitionSize": 5000000 |
| }, |
| "jobProperties": { |
| "mapreduce.map.java.opts": "-server -Duser.timezone=UTC -Dfile.encoding=UTF-8 -XX:+PrintGCDetails -XX:+PrintGCTimeStamps", |
| "mapreduce.reduce.java.opts": "-server -Duser.timezone=UTC -Dfile.encoding=UTF-8 -XX:+PrintGCDetails -XX:+PrintGCTimeStamps", |
| "mapred.child.java.opts": "-server -XX:+PrintGCDetails -XX:+PrintGCTimeStamps" |
| }, |
| "leaveIntermediate": true |
| } |
| } |
| } |