Harish346 commented on issue #6113: Inserting Nested Json into Druid URL: https://github.com/apache/incubator-druid/issues/6113#issuecomment-411507775 Hi @gianm This is my ingestion spec file { "type": "index_hadoop", "spec": { "ioConfig": { "type": "hadoop", "inputSpec": { "type": "static", "paths": "quickstart/samplefile.json" } }, "dataSchema": { "dataSource": "samplefile", "granularitySpec": { "type": "uniform", "segmentGranularity": "day", "queryGranularity": { "type" : "none" }, "intervals":null }, "parser": { "type": "hadoopyString", "parseSpec": { "format": "json", "flattenSpec": { "useFieldDiscovery": true, "fields": [ { "type": "path", "name": "category", "expr": "$..category" }, { "type": "path", "name": "author", "expr": "$..author" }, { "type": "path", "name": "price", "expr": "$..price" } ] }, "dimensionsSpec": { "dimensions": [ "category", "author" ] }, "timestampSpec": { "format": "iso", "column": "timestamp" } } }, "metricsSpec": [] }, "tuningConfig": { "type": "hadoop", "partitionsSpec": { "type": "hashed", "targetPartitionSize": 5000000 }, "jobProperties": { } } } } and following is my json data { "store": { "timestamp": "2018-08-01", "book": [ { "category": "reference", "author": "Nigel Rees", "price": 8.95 }, { "category": "fiction", "author": "Evelyn Waugh", "price": 12.99 }, { "category": "fiction", "author": "Herman Melville", "price": 8.99 }, { "category": "fiction", "author": "J. R. R. Tolkien", "price": 22.99 } ] } } when i try to insert data into druid the task get created but the status gets always failed.Below is my log uid-indexing-service-0.12.1.jar:0.12.1] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_171] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_171] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_171] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_171] Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_171] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_171] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_171] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_171] at io.druid.indexing.common.task.HadoopTask.invokeForeignLoader(HadoopTask.java:219) ~[druid-indexing-service-0.12.1.jar:0.12.1] ... 7 more Caused by: io.druid.java.util.common.ISE: Job[class io.druid.indexer.DetermineHashedPartitionsJob] failed! at io.druid.indexer.JobHelper.runJobs(JobHelper.java:391) ~[druid-indexing-hadoop-0.12.1.jar:0.12.1] at io.druid.indexer.HadoopDruidDetermineConfigurationJob.run(HadoopDruidDetermineConfigurationJob.java:91) ~[druid-indexing-hadoop-0.12.1.jar:0.12.1] at io.druid.indexing.common.task.HadoopIndexTask$HadoopDetermineConfigInnerProcessing.runTask(HadoopIndexTask.java:325) ~[druid-indexing-service-0.12.1.jar:0.12.1] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_171] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_171] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_171] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_171] at io.druid.indexing.common.task.HadoopTask.invokeForeignLoader(HadoopTask.java:219) ~[druid-indexing-service-0.12.1.jar:0.12.1] ... 7 more 2018-08-08T18:23:07,101 INFO [task-runner-0-priority-0] io.druid.indexing.overlord.TaskRunnerUtils - Task [index_hadoop_samplefile_2018-08-08T18:22:53.394Z] status changed to [FAILED]. 2018-08-08T18:23:07,105 INFO [task-runner-0-priority-0] io.druid.indexing.worker.executor.ExecutorLifecycle - Task completed with status: { "id" : "index_hadoop_samplefile_2018-08-08T18:22:53.394Z", "status" : "FAILED", "duration" : 7055 }
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on 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 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
